From 4519fa518588110d87ee0d577a753b9087ab6a15 Mon Sep 17 00:00:00 2001 From: Anders Rasmussen Date: Tue, 17 Oct 2023 21:20:47 +0200 Subject: [PATCH 1/4] #20 - Added Toast container --- package-lock.json | 7 + package.json | 1 + src/components/ToastContainer.vue | 15 +++ src/components/base/toast.vue | 210 +++++++++++++++++------------- src/components/item/Browser.vue | 19 +-- src/layouts/LayoutSidebar.astro | 2 + src/stores/toasts.ts | 11 ++ 7 files changed, 163 insertions(+), 102 deletions(-) create mode 100644 src/components/ToastContainer.vue create mode 100644 src/stores/toasts.ts diff --git a/package-lock.json b/package-lock.json index 3371e39..a7042e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,6 +44,7 @@ }, "devDependencies": { "@tauri-apps/cli": "^1.5.1", + "@types/uuid": "^9.0.5", "dotenv": "^16.3.1", "prettier": "^3.0.3", "prettier-plugin-astro": "^0.12.0", @@ -2187,6 +2188,12 @@ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.0.tgz", "integrity": "sha512-MFETx3tbTjE7Uk6vvnWINA/1iJ7LuMdO4fcq8UfF0pRbj01aGLduVvQcRyswuACJdpnHgg8E3rQLhaRdNEJS0w==" }, + "node_modules/@types/uuid": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.5.tgz", + "integrity": "sha512-xfHdwa1FMJ082prjSJpoEI57GZITiQz10r3vEJCHa2khEFQjKy91aWKz6+zybzssCvXUwE1LQWgWVwZ4nYUvHQ==", + "dev": true + }, "node_modules/@types/web-bluetooth": { "version": "0.0.17", "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.17.tgz", diff --git a/package.json b/package.json index 127de6c..f54e113 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,7 @@ }, "devDependencies": { "@tauri-apps/cli": "^1.5.1", + "@types/uuid": "^9.0.5", "dotenv": "^16.3.1", "prettier": "^3.0.3", "prettier-plugin-astro": "^0.12.0", diff --git a/src/components/ToastContainer.vue b/src/components/ToastContainer.vue new file mode 100644 index 0000000..2cec858 --- /dev/null +++ b/src/components/ToastContainer.vue @@ -0,0 +1,15 @@ + + + diff --git a/src/components/base/toast.vue b/src/components/base/toast.vue index f14b56a..244c00f 100644 --- a/src/components/base/toast.vue +++ b/src/components/base/toast.vue @@ -1,101 +1,111 @@ @@ -110,12 +120,32 @@ export enum ToastType {