feat: add ANNOUNCEMENT (#357)

This commit is contained in:
Dream Hunter
2024-07-22 13:01:38 +08:00
committed by GitHub
parent 384eb9b041
commit 60dda7e3fe
11 changed files with 29 additions and 6 deletions

View File

@@ -1,13 +1,15 @@
import { ref } from "vue";
import { createGlobalState, useStorage, useDark, useToggle } from '@vueuse/core'
import { createGlobalState, useStorage, useDark, useToggle, useLocalStorage } from '@vueuse/core'
export const useGlobalState = createGlobalState(
() => {
const isDark = useDark()
const toggleDark = useToggle(isDark)
const loading = ref(false);
const announcement = useLocalStorage('announcement', '');
const openSettings = ref({
title: '',
announcement: '',
prefix: '',
needAuth: false,
adminContact: '',
@@ -83,6 +85,7 @@ export const useGlobalState = createGlobalState(
loading,
settings,
sendMailModel,
announcement,
openSettings,
showAuth,
showAddressCredential,