From 905051da468e050d68b5556768f5ab65775a944b Mon Sep 17 00:00:00 2001 From: Tim Schauder Date: Tue, 30 Jul 2024 13:47:17 +0200 Subject: [PATCH 1/2] Add pinia plugin persisted state --- nuxt.config.ts | 2 +- package-lock.json | 24 ++++++++++++++++++++++++ package.json | 1 + 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/nuxt.config.ts b/nuxt.config.ts index a2ae56b..cf43643 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -2,7 +2,7 @@ export default defineNuxtConfig({ ssr: false, - modules: ['@nuxt/eslint', '@pinia/nuxt', '@nuxtjs/tailwindcss'], + modules: ['@nuxt/eslint', '@pinia/nuxt', '@nuxtjs/tailwindcss', '@pinia-plugin-persistedstate/nuxt',], devtools: { enabled: true }, runtimeConfig: { public: { diff --git a/package-lock.json b/package-lock.json index 7bcf68c..783001d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "devDependencies": { "@nuxt/eslint": "^0.3.13", "@nuxtjs/tailwindcss": "^6.12.0", + "@pinia-plugin-persistedstate/nuxt": "^1.2.1", "daisyui": "^4.12.10", "eslint": "^8.57.0" } @@ -3386,6 +3387,20 @@ "node": ">=0.10" } }, + "node_modules/@pinia-plugin-persistedstate/nuxt": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@pinia-plugin-persistedstate/nuxt/-/nuxt-1.2.1.tgz", + "integrity": "sha512-q8s+4aQW/AjBMyeqLL48/qzBR5lcgnvvf1525ovNuKf6Wl9CsoLjPKh/5X8vNoKGwSow4gP7lVmdYPQRypgjgg==", + "dev": true, + "dependencies": { + "@nuxt/kit": "^3.12.2", + "defu": "^6.1.4", + "pinia-plugin-persistedstate": ">=3.2.1" + }, + "peerDependencies": { + "@pinia/nuxt": "^0.5.0" + } + }, "node_modules/@pinia/nuxt": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/@pinia/nuxt/-/nuxt-0.5.1.tgz", @@ -11189,6 +11204,15 @@ } } }, + "node_modules/pinia-plugin-persistedstate": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/pinia-plugin-persistedstate/-/pinia-plugin-persistedstate-3.2.1.tgz", + "integrity": "sha512-MK++8LRUsGF7r45PjBFES82ISnPzyO6IZx3CH5vyPseFLZCk1g2kgx6l/nW8pEBKxxd4do0P6bJw+mUSZIEZUQ==", + "dev": true, + "peerDependencies": { + "pinia": "^2.0.0" + } + }, "node_modules/pirates": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", diff --git a/package.json b/package.json index d26695a..d5d9336 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "devDependencies": { "@nuxt/eslint": "^0.3.13", "@nuxtjs/tailwindcss": "^6.12.0", + "@pinia-plugin-persistedstate/nuxt": "^1.2.1", "daisyui": "^4.12.10", "eslint": "^8.57.0" }, From 998daa8796e0d0e60e0f39ca61a74c3f85e75391 Mon Sep 17 00:00:00 2001 From: Tim Schauder Date: Tue, 30 Jul 2024 13:48:16 +0200 Subject: [PATCH 2/2] Add nonce to store and refactor types --- components/PresentationForm.vue | 24 ++++-- components/QrCode.vue | 7 +- models/PresentationRequest.ts | 81 ------------------- models/TransactionRequest.ts | 34 ++++++++ ...tionResponse.ts => TransactionResponse.ts} | 2 +- models/TransactionStore.ts | 5 ++ pages/provider.vue | 7 +- stores/SessionStore.ts | 21 +++-- 8 files changed, 77 insertions(+), 104 deletions(-) delete mode 100644 models/PresentationRequest.ts create mode 100644 models/TransactionRequest.ts rename models/{PresentationResponse.ts => TransactionResponse.ts} (67%) create mode 100644 models/TransactionStore.ts diff --git a/components/PresentationForm.vue b/components/PresentationForm.vue index c55ab4c..6f0a4dd 100644 --- a/components/PresentationForm.vue +++ b/components/PresentationForm.vue @@ -23,20 +23,27 @@ Hier ausweisen +
+

{{ errorMessage }}

+
\ No newline at end of file diff --git a/components/QrCode.vue b/components/QrCode.vue index 319482f..cc3bcff 100644 --- a/components/QrCode.vue +++ b/components/QrCode.vue @@ -1,5 +1,5 @@