mirror of
https://github.com/Luzifer/ots.git
synced 2024-12-18 03:54:38 -05:00
Add alternative appIcon
for dark-mode (#204)
This commit is contained in:
parent
6f59345316
commit
9942abc02b
@ -23,6 +23,7 @@ type (
|
|||||||
// Customize holds the structure of the customization file
|
// Customize holds the structure of the customization file
|
||||||
Customize struct {
|
Customize struct {
|
||||||
AppIcon string `json:"appIcon,omitempty" yaml:"appIcon"`
|
AppIcon string `json:"appIcon,omitempty" yaml:"appIcon"`
|
||||||
|
AppIconDark string `json:"appIconDark,omitempty" yaml:"appIconDark"`
|
||||||
AppTitle string `json:"appTitle,omitempty" yaml:"appTitle"`
|
AppTitle string `json:"appTitle,omitempty" yaml:"appTitle"`
|
||||||
DisableAppTitle bool `json:"disableAppTitle,omitempty" yaml:"disableAppTitle"`
|
DisableAppTitle bool `json:"disableAppTitle,omitempty" yaml:"disableAppTitle"`
|
||||||
DisablePoweredBy bool `json:"disablePoweredBy,omitempty" yaml:"disablePoweredBy"`
|
DisablePoweredBy bool `json:"disablePoweredBy,omitempty" yaml:"disablePoweredBy"`
|
||||||
|
@ -7,13 +7,13 @@
|
|||||||
@click.prevent="$root.navigate('/')"
|
@click.prevent="$root.navigate('/')"
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
v-if="!$root.customize.appIcon"
|
v-if="!appIcon"
|
||||||
class="fas fa-user-secret mr-1"
|
class="fas fa-user-secret mr-1"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
v-else
|
v-else
|
||||||
class="mr-1"
|
class="mr-1"
|
||||||
:src="$root.customize.appIcon"
|
:src="appIcon"
|
||||||
>
|
>
|
||||||
<span v-if="!$root.customize.disableAppTitle">{{ $root.customize.appTitle }}</span>
|
<span v-if="!$root.customize.disableAppTitle">{{ $root.customize.appTitle }}</span>
|
||||||
</a>
|
</a>
|
||||||
@ -77,6 +77,17 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
computed: {
|
||||||
|
appIcon() {
|
||||||
|
// Use specified icon or fall back to null
|
||||||
|
const appIcon = this.$root.customize.appIcon || null
|
||||||
|
// Use specified icon or fall back to light-mode appIcon (which might be null)
|
||||||
|
const darkIcon = this.$root.customize.appIconDark || appIcon
|
||||||
|
|
||||||
|
return this.$root.darkTheme ? darkIcon : appIcon
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
name: 'AppNavbar',
|
name: 'AppNavbar',
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user