mirror of
https://gitee.com/fit2cloud-feizhiyun/1Panel.git
synced 2024-12-02 03:48:02 +08:00
style: 调整 Logo 样式 (#4357)
This commit is contained in:
parent
1527c63d37
commit
471b7d9657
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-model="open" :close-on-click-modal="false" @close="handleClose">
|
||||
<div style="text-align: center">
|
||||
<div style="text-align: center" v-loading="loading">
|
||||
<span class="text-3xl font-medium">{{ $t('license.levelUpPro') }}</span>
|
||||
<el-row type="flex" justify="center" class="mt-6">
|
||||
<el-col :span="22">
|
||||
|
@ -1458,7 +1458,7 @@ const message = {
|
||||
|
||||
license: 'License',
|
||||
},
|
||||
License: {
|
||||
license: {
|
||||
community: 'Community Edition',
|
||||
pro: 'Professional Edition',
|
||||
trial: 'Trial Edition',
|
||||
|
@ -1358,7 +1358,7 @@ const message = {
|
||||
|
||||
license: '許可證',
|
||||
},
|
||||
License: {
|
||||
license: {
|
||||
community: '社區版',
|
||||
pro: '專業版',
|
||||
trial: '試用版',
|
||||
|
@ -36,7 +36,7 @@ const getLogoUrl = (isCollapse: boolean) => {
|
||||
img {
|
||||
object-fit: contain;
|
||||
width: 95%;
|
||||
height: 40px;
|
||||
height: 50px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -75,7 +75,6 @@ const loadDataFromDB = async () => {
|
||||
|
||||
const loadDataFromXDB = async () => {
|
||||
const res = await searchXSetting();
|
||||
localStorage.setItem('1p-favicon', res.data.logo);
|
||||
globalStore.themeConfig.title = res.data.title;
|
||||
globalStore.themeConfig.logo = res.data.logo;
|
||||
globalStore.themeConfig.logoWithText = res.data.logoWithText;
|
||||
@ -110,7 +109,7 @@ const updateDarkMode = async (event: MediaQueryListEvent) => {
|
||||
};
|
||||
|
||||
const initFavicon = () => {
|
||||
let favicon = localStorage.getItem('1p-favicon');
|
||||
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';
|
||||
|
@ -319,9 +319,19 @@ const loadLanguage = async () => {
|
||||
} catch (error) {}
|
||||
};
|
||||
|
||||
const loadFavicon = () => {
|
||||
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);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
globalStore.isOnRestart = false;
|
||||
loginVerify();
|
||||
loadFavicon();
|
||||
loadLanguage();
|
||||
document.title = globalStore.themeConfig.panelName;
|
||||
loginForm.agreeLicense = globalStore.agreeLicense;
|
||||
|
Loading…
Reference in New Issue
Block a user