From 2fc411d51dfddc5bce9817b5a84131b26c0bff44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Fri, 19 Nov 2021 23:10:56 +0100 Subject: [PATCH 1/5] [UI] Show menu drawer if on desktop --- src/layouts/MainLayout.vue | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index d2d148e..1bf641b 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -77,7 +77,7 @@ import EssentialLink from 'src/components/navigation/EssentialLink.vue'; import ShortcutLink from 'src/components/navigation/ShortcutLink.vue'; import Notification from 'src/components/Notification.vue'; import { defineComponent, ref, inject, computed, onBeforeMount, onBeforeUnmount } from 'vue'; -import { Screen } from 'quasar'; +import { Screen, Platform } from 'quasar'; import config from 'src/config'; import { useRouter } from 'vue-router'; import { useMainStore } from '@flaschengeist/api'; @@ -105,7 +105,19 @@ export default defineComponent({ const router = useRouter(); const mainStore = useMainStore(); const flaschengeist = inject('flaschengeist'); - const leftDrawer = ref(false); + const _leftDrawer = ref(); + const leftDrawer = computed({ + get: () => { + if (_leftDrawer.value !== undefined) { + return _leftDrawer.value + } + if (Platform.is.mobile) { + return false + } + return true + }, + set: (val) => _leftDrawer.value = val + }) const leftDrawerMini = ref(false); const mainLinks = flaschengeist?.menuLinks || []; const notifications = computed(() => mainStore.notifications.slice().reverse()); From 04e3c573972ce2703719900f003192b09696bd38 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sun, 21 Nov 2021 11:19:08 +0100 Subject: [PATCH 2/5] [clean] Replace unneeded computed with initialized ref --- src/layouts/MainLayout.vue | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index 1bf641b..889a6a5 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -105,19 +105,7 @@ export default defineComponent({ const router = useRouter(); const mainStore = useMainStore(); const flaschengeist = inject('flaschengeist'); - const _leftDrawer = ref(); - const leftDrawer = computed({ - get: () => { - if (_leftDrawer.value !== undefined) { - return _leftDrawer.value - } - if (Platform.is.mobile) { - return false - } - return true - }, - set: (val) => _leftDrawer.value = val - }) + const leftDrawer = ref(!Platform.is.mobile); const leftDrawerMini = ref(false); const mainLinks = flaschengeist?.menuLinks || []; const notifications = computed(() => mainStore.notifications.slice().reverse()); From 1158525abb0e8830f2d901975e7cdc251f489ec5 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sun, 21 Nov 2021 15:08:58 +0100 Subject: [PATCH 3/5] [api] Add clone function to utils --- api/index.ts | 1 + api/src/utils/misc.ts | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 api/src/utils/misc.ts diff --git a/api/index.ts b/api/index.ts index b01a54d..a70c36a 100644 --- a/api/index.ts +++ b/api/index.ts @@ -5,3 +5,4 @@ export * from './src/stores/'; export * from './src/utils/datetime'; export * from './src/utils/permission'; export * from './src/utils/validators'; +export * from './src/utils/misc'; diff --git a/api/src/utils/misc.ts b/api/src/utils/misc.ts new file mode 100644 index 0000000..e626b90 --- /dev/null +++ b/api/src/utils/misc.ts @@ -0,0 +1,3 @@ +export function clone(o: T): T { + return JSON.parse(JSON.stringify(o)); +} From f4650ffdeba2ff7f6b1aa5cb849437d1144eca88 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sun, 21 Nov 2021 15:11:25 +0100 Subject: [PATCH 4/5] [api] update dependencies + new release --- api/package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/package.json b/api/package.json index 21bf47b..b82d9b4 100644 --- a/api/package.json +++ b/api/package.json @@ -1,6 +1,6 @@ { "license": "MIT", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.4", "name": "@flaschengeist/api", "author": "Tim Gröger ", "homepage": "https://flaschengeist.dev/Flaschengeist", @@ -14,18 +14,18 @@ }, "main": "./src/index.ts", "peerDependencies": { - "@quasar/app": "^3.2.2", + "@quasar/app": "^3.2.3", "flaschengeist": "^2.0.0-alpha.1", - "pinia": "^2.0.3" + "pinia": "^2.0.4" }, "devDependencies": { "@flaschengeist/types": "^1.0.0-alpha.5", "@types/node": "^12.20.37", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", - "eslint": "^8.2.0", + "eslint": "^8.3.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-vue": "^8.0.3", + "eslint-plugin-vue": "^8.1.1", "eslint-webpack-plugin": "^3.1.1", "prettier": "^2.4.1", "typescript": "^4.4.4" From 42800a9d9988385f886e0acbeac140d9a0615392 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sun, 21 Nov 2021 15:31:02 +0100 Subject: [PATCH 5/5] [deps] Update dependencies, node 12 is close to unmaintained --- package.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 10e3ad7..b11ca5d 100644 --- a/package.json +++ b/package.json @@ -19,25 +19,25 @@ "@flaschengeist/users": "^1.0.0-alpha.1", "axios": "^0.24.0", "cordova": "^10.0.0", - "pinia": "^2.0.3", - "quasar": "^2.3.2" + "pinia": "^2.0.4", + "quasar": "^2.3.3" }, "devDependencies": { "@flaschengeist/types": "^1.0.0-alpha.5", - "@quasar/app": "^3.2.2", - "@quasar/extras": "^1.12.0", - "@types/node": "^12.20.37", + "@quasar/app": "^3.2.3", + "@quasar/extras": "^1.12.1", + "@types/node": "^14.17.34", "@types/webpack": "^5.28.0", "@types/webpack-env": "^1.16.3", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", - "eslint": "^8.2.0", + "eslint": "^8.3.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-vue": "^8.0.3", + "eslint-plugin-vue": "^8.1.1", "eslint-webpack-plugin": "^3.1.1", "modify-source-webpack-plugin": "^3.0.0", "prettier": "^2.4.1", - "typescript": "^4.4.4", + "typescript": "^4.5.2", "vuedraggable": "^4.1.0" }, "prettier": { @@ -57,8 +57,8 @@ "last 6 iOS versions" ], "engines": { - "node": ">= 12.22.1", + "node": ">= 14.18.1", "npm": ">= 6.14.12", - "yarn": ">= 1.21.1" + "yarn": ">= 1.22.0" } }