From 05a7758c65cc544ca4540853b69fe44f8ed1227c Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Wed, 19 Jul 2023 19:48:22 +0800 Subject: [PATCH] New notification system + test Set of buttons added to home view for preview. Comes in toast (self-dismiss) and context alert (info, warning, danger) variants. --- package-lock.json | 17 +++++++ package.json | 1 + src/App.vue | 103 +++++++++++++++++++++++++++++++++++++++++ src/main.ts | 6 +++ src/views/HomeView.vue | 71 ++++++++++++++++++++++++++++ 5 files changed, 198 insertions(+) diff --git a/package-lock.json b/package-lock.json index df6f9ba..e4ccf88 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,6 +38,7 @@ "luxon": "^3.3.0", "merkletreejs": "^0.3.10", "moment": "^2.29.4", + "notiwind": "^2.0.2", "papaparse": "^5.4.1", "pina": "^0.20.2204228", "pinia-plugin-persistedstate": "^3.1.0", @@ -20928,6 +20929,11 @@ "node": ">= 8" } }, + "node_modules/mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==" + }, "node_modules/mkdirp": { "version": "0.5.6", "resolved": "https://registry.npmmirror.com/mkdirp/-/mkdirp-0.5.6.tgz", @@ -21275,6 +21281,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/notiwind": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/notiwind/-/notiwind-2.0.2.tgz", + "integrity": "sha512-wMCf+07E093d0Q78C5UHroT9GQHm4mIGerhg7dGLJ0GN6zONqKj8nTR3clkq/Y44On9k28/0DtDNwOX7FT5p/A==", + "dependencies": { + "mitt": "^3.0.1" + }, + "peerDependencies": { + "vue": "^3.3.4" + } + }, "node_modules/npm-package-arg": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-7.0.0.tgz", diff --git a/package.json b/package.json index 062adb0..de2f9ca 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "luxon": "^3.3.0", "merkletreejs": "^0.3.10", "moment": "^2.29.4", + "notiwind": "^2.0.2", "papaparse": "^5.4.1", "pina": "^0.20.2204228", "pinia-plugin-persistedstate": "^3.1.0", diff --git a/src/App.vue b/src/App.vue index 8b2af92..39a8292 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,5 +1,108 @@ diff --git a/src/main.ts b/src/main.ts index bc3f7d5..14eb8d5 100644 --- a/src/main.ts +++ b/src/main.ts @@ -5,6 +5,7 @@ import "./registerServiceWorker"; import router from "./router"; import axios from "axios"; import VueAxios from "vue-axios"; +import Notifications from "notiwind"; import "./assets/styles/tailwind.css"; @@ -16,6 +17,7 @@ import { faChevronRight, faCircle, faCircleCheck, + faCircleInfo, faCircleQuestion, faCircleUser, faClock, @@ -45,6 +47,7 @@ import { faSquareCaretDown, faSquareCaretUp, faTrashCan, + faTriangleExclamation, faUser, faUsers, faXmark, @@ -57,6 +60,7 @@ library.add( faChevronRight, faCircle, faCircleCheck, + faCircleInfo, faCircleQuestion, faCircleUser, faClock, @@ -86,6 +90,7 @@ library.add( faSquareCaretDown, faSquareCaretUp, faTrashCan, + faTriangleExclamation, faUser, faUsers, faXmark, @@ -98,4 +103,5 @@ createApp(App) .use(createPinia()) .use(VueAxios, axios) .use(router) + .use(Notifications) .mount("#app"); diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index d7bb77f..37d47d1 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -6,6 +6,77 @@ Time Safari +
+

Notiwind Alert Test Suite

+ + + + + + + + +
+

Quick Action

Show appreciation to a contact: