feat: fetch option
This commit is contained in:
parent
e07f764bf6
commit
536a5626be
1 changed files with 6 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ import CanvasComponent from 'components/CanvasComponent.vue';
|
||||||
import ProfileMenu from 'components/ProfileMenu.vue';
|
import ProfileMenu from 'components/ProfileMenu.vue';
|
||||||
import useUserStore from 'src/stores/user';
|
import useUserStore from 'src/stores/user';
|
||||||
import FormDialog from 'src/components/FormDialog.vue';
|
import FormDialog from 'src/components/FormDialog.vue';
|
||||||
|
import useOptionStore from 'src/stores/options';
|
||||||
import { Option } from 'src/stores/user/types';
|
import { Option } from 'src/stores/user/types';
|
||||||
import { dialog } from 'src/stores/utils';
|
import { dialog } from 'src/stores/utils';
|
||||||
import { setLocale } from 'src/utils/datetime';
|
import { setLocale } from 'src/utils/datetime';
|
||||||
|
|
@ -37,6 +38,7 @@ interface Notification {
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const loaderStore = useLoader();
|
const loaderStore = useLoader();
|
||||||
|
const optionStore = useOptionStore();
|
||||||
|
|
||||||
const { visible } = storeToRefs(loaderStore);
|
const { visible } = storeToRefs(loaderStore);
|
||||||
const { locale } = useI18n({ useScope: 'global' });
|
const { locale } = useI18n({ useScope: 'global' });
|
||||||
|
|
@ -140,6 +142,9 @@ onMounted(async () => {
|
||||||
setLocale('th');
|
setLocale('th');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const resultOption = await fetch('/option/option.json');
|
||||||
|
optionStore.globalOption = await resultOption.json();
|
||||||
|
|
||||||
const user = getUsername();
|
const user = getUsername();
|
||||||
const uid = getUserId();
|
const uid = getUserId();
|
||||||
|
|
||||||
|
|
@ -350,7 +355,7 @@ onMounted(async () => {
|
||||||
v-model:modal="canvasModal"
|
v-model:modal="canvasModal"
|
||||||
:title="$t('addSignature')"
|
:title="$t('addSignature')"
|
||||||
no-app-box
|
no-app-box
|
||||||
:max-width="80"
|
max-width="80%"
|
||||||
>
|
>
|
||||||
<CanvasComponent ref="canvasRef" v-model:modal="canvasModal" />
|
<CanvasComponent ref="canvasRef" v-model:modal="canvasModal" />
|
||||||
<template #footer>
|
<template #footer>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue