Upgrade Quasar

This commit is contained in:
2024-05-06 19:22:28 -04:00
parent 2872fb867e
commit 033993b1b8
6 changed files with 31 additions and 42 deletions

View File

@@ -20,8 +20,8 @@
"vue-router": "4"
},
"devDependencies": {
"@quasar/app-vite": "^1.7.4",
"@quasar/quasar-app-extension-qcalendar": "^4.0.0-beta.15",
"@quasar/app-vite": "^1.9.1",
"@quasar/quasar-app-extension-qcalendar": "^4.0.0-beta.16",
"@types/node": "^12.20.21",
"@typescript-eslint/eslint-plugin": "^5.10.0",
"@typescript-eslint/parser": "^5.10.0",
@@ -31,7 +31,7 @@
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-vue": "^9.0.0",
"prettier": "^2.5.1",
"quasar": "^2.15.2",
"quasar": "^2.16.0",
"typescript": "~5.3.0",
"vite-plugin-checker": "^0.6.4",
"vue-tsc": "^1.8.22",

View File

@@ -3,20 +3,9 @@
</template>
<script setup lang="ts">
import { defineComponent, onMounted } from 'vue';
import { useBoatStore } from './stores/boat';
import { useScheduleStore } from './stores/schedule';
import { useAuthStore } from './stores/auth';
import { defineComponent } from 'vue';
defineComponent({
name: 'OYS Borrow-a-Boat',
});
onMounted(async () => {
if (useAuthStore().currentUser) {
await useBoatStore().fetchBoats();
await useScheduleStore().fetchTimeBlocks();
await useScheduleStore().fetchTimeBlockTemplates();
}
});
</script>

View File

@@ -55,10 +55,15 @@
import {QCalendarScheduler, today} from '@quasar/quasar-ui-qcalendar'
import { useBoatStore } from 'src/stores/boat';
import { useScheduleStore } from 'src/stores/schedule';
import { ref } from 'vue';
import { onMounted, ref } from 'vue';
const selectedDate = ref(today())
const scheduleStore = useScheduleStore()
const resources = useBoatStore().boats
const boatStore = useBoatStore()
const resources = boatStore.boats
const timeblockTemplates = scheduleStore.timeblockTemplates
onMounted(async() => {
await boatStore.fetchBoats();
await scheduleStore.fetchTimeBlockTemplates();
await scheduleStore.fetchTimeBlockTemplates()})
</script>

View File

@@ -38,9 +38,6 @@ export default route(function (/* { store, ssrContext } */) {
Router.beforeEach((to) => {
const auth = useAuthStore();
if (!auth.ready) {
return false;
}
if (auth.currentUser) {
return to.meta.accountRoute ? { name: 'index' } : true;
} else {

View File

@@ -5,7 +5,6 @@ import { ref } from 'vue';
export const useAuthStore = defineStore('auth', () => {
const currentUser = ref<Models.User<Models.Preferences> | null>(null);
const ready = ref(false);
async function init() {
try {
@@ -13,7 +12,6 @@ export const useAuthStore = defineStore('auth', () => {
} catch {
currentUser.value = null;
}
ready.value = true;
}
async function register(email: string, password: string) {
@@ -37,5 +35,5 @@ export const useAuthStore = defineStore('auth', () => {
return account.deleteSession('current').then((currentUser.value = null));
}
return { currentUser, register, login, googleLogin, logout, init, ready };
return { currentUser, register, login, googleLogin, logout, init };
});

View File

@@ -1077,13 +1077,13 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"
"@quasar/app-vite@^1.7.4":
version "1.8.5"
resolved "https://registry.yarnpkg.com/@quasar/app-vite/-/app-vite-1.8.5.tgz#f4345be5f22c9a5309ec98b40b5ca56e2e376f90"
integrity sha512-OB5nU9qKIl3p7Ton9fLWkSQTv1I/7slfQl8izhZPPJZRY755Jn4Kz1exYUoEgJJ4cLSaUI/cpnVOL59pw53NEg==
"@quasar/app-vite@^1.9.1":
version "1.9.1"
resolved "https://registry.yarnpkg.com/@quasar/app-vite/-/app-vite-1.9.1.tgz#eb5a5e3fbc4bccf866c5555513df1fd986cb497d"
integrity sha512-IC50irZQ3kPhyhdjG15+GRav4KOMN82uesApIg91HlxdMrLNw4FJrFbwVsRgJfFjS1dT1h2qK3bhYICb8goECg==
dependencies:
"@quasar/render-ssr-error" "^1.0.3"
"@quasar/vite-plugin" "^1.3.3"
"@quasar/vite-plugin" "^1.7.0"
"@rollup/pluginutils" "^4.1.2"
"@types/chrome" "^0.0.208"
"@types/compression" "^1.7.2"
@@ -1122,14 +1122,14 @@
resolved "https://registry.yarnpkg.com/@quasar/extras/-/extras-1.16.11.tgz#84b1efb9097a6e58c3ebfdd5da83ac658056a35c"
integrity sha512-sbTBHOA+Hi7ah0P6qSm+xfRXqwJ94ct3NKA3Lkq3iNPYuHD7VXbSWtP2eA7Cu9Fd0WjVoPbngf6yFGg46U3IfQ==
"@quasar/quasar-app-extension-qcalendar@^4.0.0-beta.15":
version "4.0.0-beta.15"
resolved "https://registry.yarnpkg.com/@quasar/quasar-app-extension-qcalendar/-/quasar-app-extension-qcalendar-4.0.0-beta.15.tgz#1e85626a104c3a33083b7237f50ccf5f9048926a"
integrity sha512-i6hQkcP70LXLfVMPZMKQjSg3681gjZmASV3vq6ULzc0LhtBiPneLdVNNtH2itkWxAmaUj+1heQDI5Pa0F7VKLQ==
"@quasar/quasar-app-extension-qcalendar@^4.0.0-beta.16":
version "4.0.0-beta.16"
resolved "https://registry.yarnpkg.com/@quasar/quasar-app-extension-qcalendar/-/quasar-app-extension-qcalendar-4.0.0-beta.16.tgz#5b0bdfb04db59cf6017892ff91563dd9759c7bb5"
integrity sha512-Rj3KKjPFrE13cswlZAPcqdqi1YH9CeHMpWIw8xsNqdLhCoaRhMGbRas9fvHFLJOXpnsDaVwWINNgN/bBUyn99w==
dependencies:
"@quasar/quasar-ui-qcalendar" "^4.0.0-beta.15"
"@quasar/quasar-ui-qcalendar" "^4.0.0-beta.16"
"@quasar/quasar-ui-qcalendar@^4.0.0-beta.15":
"@quasar/quasar-ui-qcalendar@^4.0.0-beta.16":
version "4.0.0-beta.16"
resolved "https://registry.yarnpkg.com/@quasar/quasar-ui-qcalendar/-/quasar-ui-qcalendar-4.0.0-beta.16.tgz#90dca0962f1fe1068361f387893df6c5da7522e2"
integrity sha512-KVbFJD1HQp91tiklv+6XsG7bq8FKK6mhhnoVzmjgoyhUAEb9csfbDPbpegy1/FzXy3o0wITe6mmRZ8nbaiMEZg==
@@ -1141,10 +1141,10 @@
dependencies:
stack-trace "^1.0.0-pre2"
"@quasar/vite-plugin@^1.3.3":
version "1.6.0"
resolved "https://registry.yarnpkg.com/@quasar/vite-plugin/-/vite-plugin-1.6.0.tgz#3b8f82656b14782fafe66b30dfac0775b87ab9dd"
integrity sha512-LmbV76G1CwWZbrEQhqyZpkRQTJyO3xpW55aXY1zWN+JhyUeG77CcMCEWteBVnJ6I6ehUPFDC9ONd2+WlwH6rNQ==
"@quasar/vite-plugin@^1.7.0":
version "1.7.0"
resolved "https://registry.yarnpkg.com/@quasar/vite-plugin/-/vite-plugin-1.7.0.tgz#8873391ed7f69677948180f6eb14aa0821747478"
integrity sha512-ia4w1n4DuPYm92MQLPNpMqLJID1WGGRyVGxkVeg8V+V25Vh3p9QBo++iuXR4sW/bCmzzx66Ko6VStsr1zp90GQ==
"@rollup/plugin-babel@^5.2.0":
version "5.3.1"
@@ -4291,10 +4291,10 @@ qs@6.11.0:
dependencies:
side-channel "^1.0.4"
quasar@^2.15.2:
version "2.15.4"
resolved "https://registry.yarnpkg.com/quasar/-/quasar-2.15.4.tgz#764bd886671f98d75f682b1df917adaf7dc4a849"
integrity sha512-6Rtj0KrsVA0IV9zMZ6R7U7hOpwLS/6E06hsISVHRPn21KEm3XAwHdvy9xWz5kwqWraHRlcisFSDu/KPL4VQK1w==
quasar@^2.16.0:
version "2.16.0"
resolved "https://registry.yarnpkg.com/quasar/-/quasar-2.16.0.tgz#c168a3a135fb67c39bd1e8e5fa82880a7dd2a412"
integrity sha512-j0MSuGuIAOQdtg/zEn/7jMIZjqS00Kp4t4h/0+HCqEkf6mxtwOJoaC7s0rIC+6AVYIErCTiXrp7Hmkt32Hom1w==
queue-microtask@^1.2.2:
version "1.2.3"