From b7efd1ebf4730d07bb5ba18a361b9d84b8790b42 Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 3 Jan 2023 15:00:50 +0100 Subject: [PATCH] Updated sintax --- src/components/UserPanel.vue | 50 +++++++++++++++++++++++++---------- src/pages/Login/LoginMain.vue | 8 ++++-- 2 files changed, 42 insertions(+), 16 deletions(-) diff --git a/src/components/UserPanel.vue b/src/components/UserPanel.vue index 32806e4b3..56c574c70 100644 --- a/src/components/UserPanel.vue +++ b/src/components/UserPanel.vue @@ -25,12 +25,12 @@ const userLocale = computed({ // FIXME: Dynamic imports from absolute paths are not compatible with vite: // https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations try { - const langList = import.meta.glob('../../node_modules/quasar/lang/*.mjs') - langList[`../../node_modules/quasar/lang/${value}.mjs`]().then(lang => { - Quasar.lang.set(lang.default) - }) + const langList = import.meta.glob('../../node_modules/quasar/lang/*.mjs'); + langList[`../../node_modules/quasar/lang/${value}.mjs`]().then((lang) => { + Quasar.lang.set(lang.default); + }); } catch (error) { - + // } }, }); @@ -88,19 +88,33 @@ function logout() {
{{ t('components.userPanel.settings') }}
- - + +
- +
@@ -108,8 +122,16 @@ function logout() {
@{{ user.name }}
- +
diff --git a/src/pages/Login/LoginMain.vue b/src/pages/Login/LoginMain.vue index 7b0c931c3..86d1c3170 100644 --- a/src/pages/Login/LoginMain.vue +++ b/src/pages/Login/LoginMain.vue @@ -28,7 +28,9 @@ const userLocale = computed({ langList[`../../node_modules/quasar/lang/${value}.mjs`]().then((lang) => { Quasar.lang.set(lang.default); }); - } catch (error) {} + } catch (error) { + // + } }, }); @@ -67,7 +69,9 @@ async function onSubmit() { } else { router.push({ name: 'Dashboard' }); } - } catch (error) {} + } catch (error) { + // + } }