From d0453ee5ce21e679a4de777facf8b5e79ef03367 Mon Sep 17 00:00:00 2001 From: Ryanator Date: Fri, 29 Nov 2024 19:26:25 -0500 Subject: [PATCH 1/4] Add pop-up when pressing on delete --- .../override/components/flows/blueprints/BlueprintsBrowser.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/src/override/components/flows/blueprints/BlueprintsBrowser.vue b/ui/src/override/components/flows/blueprints/BlueprintsBrowser.vue index 48f7c37f74e..a8dc00756bf 100644 --- a/ui/src/override/components/flows/blueprints/BlueprintsBrowser.vue +++ b/ui/src/override/components/flows/blueprints/BlueprintsBrowser.vue @@ -373,6 +373,7 @@ .title { font-weight: bold; font-size: $small-font-size; + padding-left: 0; } .tags { From 2e0979adc7e2b8e7d056ca16cd7f0ac52dffb8a2 Mon Sep 17 00:00:00 2001 From: Ryanator Date: Fri, 29 Nov 2024 19:31:22 -0500 Subject: [PATCH 2/4] Add pop-up when pressing on delete --- ui/src/components/layout/BookmarkLink.vue | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/ui/src/components/layout/BookmarkLink.vue b/ui/src/components/layout/BookmarkLink.vue index 8ac45acf26d..edc66428306 100644 --- a/ui/src/components/layout/BookmarkLink.vue +++ b/ui/src/components/layout/BookmarkLink.vue @@ -5,6 +5,7 @@ import DeleteOutline from "vue-material-design-icons/DeleteOutline.vue"; import PencilOutline from "vue-material-design-icons/PencilOutline.vue"; import CheckCircle from "vue-material-design-icons/CheckCircle.vue"; + import {ElMessageBox} from "element-plus"; const {t} = useI18n(); @@ -19,10 +20,23 @@ const updatedTitle = ref(props.title) const titleInput = ref<{focus: () => void, select: () => void} | null>(null) - function deleteBookmark() { - $store.dispatch("bookmarks/remove", { - path: props.href - }) + async function deleteBookmark() { + try { + await ElMessageBox.confirm( + t("Are you sure you want to remove this bookmark?"), + t("Remove Bookmark"), + { + confirmButtonText: t("Yes"), + cancelButtonText: t("No"), + type: "warning", + } + ); + $store.dispatch("bookmarks/remove", { + path: props.href, + }); + } catch { + // User canceled the action, do nothing + } } function startEditBookmark() { From ca7b94b520ff1694ba651e0a364a31fff92ce2b8 Mon Sep 17 00:00:00 2001 From: Ryanator Date: Fri, 29 Nov 2024 19:41:36 -0500 Subject: [PATCH 3/4] Add pop-up when pressing on delete --- .../override/components/flows/blueprints/BlueprintsBrowser.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/src/override/components/flows/blueprints/BlueprintsBrowser.vue b/ui/src/override/components/flows/blueprints/BlueprintsBrowser.vue index a8dc00756bf..48f7c37f74e 100644 --- a/ui/src/override/components/flows/blueprints/BlueprintsBrowser.vue +++ b/ui/src/override/components/flows/blueprints/BlueprintsBrowser.vue @@ -373,7 +373,6 @@ .title { font-weight: bold; font-size: $small-font-size; - padding-left: 0; } .tags { From 8a39937d7e879b4731dd579410ff68e697b31ba5 Mon Sep 17 00:00:00 2001 From: MilosPaunovic Date: Tue, 3 Dec 2024 11:54:00 +0100 Subject: [PATCH 4/4] chore(ui): minor tweaks --- ui/src/components/layout/BookmarkLink.vue | 25 ++++++++--------------- ui/src/translations/en.json | 1 + 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/ui/src/components/layout/BookmarkLink.vue b/ui/src/components/layout/BookmarkLink.vue index edc66428306..52651920a89 100644 --- a/ui/src/components/layout/BookmarkLink.vue +++ b/ui/src/components/layout/BookmarkLink.vue @@ -20,23 +20,14 @@ const updatedTitle = ref(props.title) const titleInput = ref<{focus: () => void, select: () => void} | null>(null) - async function deleteBookmark() { - try { - await ElMessageBox.confirm( - t("Are you sure you want to remove this bookmark?"), - t("Remove Bookmark"), - { - confirmButtonText: t("Yes"), - cancelButtonText: t("No"), - type: "warning", - } - ); - $store.dispatch("bookmarks/remove", { - path: props.href, - }); - } catch { - // User canceled the action, do nothing - } + function deleteBookmark() { + ElMessageBox.confirm(t("remove_bookmark"), t("confirmation"), { + type: "warning", + confirmButtonText: t("ok"), + cancelButtonText: t("close"), + }).then(() => { + $store.dispatch("bookmarks/remove", {path: props.href}); + }); } function startEditBookmark() { diff --git a/ui/src/translations/en.json b/ui/src/translations/en.json index e8794025f2d..27719d13ee1 100644 --- a/ui/src/translations/en.json +++ b/ui/src/translations/en.json @@ -953,6 +953,7 @@ "optional": "Optional", "no_data": "Looks like there's nothing hereā€¦ yet!
Adjust your filters, or give it another go!", "bookmark": "Bookmarks", + "remove_bookmark": "Are you sure you want to remove this bookmark?", "showLess": "Show less", "showMore": "Show more", "documentationMenu": "Documentation menu",