From fcbcc6de95867f2804cc05234a2c9d13c1995a07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Thu, 15 Oct 2020 11:04:10 +0200 Subject: [PATCH] :sparkles: Enhance confirm dialog cancel options --- frontend/src/app/main/ui/confirm.cljs | 2 +- frontend/src/app/main/ui/dashboard/grid.cljs | 4 ++-- frontend/src/app/main/ui/workspace/header.cljs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/main/ui/confirm.cljs b/frontend/src/app/main/ui/confirm.cljs index e5dc90c28..a36c677a4 100644 --- a/frontend/src/app/main/ui/confirm.cljs +++ b/frontend/src/app/main/ui/confirm.cljs @@ -67,7 +67,7 @@ [:div.modal-footer [:div.action-buttons - (when-not (empty? cancel-label) + (when-not (= cancel-label :omit) [:input.cancel-button {:type "button" :value cancel-label diff --git a/frontend/src/app/main/ui/dashboard/grid.cljs b/frontend/src/app/main/ui/dashboard/grid.cljs index ce3d053a5..2113b2602 100644 --- a/frontend/src/app/main/ui/dashboard/grid.cljs +++ b/frontend/src/app/main/ui/dashboard/grid.cljs @@ -112,7 +112,7 @@ :message "" :title (t locale "modals.add-shared-confirm.message" (:name file)) :hint (t locale "modals.add-shared-confirm.hint") - :cancel-label "" + :cancel-label :omit :accept-label (t locale "modals.add-shared-confirm.accept") :accept-style :primary :on-accept add-shared})))) @@ -128,7 +128,7 @@ :message "" :title (t locale "modals.remove-shared-confirm.message" (:name file)) :hint (t locale "modals.remove-shared-confirm.hint") - :cancel-label "" + :cancel-label :omit :accept-label (t locale "modals.remove-shared-confirm.accept") :on-accept del-shared})))) diff --git a/frontend/src/app/main/ui/workspace/header.cljs b/frontend/src/app/main/ui/workspace/header.cljs index bc8f460f6..3ceaa5aaf 100644 --- a/frontend/src/app/main/ui/workspace/header.cljs +++ b/frontend/src/app/main/ui/workspace/header.cljs @@ -110,7 +110,7 @@ :message "" :title (t locale "modals.add-shared-confirm.message" (:name file)) :hint (t locale "modals.add-shared-confirm.hint") - :cancel-label "" + :cancel-label :omit :accept-label (t locale "modals.add-shared-confirm.accept") :accept-style :primary :on-accept add-shared-fn}))) @@ -123,7 +123,7 @@ :message "" :title (t locale "modals.remove-shared-confirm.message" (:name file)) :hint (t locale "modals.remove-shared-confirm.hint") - :cancel-label "" + :cancel-label :omit :accept-label (t locale "modals.remove-shared-confirm.accept") :on-accept del-shared-fn})))