From ce67fb5964e6aa9466e6f6ca5912a87564412c48 Mon Sep 17 00:00:00 2001 From: Kloon ImKloon Date: Mon, 4 Sep 2023 12:15:39 +0200 Subject: [PATCH] Fix errors in settings and shares --- frontend/src/components/prompts/Share.vue | 2 +- frontend/src/main.js | 4 ++-- frontend/src/stores/auth.js | 3 ++- frontend/src/views/Share.vue | 4 ++-- frontend/src/views/settings/Global.vue | 14 ++++++++++++-- frontend/src/views/settings/Profile.vue | 1 + frontend/src/views/settings/User.vue | 14 ++++++++++++-- 7 files changed, 32 insertions(+), 10 deletions(-) diff --git a/frontend/src/components/prompts/Share.vue b/frontend/src/components/prompts/Share.vue index ee01ecad..fee1f2af 100644 --- a/frontend/src/components/prompts/Share.vue +++ b/frontend/src/components/prompts/Share.vue @@ -145,7 +145,7 @@ export default { listing: true, }; }, - inject: ["$showError"], + inject: ["$showError", "$showSuccess"], computed: { ...mapState(useFileStore, [ "req", diff --git a/frontend/src/main.js b/frontend/src/main.js index 322c017b..cc019092 100644 --- a/frontend/src/main.js +++ b/frontend/src/main.js @@ -1,5 +1,5 @@ import { disableExternal } from "@/utils/constants"; -import { createApp } from "vue"; +import { createApp, configureCompat } from "vue"; import Noty from "noty"; import VueLazyload from "vue-lazyload"; import createPinia from "@/stores"; @@ -7,7 +7,7 @@ import router from "@/router"; import i18n from "@/i18n"; import App from "@/App.vue"; -// import "core-js/actual/structured-clone"; +configureCompat({ RENDER_FUNCTION: false }); import dayjs from "dayjs"; import localizedFormat from "dayjs/plugin/localizedFormat"; diff --git a/frontend/src/stores/auth.js b/frontend/src/stores/auth.js index 533af927..7b57ef27 100644 --- a/frontend/src/stores/auth.js +++ b/frontend/src/stores/auth.js @@ -1,6 +1,7 @@ import { defineStore } from "pinia"; import dayjs from "dayjs"; import i18n, { detectLocale } from "@/i18n"; +import { cloneDeep } from "lodash-es"; export const useAuthStore = defineStore("auth", { // convert to a function @@ -35,7 +36,7 @@ export const useAuthStore = defineStore("auth", { i18n.global.locale.value = locale; } - this.user[field] = structuredClone(value[field]); + this.user[field] = cloneDeep(value[field]); } }, // easily reset state using `$reset` diff --git a/frontend/src/views/Share.vue b/frontend/src/views/Share.vue index bc0d1eca..6434f00a 100644 --- a/frontend/src/views/Share.vue +++ b/frontend/src/views/Share.vue @@ -113,7 +113,7 @@
- +
{{ $t("settings.branding") }} - +