@brftech/filex-core 0.16.0 → 0.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/filex-core.js +3078 -3049
- package/dist/filex-core.js.map +1 -1
- package/dist/filex-core.umd.cjs +42 -42
- package/dist/filex-core.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/modals/PermissionsModal.vue +24 -0
package/package.json
CHANGED
|
@@ -81,6 +81,21 @@ const expiryOptions = [
|
|
|
81
81
|
{ v: 30, l: L('30 gün', '30 days') },
|
|
82
82
|
];
|
|
83
83
|
|
|
84
|
+
// ⚠ The download cap lived in the old standalone ShareModal and was left
|
|
85
|
+
// behind when this panel took over link creation — the server has honoured
|
|
86
|
+
// `max_downloads` the whole time, there was simply no way to set it. A select
|
|
87
|
+
// rather than a number box: "let this be opened three times" is the whole use
|
|
88
|
+
// case, and typing a number to say it is friction.
|
|
89
|
+
const shareMaxDl = ref(0); // 0 = unlimited
|
|
90
|
+
const maxDlOptions = [
|
|
91
|
+
{ v: 0, l: L('Sınırsız', 'Unlimited') },
|
|
92
|
+
{ v: 1, l: L('1 indirme', '1 download') },
|
|
93
|
+
{ v: 3, l: L('3 indirme', '3 downloads') },
|
|
94
|
+
{ v: 5, l: L('5 indirme', '5 downloads') },
|
|
95
|
+
{ v: 10, l: L('10 indirme', '10 downloads') },
|
|
96
|
+
{ v: 25, l: L('25 indirme', '25 downloads') },
|
|
97
|
+
];
|
|
98
|
+
|
|
84
99
|
// ── file-drop (public upload link) state ──
|
|
85
100
|
const dropPwd = ref(false);
|
|
86
101
|
const dropExpiry = ref(0); // days; 0 = never
|
|
@@ -290,6 +305,9 @@ async function createLink() {
|
|
|
290
305
|
path: props.path,
|
|
291
306
|
password: sharePwd.value,
|
|
292
307
|
expires_at: expiresAtISO(),
|
|
308
|
+
// null, not 0 — the server reads 0 as "no cap given" either way, but a
|
|
309
|
+
// null says it explicitly and keeps the payload honest.
|
|
310
|
+
max_downloads: shareMaxDl.value || null,
|
|
293
311
|
});
|
|
294
312
|
shareResult.value = { url: r.share.url, pin: r.share.password_pin ?? null };
|
|
295
313
|
await reloadShares();
|
|
@@ -618,6 +636,12 @@ async function nativeShare(body: { title: string; text: string }) {
|
|
|
618
636
|
<option v-for="o in expiryOptions" :key="o.v" :value="o.v">{{ o.l }}</option>
|
|
619
637
|
</select>
|
|
620
638
|
</label>
|
|
639
|
+
<label class="fx-perm-expiry">
|
|
640
|
+
<span class="fx-perm-muted">{{ L('İndirme limiti', 'Download limit') }}</span>
|
|
641
|
+
<select v-model.number="shareMaxDl" class="fx-perm-sel fx-perm-sel--sm">
|
|
642
|
+
<option v-for="o in maxDlOptions" :key="o.v" :value="o.v">{{ o.l }}</option>
|
|
643
|
+
</select>
|
|
644
|
+
</label>
|
|
621
645
|
<button class="fx-perm-btn fx-perm-btn--primary" :disabled="shareBusy" @click="createLink">
|
|
622
646
|
{{ L('Bağlantı oluştur', 'Create link') }}
|
|
623
647
|
</button>
|