Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat #6211, added a pop-up before deleting a bookmark #6217

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions ui/src/components/layout/BookmarkLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -20,9 +21,13 @@
const titleInput = ref<{focus: () => void, select: () => void} | null>(null)

function deleteBookmark() {
$store.dispatch("bookmarks/remove", {
path: props.href
})
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() {
Expand Down
1 change: 1 addition & 0 deletions ui/src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,7 @@
"optional": "Optional",
"no_data": "Looks like there's nothing here… yet!<br/>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",
Expand Down