Skip to content

Commit 9ce43cd

Browse files
committed
mapping functionality from "master" to "vue3"
1 parent 9499d84 commit 9ce43cd

File tree

3 files changed

+53
-24
lines changed

3 files changed

+53
-24
lines changed

frontend/src/components/prompts/Info.vue

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,43 +38,61 @@
3838

3939
<template v-if="!dir">
4040
<p>
41-
<strong>MD5: </strong><code><a
41+
<strong>MD5: </strong
42+
><code
43+
><a
4244
@click="checksum($event, 'md5')"
4345
@keypress.enter="checksum($event, 'md5')"
4446
tabindex="2"
4547
>{{ $t("prompts.show") }}</a
46-
></code>
48+
></code
49+
>
4750
</p>
4851
<p>
49-
<strong>SHA1: </strong><code><a
52+
<strong>SHA1: </strong
53+
><code
54+
><a
5055
@click="checksum($event, 'sha1')"
5156
@keypress.enter="checksum($event, 'sha1')"
5257
tabindex="3"
5358
>{{ $t("prompts.show") }}</a
54-
></code>
59+
></code
60+
>
5561
</p>
5662
<p>
57-
<strong>SHA256: </strong><code><a
63+
<strong>SHA256: </strong
64+
><code
65+
><a
5866
@click="checksum($event, 'sha256')"
5967
@keypress.enter="checksum($event, 'sha256')"
6068
tabindex="4"
6169
>{{ $t("prompts.show") }}</a
62-
></code>
70+
></code
71+
>
6372
</p>
6473
<p>
65-
<strong>SHA512: </strong><code><a
74+
<strong>SHA512: </strong
75+
><code
76+
><a
6677
@click="checksum($event, 'sha512')"
6778
@keypress.enter="checksum($event, 'sha512')"
6879
tabindex="5"
6980
>{{ $t("prompts.show") }}</a
70-
></code>
81+
></code
82+
>
7183
</p>
7284
</template>
7385
</div>
7486

7587
<div class="card-action">
76-
<button id="focus-prompt" type="submit" @click="closeHovers" class="button button--flat"
77-
:aria-label="$t('buttons.ok')" :title="$t('buttons.ok')">
88+
<button
89+
id="focus-prompt"
90+
type="submit"
91+
@click="closeHovers"
92+
class="button button--flat"
93+
:aria-label="$t('buttons.ok')"
94+
:title="$t('buttons.ok')"
95+
>
7896
{{ $t("buttons.ok") }}
7997
</button>
8098
</div>

frontend/src/i18n/ar.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
"toggleSidebar": "تبديل الشريط الجانبي",
4141
"update": "تحديث",
4242
"upload": "رفع",
43-
"openFile": "فتح الملف"
43+
"openFile": "فتح الملف",
44+
"discardChanges": "إلغاء التغييرات"
4445
},
4546
"download": {
4647
"downloadFile": "تحميل الملف",
@@ -164,7 +165,8 @@
164165
"uploadFiles": "يتم رفع {files} ملفات.",
165166
"uploadMessage": "إختر الملفات التي تريد رفعها.",
166167
"optionalPassword": "كلمة مرور إختيارية",
167-
"resolution": "الدقة"
168+
"resolution": "الدقة",
169+
"discardEditorChanges": "هل تريد بالتأكيد إلغاء التغييرات؟"
168170
},
169171
"search": {
170172
"images": "الصور",

frontend/src/views/files/FileListing.vue

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,10 @@
205205
</div>
206206
</div>
207207

208-
<h2 v-if="fileStore.req?.numDirs ?? 0 > 0">
208+
<h2 v-if="fileStore.req?.numDirs ?? false">
209209
{{ t("files.folders") }}
210210
</h2>
211-
<div v-if="fileStore.req?.numDirs ?? 0 > 0">
211+
<div v-if="fileStore.req?.numDirs ?? false">
212212
<item
213213
v-for="item in dirs"
214214
:key="base64(item.name)"
@@ -224,8 +224,8 @@
224224
</item>
225225
</div>
226226

227-
<h2 v-if="fileStore.req?.numFiles ?? 0 > 0">{{ t("files.files") }}</h2>
228-
<div v-if="fileStore.req?.numFiles ?? 0 > 0">
227+
<h2 v-if="fileStore.req?.numFiles ?? false">{{ t("files.files") }}</h2>
228+
<div v-if="fileStore.req?.numFiles ?? false">
229229
<item
230230
v-for="item in files"
231231
:key="base64(item.name)"
@@ -433,16 +433,25 @@ const isMobile = computed(() => {
433433
434434
watch(req, () => {
435435
// Reset the show value
436-
showLimit.value = 50;
436+
if (
437+
window.sessionStorage.getItem("listFrozen") !== "true" &&
438+
window.sessionStorage.getItem("modified") !== "true"
439+
) {
440+
showLimit.value = 50;
437441
438-
nextTick(() => {
439-
// Ensures that the listing is displayed
440-
// How much every listing item affects the window height
441-
setItemWeight();
442+
nextTick(() => {
443+
// Ensures that the listing is displayed
444+
// How much every listing item affects the window height
445+
setItemWeight();
442446
443-
// Fill and fit the window with listing items
444-
fillWindow(true);
445-
});
447+
// Fill and fit the window with listing items
448+
fillWindow(true);
449+
});
450+
}
451+
if (req.value?.isDir) {
452+
window.sessionStorage.setItem("listFrozen", "false");
453+
window.sessionStorage.setItem("modified", "false");
454+
}
446455
});
447456
448457
onMounted(() => {

0 commit comments

Comments
 (0)