diff --git a/components/files/UploadConfirmDialog.vue b/components/files/UploadConfirmDialog.vue
index 3511c45..4a87ad7 100644
--- a/components/files/UploadConfirmDialog.vue
+++ b/components/files/UploadConfirmDialog.vue
@@ -113,21 +113,26 @@
-
+
@@ -185,12 +190,22 @@ const props = defineProps<{
const emit = defineEmits<{
confirm: [options: { visibility: 'private' | 'public'; paymentMode: 'regular' | 'merkle' }]
cancel: []
+ /**
+ * Fired whenever the user flips the Private/Public selector. The parent
+ * re-quotes against the network since the prepared payment batch differs
+ * — public uploads pay for one extra chunk (the data map itself).
+ */
+ 'visibility-change': [visibility: 'private' | 'public']
}>()
const connectionStore = useConnectionStore()
const visibility = ref<'private' | 'public'>('private')
+watch(visibility, (val) => {
+ emit('visibility-change', val)
+})
+
const totalSize = computed(() => props.files.reduce((sum, f) => sum + f.size, 0))
const estimatedChunks = computed(() => Math.max(1, Math.ceil(totalSize.value / AVG_CHUNK_SIZE)))
diff --git a/pages/files.vue b/pages/files.vue
index a0eeee6..d1afe96 100644
--- a/pages/files.vue
+++ b/pages/files.vue
@@ -121,7 +121,16 @@
+ Public
+ {{ truncateAddress(file.public_address, 8, 6) }}
+
+
(null)
const quotedGasEstimate = ref(null)
const quotedPaymentMode = ref<'wave-batch' | 'merkle' | null>(null)
const pendingQuotes = ref |