mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-23 18:49:21 +08:00
parent
bfa667584a
commit
7aad2cf4af
@ -15,6 +15,6 @@ export const useLogo = async () => {
|
||||
const link = (document.querySelector("link[rel*='icon']") || document.createElement('link')) as HTMLLinkElement;
|
||||
link.type = 'image/x-icon';
|
||||
link.rel = 'shortcut icon';
|
||||
link.href = globalStore.themeConfig.favicon ? '/api/v1/images/favicon' : '/public/favicon.png';
|
||||
link.href = globalStore.themeConfig.favicon ? `/api/v1/images/favicon?t=${Date.now()}` : '/public/favicon.png';
|
||||
document.getElementsByTagName('head')[0].appendChild(link);
|
||||
};
|
||||
|
@ -1,13 +1,18 @@
|
||||
<template>
|
||||
<div class="logo" style="cursor: pointer" @click="goHome">
|
||||
<template v-if="isCollapse">
|
||||
<img v-if="globalStore.themeConfig.logo" :src="'/api/v1/images/logo'" style="cursor: pointer" alt="logo" />
|
||||
<img
|
||||
v-if="globalStore.themeConfig.logo"
|
||||
:src="`/api/v1/images/logo?t=${Date.now()}`"
|
||||
style="cursor: pointer"
|
||||
alt="logo"
|
||||
/>
|
||||
<MenuLogo v-else />
|
||||
</template>
|
||||
<template v-else>
|
||||
<img
|
||||
v-if="globalStore.themeConfig.logoWithText"
|
||||
:src="'/api/v1/images/logoWithText'"
|
||||
:src="`/api/v1/images/logoWithText?t=${Date.now()}`"
|
||||
style="cursor: pointer"
|
||||
alt="logo"
|
||||
/>
|
||||
|
@ -32,9 +32,9 @@ export function initFavicon() {
|
||||
</svg>
|
||||
`;
|
||||
goldLink = `data:image/svg+xml,${encodeURIComponent(svg)}`;
|
||||
link.href = favicon ? '/api/v1/images/favicon' : goldLink;
|
||||
link.href = favicon ? `/api/v1/images/favicon?t=${Date.now()}` : goldLink;
|
||||
} else {
|
||||
link.href = favicon ? '/api/v1/images/favicon' : '/public/favicon.png';
|
||||
link.href = favicon ? `/api/v1/images/favicon?t=${Date.now()}` : '/public/favicon.png';
|
||||
}
|
||||
document.head.appendChild(link);
|
||||
}
|
||||
|
@ -4,7 +4,11 @@
|
||||
<template #main>
|
||||
<div style="text-align: center; margin-top: 20px">
|
||||
<div style="justify-self: center" class="logo">
|
||||
<img v-if="globalStore.themeConfig.logo" style="width: 80px" :src="'/api/v1/images/logo'" />
|
||||
<img
|
||||
v-if="globalStore.themeConfig.logo"
|
||||
style="width: 80px"
|
||||
:src="`/api/v1/images/logo?t=${Date.now()}`"
|
||||
/>
|
||||
<PrimaryLogo v-else />
|
||||
</div>
|
||||
<h3 class="description">{{ globalStore.themeConfig.title || $t('setting.description') }}</h3>
|
||||
|
Loading…
Reference in New Issue
Block a user