From 857d07040b2e33f1efcef16d13d24ec68376aa17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Fri, 5 May 2023 07:53:12 +0200 Subject: [PATCH] update capacitor dependencies --- api/src/utils/persistent.ts | 12 ++++++------ api/tsconfig.json | 13 +++---------- package.json | 15 +++++++++------ src-capacitor/capacitor.config.json | 3 +++ src-capacitor/package.json | 14 +++++++------- tsconfig.json | 2 +- 6 files changed, 29 insertions(+), 30 deletions(-) diff --git a/api/src/utils/persistent.ts b/api/src/utils/persistent.ts index e53f4f2..72e79cf 100644 --- a/api/src/utils/persistent.ts +++ b/api/src/utils/persistent.ts @@ -1,35 +1,35 @@ import { LocalStorage, Platform } from 'quasar'; -import { Storage } from '@capacitor/storage'; +import { Preferences } from '@capacitor/preferences'; // eslint-disable-next-line @typescript-eslint/no-explicit-any type PersitentTypes = Date | RegExp | number | boolean | string | object; export class PersistentStorage { static clear() { - if (Platform.is.capacitor) return Storage.clear(); + if (Platform.is.capacitor) return Preferences.clear(); else return Promise.resolve(LocalStorage.clear()); } static remove(key: string) { - if (Platform.is.capacitor) return Storage.remove({ key: key }); + if (Platform.is.capacitor) return Preferences.remove({ key: key }); else return Promise.resolve(LocalStorage.remove(key)); } static set(key: string, value: PersitentTypes) { - if (Platform.is.capacitor) return Storage.set({ key, value: JSON.stringify(value) }); + if (Platform.is.capacitor) return Preferences.set({ key, value: JSON.stringify(value) }); else return Promise.resolve(LocalStorage.set(key, value)); } static get(key: string) { if (Platform.is.capacitor) - return Storage.get({ key }).then((v) => + return Preferences.get({ key }).then((v) => v.value === null ? null : (JSON.parse(v.value) as T) ); else return Promise.resolve(LocalStorage.getItem(key)); } static keys() { - if (Platform.is.capacitor) return Storage.keys().then((v) => v.keys); + if (Platform.is.capacitor) return Preferences.keys().then((v) => v.keys); else return Promise.resolve(LocalStorage.getAllKeys()); } } diff --git a/api/tsconfig.json b/api/tsconfig.json index 17f1334..0c61f87 100644 --- a/api/tsconfig.json +++ b/api/tsconfig.json @@ -3,14 +3,7 @@ "target": "esnext", "compilerOptions": { "baseUrl": "./", - "lib": [ - "es2020", - "dom" - ], - "types": [ - "@flaschengeist/types", - "@quasar/app", - "node" - ] - } + "lib": ["es2020", "dom"], + "types": ["@flaschengeist/types", "@quasar/app", "node"] + } } diff --git a/package.json b/package.json index ec9cd8b..9659ddb 100644 --- a/package.json +++ b/package.json @@ -16,23 +16,26 @@ }, "dependencies": { "@flaschengeist/api": "file:./api", - "@flaschengeist/users": "^1.0.0-alpha.3", "@flaschengeist/schedule": "^1.0.0-alpha.6", + "@flaschengeist/users": "^1.0.0-alpha.3", "axios": "^0.24.0", "pinia": "^2.0.8", - "quasar": "^2.3.4" + "quasar": "^2.11.10", + "vue": "^3.0.0", + "vue-router": "^4.0.0" }, "devDependencies": { - "@capacitor/core": "^3.3.3", - "@capacitor/storage": "^1.2.3", + "@capacitor/core": "^5.0.0", + "@capacitor/preferences": "^5.0.0", "@flaschengeist/types": "^1.0.0-alpha.10", - "@quasar/app": "^3.2.5", - "@quasar/extras": "^1.12.2", + "@quasar/app-webpack": "^3.7.2", + "@quasar/extras": "^1.16.3", "@types/node": "^14.18.0", "@types/webpack": "^5.28.0", "@types/webpack-env": "^1.16.3", "@typescript-eslint/eslint-plugin": "^5.8.0", "@typescript-eslint/parser": "^5.8.0", + "@vue/devtools": "^6.5.0", "eslint": "^8.5.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", diff --git a/src-capacitor/capacitor.config.json b/src-capacitor/capacitor.config.json index a8b2ef0..e50626f 100644 --- a/src-capacitor/capacitor.config.json +++ b/src-capacitor/capacitor.config.json @@ -4,6 +4,9 @@ "bundledWebRuntime": false, "npmClient": "yarn", "webDir": "www", + "android": { + "minWebViewVersion": 71 + }, "ios": { "allowsLinkPreview": false } diff --git a/src-capacitor/package.json b/src-capacitor/package.json index 6973575..c73d274 100644 --- a/src-capacitor/package.json +++ b/src-capacitor/package.json @@ -5,12 +5,12 @@ "author": "Tim Gröger ", "private": true, "dependencies": { - "@capacitor/android": "^3.3.2", - "@capacitor/app": "^1.0.0", - "@capacitor/cli": "^3.0.0", - "@capacitor/core": "^3.0.0", - "@capacitor/ios": "^3.0.0-beta.0", - "@capacitor/splash-screen": "^1.0.0", - "@capacitor/storage": "^1.2.3" + "@capacitor/android": "^5.0.0-beta.0", + "@capacitor/app": "^5.0.0", + "@capacitor/cli": "^5.0.0", + "@capacitor/core": "^5.0.0", + "@capacitor/ios": "^5.0.0", + "@capacitor/preferences": "^5.0.0", + "@capacitor/splash-screen": "^5.0.0" } } \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index be94438..c213c51 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@quasar/app/tsconfig-preset", + "extends": "@quasar/app-webpack/tsconfig-preset", "target": "esnext", "compilerOptions": { "baseUrl": ".",