From 9ce43cd8f6c90b4981adee5364059d36b5957a3d Mon Sep 17 00:00:00 2001 From: Omar Hussein Date: Mon, 25 Mar 2024 10:58:20 -0400 Subject: [PATCH] mapping functionality from "master" to "vue3" --- frontend/src/components/prompts/Info.vue | 38 +++++++++++++++++------- frontend/src/i18n/ar.json | 6 ++-- frontend/src/views/files/FileListing.vue | 33 ++++++++++++-------- 3 files changed, 53 insertions(+), 24 deletions(-) diff --git a/frontend/src/components/prompts/Info.vue b/frontend/src/components/prompts/Info.vue index 8037bac1..687b49fb 100644 --- a/frontend/src/components/prompts/Info.vue +++ b/frontend/src/components/prompts/Info.vue @@ -38,43 +38,61 @@
-
diff --git a/frontend/src/i18n/ar.json b/frontend/src/i18n/ar.json index a3c08e11..5014eb52 100644 --- a/frontend/src/i18n/ar.json +++ b/frontend/src/i18n/ar.json @@ -40,7 +40,8 @@ "toggleSidebar": "تبديل الشريط الجانبي", "update": "تحديث", "upload": "رفع", - "openFile": "فتح الملف" + "openFile": "فتح الملف", + "discardChanges": "إلغاء التغييرات" }, "download": { "downloadFile": "تحميل الملف", @@ -164,7 +165,8 @@ "uploadFiles": "يتم رفع {files} ملفات.", "uploadMessage": "إختر الملفات التي تريد رفعها.", "optionalPassword": "كلمة مرور إختيارية", - "resolution": "الدقة" + "resolution": "الدقة", + "discardEditorChanges": "هل تريد بالتأكيد إلغاء التغييرات؟" }, "search": { "images": "الصور", diff --git a/frontend/src/views/files/FileListing.vue b/frontend/src/views/files/FileListing.vue index 70e898df..98387910 100644 --- a/frontend/src/views/files/FileListing.vue +++ b/frontend/src/views/files/FileListing.vue @@ -205,10 +205,10 @@ -

+

{{ t("files.folders") }}

-
+
-

{{ t("files.files") }}

-
+

{{ t("files.files") }}

+
{ watch(req, () => { // Reset the show value - showLimit.value = 50; + if ( + window.sessionStorage.getItem("listFrozen") !== "true" && + window.sessionStorage.getItem("modified") !== "true" + ) { + showLimit.value = 50; - nextTick(() => { - // Ensures that the listing is displayed - // How much every listing item affects the window height - setItemWeight(); + nextTick(() => { + // Ensures that the listing is displayed + // How much every listing item affects the window height + setItemWeight(); - // Fill and fit the window with listing items - fillWindow(true); - }); + // Fill and fit the window with listing items + fillWindow(true); + }); + } + if (req.value?.isDir) { + window.sessionStorage.setItem("listFrozen", "false"); + window.sessionStorage.setItem("modified", "false"); + } }); onMounted(() => {