mirror of
https://github.com/hi2shark/nazhua.git
synced 2026-01-18 18:20:44 +08:00
Compare commits
3 Commits
7a2e22c30c
...
718b0138b0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
718b0138b0 | ||
|
|
c835cec98c | ||
|
|
61fe45927e |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nazhua",
|
"name": "nazhua",
|
||||||
"version": "0.4.24",
|
"version": "0.4.25",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@ -318,6 +318,7 @@ const dashboardUrl = computed(() => config.nazhua.v1DashboardUrl || '/dashboard'
|
|||||||
.site-name {
|
.site-name {
|
||||||
line-height: calc(var(--layout-header-height) - 20px);
|
line-height: calc(var(--layout-header-height) - 20px);
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
|
font-weight: bold;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-shadow: 2px 2px 4px rgba(#000, 0.5);
|
text-shadow: 2px 2px 4px rgba(#000, 0.5);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|||||||
@ -41,7 +41,11 @@ const routerOptions = {
|
|||||||
const router = createRouter(routerOptions);
|
const router = createRouter(routerOptions);
|
||||||
|
|
||||||
router.beforeResolve((to, from, next) => {
|
router.beforeResolve((to, from, next) => {
|
||||||
pageTitle(to?.meta?.title);
|
if (to?.meta?.title) {
|
||||||
|
pageTitle(to?.meta?.title);
|
||||||
|
} else if (to.name === 'Home') {
|
||||||
|
pageTitle(config.nazhua.title);
|
||||||
|
}
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -11,5 +11,6 @@ export default (app) => {
|
|||||||
app.use(store);
|
app.use(store);
|
||||||
app.component('DotDotBox', DotDotBox);
|
app.component('DotDotBox', DotDotBox);
|
||||||
|
|
||||||
|
app.config.globalProperties.$hasSarasaTerm = !import.meta.env.VITE_DISABLE_SARASA_TERM_SC;
|
||||||
app.config.globalProperties.$config = config;
|
app.config.globalProperties.$config = config;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import config from '@/config';
|
import config from '@/config';
|
||||||
|
|
||||||
export default (...args) => {
|
export default (...args) => {
|
||||||
document.title = [...args, config.nazhua.title].filter((i) => i).join(' - ');
|
const titles = [...new Set([...args, config.nazhua.title])].filter((i) => i);
|
||||||
|
document.title = titles.join(' - ');
|
||||||
};
|
};
|
||||||
|
|||||||
@ -144,6 +144,7 @@ const platformLogoIconClassName = computed(() => hostUtils.getPlatformLogoIconCl
|
|||||||
.server-name {
|
.server-name {
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
|
font-weight: bold;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,6 +157,7 @@ const platformLogoIconClassName = computed(() => hostUtils.getPlatformLogoIconCl
|
|||||||
.core-mem {
|
.core-mem {
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 500px) {
|
@media screen and (max-width: 500px) {
|
||||||
|
|||||||
@ -36,6 +36,9 @@
|
|||||||
v-for="(tagItem, index) in tagList"
|
v-for="(tagItem, index) in tagList"
|
||||||
:key="`${tagItem}_${index}`"
|
:key="`${tagItem}_${index}`"
|
||||||
class="tag-item"
|
class="tag-item"
|
||||||
|
:class="{
|
||||||
|
'has-sarasa-term': $hasSarasaTerm,
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
{{ tagItem }}
|
{{ tagItem }}
|
||||||
</span>
|
</span>
|
||||||
@ -184,12 +187,16 @@ const show = computed(() => {
|
|||||||
.tag-item {
|
.tag-item {
|
||||||
height: 18px;
|
height: 18px;
|
||||||
padding: 0 4px;
|
padding: 0 4px;
|
||||||
line-height: 20px;
|
line-height: 18px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: var(--public-note-tag-color);
|
color: var(--public-note-tag-color);
|
||||||
background: var(--public-note-tag-bg);
|
background: var(--public-note-tag-bg);
|
||||||
text-shadow: 1px 1px 2px rgba(#000, 0.2);
|
text-shadow: 1px 1px 2px rgba(#000, 0.2);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
|
||||||
|
&.has-sarasa-term {
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -167,6 +167,7 @@ function openDetail() {
|
|||||||
height: 30px;
|
height: 30px;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cpu-mem-group {
|
.cpu-mem-group {
|
||||||
@ -178,6 +179,7 @@ function openDetail() {
|
|||||||
.core-mem {
|
.core-mem {
|
||||||
height: 30px;
|
height: 30px;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -130,9 +130,9 @@ function handleWorldMapWidth() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(() => info.value, () => {
|
watch(() => info.value, (oldValue, newValue) => {
|
||||||
if (info.value) {
|
if (!oldValue && newValue && router.currentRoute.value.name === 'ServerDetail') {
|
||||||
pageTitle(info.value?.Name, '节点详情');
|
pageTitle(newValue?.Name, '节点详情');
|
||||||
handleWorldMapWidth();
|
handleWorldMapWidth();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user