From 5fdbf7339170fda96d235d12d917ee05af4ef1ec Mon Sep 17 00:00:00 2001 From: Jared Date: Mon, 6 Feb 2023 11:55:32 -0500 Subject: [PATCH] Add some views and remove a useless bit --- package-lock.json | 16 ++++++++-------- package.json | 1 + src/App.vue | 9 +++++++-- src/lib/auth.ts | 2 +- src/router/index.ts | 12 ++++++------ src/views/ForbiddenView.vue | 13 +++++++++++++ src/views/LogoutView.vue | 20 -------------------- src/views/NotFoundView.vue | 13 +++++++++++++ yarn.lock | 8 ++++---- 9 files changed, 53 insertions(+), 41 deletions(-) create mode 100644 src/views/ForbiddenView.vue delete mode 100644 src/views/LogoutView.vue create mode 100644 src/views/NotFoundView.vue diff --git a/package-lock.json b/package-lock.json index 7b6d659..cc99f63 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,6 +26,7 @@ "@types/chai": "^4.2.15", "@types/luxon": "^3.1.0", "@types/mocha": "^8.2.1", + "@types/node": "^18.11.19", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", "@vue/cli-plugin-babel": "~5.0.0", @@ -2485,11 +2486,10 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "18.11.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", - "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==", - "dev": true, - "license": "MIT" + "version": "18.11.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.19.tgz", + "integrity": "sha512-YUgMWAQBWLObABqrvx8qKO1enAvBUdjZOAWQ5grBAkp5LQv45jBvYKZ3oFS9iKRCQyFjqw6iuEa1vmFqtxYLZw==", + "dev": true }, "node_modules/@types/normalize-package-data": { "version": "2.4.1", @@ -16514,9 +16514,9 @@ "dev": true }, "@types/node": { - "version": "18.11.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", - "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==", + "version": "18.11.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.19.tgz", + "integrity": "sha512-YUgMWAQBWLObABqrvx8qKO1enAvBUdjZOAWQ5grBAkp5LQv45jBvYKZ3oFS9iKRCQyFjqw6iuEa1vmFqtxYLZw==", "dev": true }, "@types/normalize-package-data": { diff --git a/package.json b/package.json index 7d1e68a..5b4d013 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "@types/chai": "^4.2.15", "@types/luxon": "^3.1.0", "@types/mocha": "^8.2.1", + "@types/node": "^18.11.19", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", "@vue/cli-plugin-babel": "~5.0.0", diff --git a/src/App.vue b/src/App.vue index cd0009c..9bb84dc 100644 --- a/src/App.vue +++ b/src/App.vue @@ -22,9 +22,9 @@ Admin - + @@ -63,6 +63,7 @@ import { } from 'vue'; import jwtDecode from 'jwt-decode'; import { Claims } from '@/api/types'; +import { removeToken } from '@/lib/auth'; const userData = ref({ username: '', @@ -113,6 +114,10 @@ const logoElements: LogoElement[] = [ letter: 't', }, ]; + +const logout = () => { + removeToken(); +}; diff --git a/src/views/LogoutView.vue b/src/views/LogoutView.vue deleted file mode 100644 index 7e80bf3..0000000 --- a/src/views/LogoutView.vue +++ /dev/null @@ -1,20 +0,0 @@ - - - - - diff --git a/src/views/NotFoundView.vue b/src/views/NotFoundView.vue new file mode 100644 index 0000000..fd3bb59 --- /dev/null +++ b/src/views/NotFoundView.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/yarn.lock b/yarn.lock index 0e3d3fa..1142c56 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1270,10 +1270,10 @@ "resolved" "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz" "version" "8.2.3" -"@types/node@*": - "integrity" "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==" - "resolved" "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz" - "version" "18.11.9" +"@types/node@*", "@types/node@^18.11.19": + "integrity" "sha512-YUgMWAQBWLObABqrvx8qKO1enAvBUdjZOAWQ5grBAkp5LQv45jBvYKZ3oFS9iKRCQyFjqw6iuEa1vmFqtxYLZw==" + "resolved" "https://registry.npmjs.org/@types/node/-/node-18.11.19.tgz" + "version" "18.11.19" "@types/normalize-package-data@^2.4.0": "integrity" "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw=="