mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-03-01 11:34:13 +08:00
19 lines
686 B
Go
19 lines
686 B
Go
![]() |
import { GlobalStore } from '@/store';
|
||
|
const globalStore = GlobalStore();
|
||
|
|
||
|
export function resetXSetting() {
|
||
|
globalStore.themeConfig.title = '';
|
||
|
globalStore.themeConfig.logo = '';
|
||
|
globalStore.themeConfig.logoWithText = '';
|
||
|
globalStore.themeConfig.favicon = '';
|
||
|
}
|
||
|
|
||
|
export function initFavicon() {
|
||
|
let favicon = globalStore.themeConfig.favicon;
|
||
|
const link = (document.querySelector("link[rel*='icon']") || document.createElement('link')) as HTMLLinkElement;
|
||
|
link.type = 'image/x-icon';
|
||
|
link.rel = 'shortcut icon';
|
||
|
link.href = favicon ? '/api/v1/images/favicon' : '/public/favicon.png';
|
||
|
document.getElementsByTagName('head')[0].appendChild(link);
|
||
|
}
|