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
@ -58,7 +58,11 @@ const options = defineOptionsMetadata({
|
||||
},
|
||||
seasonLogo: {
|
||||
defaultValue: false,
|
||||
displayName: '使用季节Logo',
|
||||
displayName: '使用季节 Logo',
|
||||
},
|
||||
themeLogo: {
|
||||
defaultValue: true,
|
||||
displayName: '使用主题色 Logo',
|
||||
},
|
||||
touch: {
|
||||
defaultValue: false,
|
||||
|
||||
@ -1,6 +1,11 @@
|
||||
<template>
|
||||
<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
|
||||
v-else
|
||||
class="custom-navbar-logo season"
|
||||
@ -22,6 +27,7 @@ export default Vue.extend({
|
||||
data() {
|
||||
return {
|
||||
seasonLogoUrl: '',
|
||||
useThemeColor: true,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -46,6 +52,13 @@ export default Vue.extend({
|
||||
},
|
||||
true,
|
||||
)
|
||||
addComponentListener(
|
||||
'customNavbar.themeLogo',
|
||||
async (value: boolean) => {
|
||||
this.useThemeColor = value
|
||||
},
|
||||
true,
|
||||
)
|
||||
},
|
||||
})
|
||||
</script>
|
||||
@ -63,9 +76,15 @@ export default Vue.extend({
|
||||
width: calc(var(--navbar-height) * 1.3);
|
||||
}
|
||||
.custom-navbar-logo {
|
||||
.custom-navbar:not(.fill) & {
|
||||
&:not(.season) {
|
||||
.custom-navbar:not(.fill) &:not(.season) {
|
||||
body.dark & {
|
||||
color: #fff;
|
||||
}
|
||||
&.theme {
|
||||
color: var(--theme-color);
|
||||
body.dark & {
|
||||
color: var(--theme-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
&.be-icon {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user