From f6086b5e2377690daff0d4c8ae1e334a1ac5a921 Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Mon, 23 Dec 2024 21:12:13 +0100 Subject: Restore more logic from main branch --- src-vue/src/App.vue | 34 ++++++++++- src-vue/src/components/NotificationButton.vue | 81 +++++++++++++++++++++++++++ 2 files changed, 113 insertions(+), 2 deletions(-) create mode 100644 src-vue/src/components/NotificationButton.vue diff --git a/src-vue/src/App.vue b/src-vue/src/App.vue index 411dd10e..97b20562 100644 --- a/src-vue/src/App.vue +++ b/src-vue/src/App.vue @@ -7,6 +7,7 @@ import SettingsView from './views/SettingsView.vue'; import { ref } from "vue"; import { store } from './plugins/store'; import { invoke } from "@tauri-apps/api/core"; +import NotificationButton from "./components/NotificationButton.vue"; const greetMsg = ref(""); const name = ref(""); @@ -18,6 +19,11 @@ async function greet() { export default { components: { + ChangelogView, + DeveloperView, + PlayView, + SettingsView, + ModsView }, data() { return {} @@ -25,6 +31,8 @@ export default { mounted: async function() { // Initialize interface language + let lang = "en" + this.$root!.$i18n.locale = lang; }, methods: { close() { @@ -32,6 +40,11 @@ export default { } }, computed: { + bgStyle(): string { + // @ts-ignore + const shouldBlur = this.$route.path !== "/"; + return `filter: brightness(0.8) ${shouldBlur ? 'blur(5px)' : ''};`; + } } } @@ -42,9 +55,26 @@ export default { -
-

Click on the Tauri, Vite, and Vue logos to learn more.

diff --git a/src-vue/src/components/NotificationButton.vue b/src-vue/src/components/NotificationButton.vue new file mode 100644 index 00000000..3835032d --- /dev/null +++ b/src-vue/src/components/NotificationButton.vue @@ -0,0 +1,81 @@ + + + + + -- cgit v1.2.3