From 57d7dfaa0a7d4ac9537e003673a36bccb4979d95 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 12 Nov 2024 16:51:17 +0100 Subject: [PATCH] :sparkles: Add final adjustements for binfile-v3 feature --- common/src/app/common/flags.cljc | 1 + .../src/app/main/ui/dashboard/file_menu.cljs | 28 +++++++++++-------- frontend/translations/en.po | 2 +- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/common/src/app/common/flags.cljc b/common/src/app/common/flags.cljc index 93b88f87e..791be1f52 100644 --- a/common/src/app/common/flags.cljc +++ b/common/src/app/common/flags.cljc @@ -12,6 +12,7 @@ (def default "A common flags that affects both: backend and frontend." [:enable-registration + :enable-export-file-v3 :enable-login-with-password]) (defn parse diff --git a/frontend/src/app/main/ui/dashboard/file_menu.cljs b/frontend/src/app/main/ui/dashboard/file_menu.cljs index 50187be84..e7dbd3b6e 100644 --- a/frontend/src/app/main/ui/dashboard/file_menu.cljs +++ b/frontend/src/app/main/ui/dashboard/file_menu.cljs @@ -255,18 +255,20 @@ :id "file-move-multi" :options sub-options}) - {:name (tr "dashboard.export-binary-multi" file-count) - :id "file-binary-export-multi" - :handler on-export-binary-files} + (when-not (contains? cf/flags :export-file-v3) + {:name (tr "dashboard.export-binary-multi" file-count) + :id "file-binary-export-multi" + :handler on-export-binary-files}) (when (contains? cf/flags :export-file-v3) {:name (tr "dashboard.export-binary-multi-v3" file-count) :id "file-binary-export-multi-v3" :handler on-export-binary-files-v3}) - {:name (tr "dashboard.export-standard-multi" file-count) - :id "file-standard-export-multi" - :handler on-export-standard-files} + (when-not (contains? cf/flags :export-file-v3) + {:name (tr "dashboard.export-standard-multi" file-count) + :id "file-standard-export-multi" + :handler on-export-standard-files}) (when (and (:is-shared file) can-edit) {:name (tr "labels.unpublish-multi-files" file-count) @@ -312,18 +314,20 @@ {:name :separator} - {:name (tr "dashboard.download-binary-file") - :id "download-binary-file" - :handler on-export-binary-files} + (when-not (contains? cf/flags :export-file-v3) + {:name (tr "dashboard.download-binary-file") + :id "download-binary-file" + :handler on-export-binary-files}) (when (contains? cf/flags :export-file-v3) {:name (tr "dashboard.download-binary-file-v3") :id "download-binary-file-v3" :handler on-export-binary-files-v3}) - {:name (tr "dashboard.download-standard-file") - :id "download-standard-file" - :handler on-export-standard-files} + (when-not (contains? cf/flags :export-file-v3) + {:name (tr "dashboard.download-standard-file") + :id "download-standard-file" + :handler on-export-standard-files}) (when (and (not is-lib-page?) (not is-search-page?) can-edit) {:name :separator}) diff --git a/frontend/translations/en.po b/frontend/translations/en.po index e44b01166..2518c84a9 100644 --- a/frontend/translations/en.po +++ b/frontend/translations/en.po @@ -421,7 +421,7 @@ msgid "dashboard.download-binary-file" msgstr "Download Penpot file (.penpot)" msgid "dashboard.download-binary-file-v3" -msgstr "Download Penpot file (.zip) (BETA)" +msgstr "Download (.zip)" #: src/app/main/ui/dashboard/file_menu.cljs:300, src/app/main/ui/workspace/main_menu.cljs:597 msgid "dashboard.download-standard-file"