Revert "Change the default navbar style for non-desktop to simple navbar" (#2799)

Reverts openhab/openhab-webui#2791
pull/2801/head
Florian Hotze 2024-10-06 14:44:33 +02:00 committed by GitHub
parent 6c46b7953a
commit 0a3fb925e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 8 deletions

View File

@ -539,7 +539,7 @@ export default {
updateThemeOptions () {
this.themeOptions.dark = localStorage.getItem('openhab.ui:theme.dark') || ((window.OHApp && window.OHApp.preferDarkMode) ? window.OHApp.preferDarkMode().toString() : (this.$f7.darkTheme ? 'dark' : 'light'))
this.themeOptions.bars = localStorage.getItem('openhab.ui:theme.bars') || 'light'
this.themeOptions.homeNavbar = localStorage.getItem('openhab.ui:theme.home.navbar') || (this.$f7.device.desktop ? 'large' : 'simple')
this.themeOptions.homeNavbar = localStorage.getItem('openhab.ui:theme.home.navbar') || 'default'
this.themeOptions.homeBackground = localStorage.getItem('openhab.ui:theme.home.background') || 'default'
this.themeOptions.expandableCardAnimation = localStorage.getItem('openhab.ui:theme.home.cardanimation') || 'default'
if (this.themeOptions.dark === 'dark') {

View File

@ -111,7 +111,7 @@ export default {
location.reload()
},
setHomePageNavbarStyle (value) {
localStorage.setItem('openhab.ui:theme.home.navbar', (value) ? 'simple' : 'large')
localStorage.setItem('openhab.ui:theme.home.navbar', (value) ? 'simple' : 'default')
location.reload()
},
setHomePageBackground (value) {
@ -150,7 +150,7 @@ export default {
return localStorage.getItem('openhab.ui:theme.bars') || 'light'
},
homePageNavbarStyle () {
return localStorage.getItem('openhab.ui:theme.home.navbar') || (this.$f7.device.desktop ? 'large' : 'simple')
return localStorage.getItem('openhab.ui:theme.home.navbar') || 'default'
},
homePageBackground () {
return localStorage.getItem('openhab.ui:theme.home.background') || 'default'

View File

@ -1,10 +1,10 @@
<template>
<f7-page stacked name="HomePage" class="page-home" :class="{ 'standard-background': $f7.data.themeOptions.homeBackground === 'standard' }" @page:init="onPageInit" @page:beforein="onPageBeforeIn" @page:afterin="onPageAfterIn" @page:beforeout="onPageBeforeOut">
<f7-navbar :large="navbarLarge" :large-transparent="navbarLarge" class="home-nav disable-user-select">
<f7-navbar :large="$f7.data.themeOptions.homeNavbar !== 'simple'" :large-transparent="$f7.data.themeOptions.homeNavbar !== 'simple'" class="home-nav disable-user-select">
<f7-nav-left>
<f7-link icon-ios="f7:menu" icon-aurora="f7:menu" icon-md="material:menu" panel-open="left" />
</f7-nav-left>
<f7-nav-title-large v-if="navbarLarge" class="home-title-large">
<f7-nav-title-large v-if="$f7.data.themeOptions.homeNavbar !== 'simple'" class="home-title-large">
<span class="today">{{ new Date().toLocaleString($store.getters.locale, { weekday: 'long', day: 'numeric', month: 'long' }) }}</span>
{{ title }}
</f7-nav-title-large>
@ -108,9 +108,6 @@ export default {
ready () {
return this.$store.state.apiVersion > 0
},
navbarLarge () {
return this.$f7.data.themeOptions.homeNavbar === 'large'
},
context () {
return {
store: this.$store.getters.trackedItems