Skip to content

Commit

Permalink
Fix help link on narrow screens
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
  • Loading branch information
JustinGeorgi committed Oct 14, 2023
1 parent fd9a16c commit 6d5b0eb
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 24 deletions.
7 changes: 4 additions & 3 deletions bundles/org.openhab.ui/web/src/pages/home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
{{ title }}
</f7-nav-title>
<f7-nav-right>
<f7-link v-if="(this.$store.getters.isAdmin && $store.state.developerDock)" icon-f7="question_circle_fill" @click="$f7.emit('toggleDeveloperDock')" />
<f7-link v-else-if="(this.$store.getters.isAdmin && !$store.state.developerDock)" icon-f7="question_circle" @click="$f7.emit('selectDeveloperDock',{'dock':'help','helpTab':'current'})" />
<f7-link v-if="(this.$store.getters.isAdmin && $store.state.developerDock && windowWidth >= 1280)" icon-f7="question_circle_fill" @click="$f7.emit('toggleDeveloperDock')" />
<f7-link v-else-if="(this.$store.getters.isAdmin && !$store.state.developerDock && windowWidth >= 1280)" icon-f7="question_circle" @click="$f7.emit('selectDeveloperDock',{'dock':'help','helpTab':'current'})" />
<f7-link v-if="this.$store.getters.isAdmin" icon-ios="f7:pencil" icon-aurora="f7:pencil" icon-md="material:edit" :tooltip="$t('home.editHome')" :href="(homePageComponent) ? '/settings/pages/home/home' : '/settings/pages/home/add'" />
<f7-link v-if="showPinToHome" icon-ios="f7:pin_fill" icon-aurora="f7:pin_fill" icon-md="material:add_location" :tooltip="$t('home.pinToHome')" @click="pinToHome" />
<f7-link v-if="showExitToApp" icon-ios="f7:square_arrow_right" icon-aurora="f7:square_arrow_right" icon-md="material:exit_to_app" :tooltip="$t('home.exitToApp')" @click="exitToApp" />
Expand Down Expand Up @@ -103,7 +103,8 @@ export default {
showExitToApp: false,
currentTab: this.initialTab || 'overview',
overviewPageKey: this.$utils.id(),
items: []
items: [],
windowWidth: window.innerWidth
}
},
computed: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<f7-page @page:afterin="onPageAfterIn" @page:beforeout="onPageBeforeOut">
<f7-navbar title="Items" back-link="Settings" back-link-url="/settings/" back-link-force>
<f7-nav-right>
<f7-link v-if="$store.state.developerDock" icon-f7="question_circle_fill" @click="$f7.emit('toggleDeveloperDock')" />
<f7-link v-else icon-f7="question_circle" @click="$f7.emit('selectDeveloperDock',{'dock':'help','helpTab':'current'})" />
<f7-link v-if="$store.state.developerDock && windowWidth >= 1280" icon-f7="question_circle_fill" @click="$f7.emit('toggleDeveloperDock')" />
<f7-link v-else-if="windowWidth >= 1280" icon-f7="question_circle" @click="$f7.emit('selectDeveloperDock',{'dock':'help','helpTab':'current'})" />
<f7-link icon-md="material:done_all" @click="toggleCheck()"
:text="(!$theme.md) ? ((showCheckboxes) ? 'Done' : 'Select') : ''" />
</f7-nav-right>
Expand Down Expand Up @@ -150,7 +150,8 @@ export default {
},
selectedItems: [],
showCheckboxes: false,
eventSource: null
eventSource: null,
windowWidth: window.innerWidth
}
},
methods: {
Expand Down
7 changes: 4 additions & 3 deletions bundles/org.openhab.ui/web/src/pages/settings/model/model.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<f7-page name="Model" :stacked="true" @page:afterin="onPageAfterIn" @page:beforeout="onPageBeforeOut" @click="selectItem(null)">
<f7-navbar title="Semantic Model" back-link="Settings" back-link-url="/settings/" back-link-force>
<f7-nav-right>
<f7-link v-if="$store.state.developerDock" icon-f7="question_circle_fill" @click="$f7.emit('toggleDeveloperDock')" />
<f7-link v-else icon-f7="question_circle" @click="$f7.emit('selectDeveloperDock',{'dock':'help','helpTab':'current'})" />
<f7-link v-if="$store.state.developerDock && windowWidth >= 1280" icon-f7="question_circle_fill" @click="$f7.emit('toggleDeveloperDock')" />
<f7-link v-else-if="windowWidth >= 1280" icon-f7="question_circle" @click="$f7.emit('selectDeveloperDock',{'dock':'help','helpTab':'current'})" />
</f7-nav-right>
<f7-subnavbar :inner="false" v-show="initSearchbar">
<f7-searchbar
Expand Down Expand Up @@ -262,7 +262,8 @@ export default {
detailsOpened: false,
detailsTab: 'state',
eventSource: null,
itemDetailsKey: this.$f7.utils.id()
itemDetailsKey: this.$f7.utils.id(),
windowWidth: window.innerWidth
}
},
created () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<f7-page @page:afterin="onPageAfterIn" @page:afterout="onPageAfterOut">
<f7-navbar title="Pages" back-link="Settings" back-link-url="/settings/" back-link-force>
<f7-nav-right>
<f7-link v-if="$store.state.developerDock" icon-f7="question_circle_fill" @click="$f7.emit('toggleDeveloperDock')" />
<f7-link v-else icon-f7="question_circle" @click="$f7.emit('selectDeveloperDock',{'dock':'help','helpTab':'current'})" />
<f7-link v-if="$store.state.developerDock && windowWidth >= 1280" icon-f7="question_circle_fill" @click="$f7.emit('toggleDeveloperDock')" />
<f7-link v-else-if="windowWidth >= 1280" icon-f7="question_circle" @click="$f7.emit('selectDeveloperDock',{'dock':'help','helpTab':'current'})" />
<f7-link icon-md="material:done_all" @click="toggleCheck()"
:text="(!$theme.md) ? ((showCheckboxes) ? 'Done' : 'Select') : ''" />
</f7-nav-right>
Expand Down Expand Up @@ -167,7 +167,8 @@ export default {
{ type: 'map', label: 'Map', componentType: 'oh-map-page', icon: 'map' },
{ type: 'plan', label: 'Floor plan', componentType: 'oh-plan-page', icon: 'square_stack_3d_up' },
{ type: 'chart', label: 'Chart', componentType: 'oh-chart-page', icon: 'graph_square' }
]
],
windowWidth: window.innerWidth
}
},
computed: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<f7-page @page:afterin="onPageAfterIn" @page:afterout="stopEventSource">
<f7-navbar :title="type" back-link="Settings" back-link-url="/settings/" back-link-force>
<f7-nav-right>
<f7-link v-if="$store.state.developerDock" icon-f7="question_circle_fill" @click="$f7.emit('toggleDeveloperDock')" />
<f7-link v-else icon-f7="question_circle" @click="$f7.emit('selectDeveloperDock',{'dock':'help','helpTab':'current'})" />
<f7-link v-if="$store.state.developerDock && windowWidth >= 1280" icon-f7="question_circle_fill" @click="$f7.emit('toggleDeveloperDock')" />
<f7-link v-else-if="windowWidth >= 1280" icon-f7="question_circle" @click="$f7.emit('selectDeveloperDock',{'dock':'help','helpTab':'current'})" />
<f7-link icon-md="material:done_all" @click="toggleCheck()"
:text="(!$theme.md) ? ((showCheckboxes) ? 'Done' : 'Select') : ''" />
</f7-nav-right>
Expand Down Expand Up @@ -149,7 +149,8 @@ export default {
initSearchbar: false,
selectedItems: [],
showCheckboxes: false,
eventSource: null
eventSource: null,
windowWidth: window.innerWidth
}
},
computed: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<f7-page @page:afterin="onPageAfterIn" @page:afterout="stopEventSource">
<f7-navbar title="Schedule" back-link="Settings" back-link-url="/settings/" back-link-force>
<f7-nav-right>
<f7-link v-if="$store.state.developerDock" icon-f7="question_circle_fill" @click="$f7.emit('toggleDeveloperDock')" />
<f7-link v-else icon-f7="question_circle" @click="$f7.emit('selectDeveloperDock',{'dock':'help','helpTab':'current'})" />
<f7-link v-if="$store.state.developerDock && windowWidth >= 1280" icon-f7="question_circle_fill" @click="$f7.emit('toggleDeveloperDock')" />
<f7-link v-else-if="windowWidth >= 1280" icon-f7="question_circle" @click="$f7.emit('selectDeveloperDock',{'dock':'help','helpTab':'current'})" />
<f7-link icon-md="material:done_all" @click="toggleCheck()"
:text="(!$theme.md) ? ((showCheckboxes) ? 'Done' : 'Select') : ''" />
</f7-nav-right>
Expand Down Expand Up @@ -96,7 +96,8 @@ export default {
initSearchbar: false,
selectedItems: [],
showCheckboxes: false,
eventSource: null
eventSource: null,
windowWidth: window.innerWidth
}
},
created () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<f7-page @page:afterin="onPageAfterIn" @page:afterout="stopEventSource">
<f7-navbar title="Things" back-link="Settings" back-link-url="/settings/" back-link-force>
<f7-nav-right>
<f7-link v-if="$store.state.developerDock" icon-f7="question_circle_fill" @click="$f7.emit('toggleDeveloperDock')" />
<f7-link v-else icon-f7="question_circle" @click="$f7.emit('selectDeveloperDock',{'dock':'help','helpTab':'current'})" />
<f7-link v-if="$store.state.developerDock && windowWidth >= 1280" icon-f7="question_circle_fill" @click="$f7.emit('toggleDeveloperDock')" />
<f7-link v-else-if="windowWidth >= 1280" icon-f7="question_circle" @click="$f7.emit('selectDeveloperDock',{'dock':'help','helpTab':'current'})" />
<f7-link icon-md="material:done_all" @click="toggleCheck()"
:text="(!$theme.md) ? ((showCheckboxes) ? 'Done' : 'Select') : ''" />
</f7-nav-right>
Expand Down Expand Up @@ -165,7 +165,8 @@ export default {
selectedItems: [],
showCheckboxes: false,
groupBy: 'alphabetical',
eventSource: null
eventSource: null,
windowWidth: window.innerWidth
}
},
created () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<f7-page @page:afterin="onPageAfterIn" @page:afterout="onPageAfterOut">
<f7-navbar title="Transformations" back-link="Settings" back-link-url="/settings/" back-link-force>
<f7-nav-right>
<f7-link v-if="$store.state.developerDock" icon-f7="question_circle_fill" @click="$f7.emit('toggleDeveloperDock')" />
<f7-link v-else icon-f7="question_circle" @click="$f7.emit('selectDeveloperDock',{'dock':'help','helpTab':'current'})" />
<f7-link v-if="$store.state.developerDock && windowWidth >= 1280" icon-f7="question_circle_fill" @click="$f7.emit('toggleDeveloperDock')" />
<f7-link v-else-if="windowWidth >= 1280" icon-f7="question_circle" @click="$f7.emit('selectDeveloperDock',{'dock':'help','helpTab':'current'})" />
<f7-link icon-md="material:done_all" @click="toggleCheck()"
:text="(!$theme.md) ? ((showCheckboxes) ? 'Done' : 'Select') : ''" />
</f7-nav-right>
Expand Down Expand Up @@ -131,7 +131,8 @@ export default {
initSearchbar: false,
selectedTransformations: [],
groupBy: 'alphabetical',
showCheckboxes: false
showCheckboxes: false,
windowWidth: window.innerWidth
}
},
computed: {
Expand Down

0 comments on commit 6d5b0eb

Please sign in to comment.