mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Add theme logo option (#4996)
This commit is contained in:
parent
5b199169b9
commit
1d1246eb4a
@ -60,6 +60,10 @@ const options = defineOptionsMetadata({
|
|||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
displayName: '使用季节 Logo',
|
displayName: '使用季节 Logo',
|
||||||
},
|
},
|
||||||
|
themeLogo: {
|
||||||
|
defaultValue: true,
|
||||||
|
displayName: '使用主题色 Logo',
|
||||||
|
},
|
||||||
touch: {
|
touch: {
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
displayName: '触摸模式',
|
displayName: '触摸模式',
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="custom-navbar-logo-container">
|
<div class="custom-navbar-logo-container">
|
||||||
<VIcon v-if="!seasonLogoUrl" icon="logo" class="custom-navbar-logo"></VIcon>
|
<VIcon
|
||||||
|
v-if="!seasonLogoUrl"
|
||||||
|
icon="logo"
|
||||||
|
class="custom-navbar-logo"
|
||||||
|
:class="{ theme: useThemeColor }"
|
||||||
|
></VIcon>
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else
|
||||||
class="custom-navbar-logo season"
|
class="custom-navbar-logo season"
|
||||||
@ -22,6 +27,7 @@ export default Vue.extend({
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
seasonLogoUrl: '',
|
seasonLogoUrl: '',
|
||||||
|
useThemeColor: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -46,6 +52,13 @@ export default Vue.extend({
|
|||||||
},
|
},
|
||||||
true,
|
true,
|
||||||
)
|
)
|
||||||
|
addComponentListener(
|
||||||
|
'customNavbar.themeLogo',
|
||||||
|
async (value: boolean) => {
|
||||||
|
this.useThemeColor = value
|
||||||
|
},
|
||||||
|
true,
|
||||||
|
)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
@ -63,9 +76,15 @@ export default Vue.extend({
|
|||||||
width: calc(var(--navbar-height) * 1.3);
|
width: calc(var(--navbar-height) * 1.3);
|
||||||
}
|
}
|
||||||
.custom-navbar-logo {
|
.custom-navbar-logo {
|
||||||
.custom-navbar:not(.fill) & {
|
.custom-navbar:not(.fill) &:not(.season) {
|
||||||
&:not(.season) {
|
body.dark & {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
&.theme {
|
||||||
color: var(--theme-color);
|
color: var(--theme-color);
|
||||||
|
body.dark & {
|
||||||
|
color: var(--theme-color);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.be-icon {
|
&.be-icon {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user