Skip to content

Commit

Permalink
Fix build errors
Browse files Browse the repository at this point in the history
Signed-off-by: jgeorgi <justin.georgi@gmail.com>
  • Loading branch information
JustinGeorgi committed Sep 27, 2023
1 parent 4e0ff09 commit 0383962
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 32 deletions.
6 changes: 3 additions & 3 deletions bundles/org.openhab.ui/web/src/components/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
</f7-panel>

<f7-panel v-if="showDeveloperDock" right :visible-breakpoint="1280" resizable>
<developer-dock :dock="activeDock" :helpTab="activeHelpTab" :toolTab="activeToolTab"/>
<developer-dock :dock="activeDock" :helpTab="activeHelpTab" :toolTab="activeToolTab" />
</f7-panel>

<f7-view main v-show="ready" class="safe-areas" url="/" :master-detail-breakpoint="960" :animate="themeOptions.pageTransitionAnimation !== 'disabled'" />
Expand Down Expand Up @@ -521,9 +521,9 @@ export default {
if (data[2]) dayjs.locale(data[2].key)
const page = data[0].find((p) => p.uid == 'overview')
const page = data[0].find((p) => p.uid === 'overview')
if ((!page) || (page.component !== 'oh-layout-page') || (!page.slots || (!page.slots.default.length && !page.slots.masonry && !page.slots.canvas && !page.slots.grid))) {
if (this.quickStartShow) this.selectDeveloperDock({'dock':'help','helpTab':'quick'})
if (this.quickStartShow) this.selectDeveloperDock({ 'dock': 'help', 'helpTab': 'quick' })
this.quickStartShow = false
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<template>
<f7-page class="developer-dock">
<f7-navbar title="Developer Sidebar" subtitle="(Shift+Alt+D)" style="width: 100%" :color="$f7.data.themeOptions.dark === 'dark' ? '' : 'black'"></f7-navbar>
<f7-navbar title="Developer Sidebar" subtitle="(Shift+Alt+D)" style="width: 100%" :color="$f7.data.themeOptions.dark === 'dark' ? '' : 'black'" />
<f7-segmented strong tag="p" style="margin-right: calc(var(--f7-searchbar-inner-padding-right) + var(--f7-safe-area-right)); margin-left: calc(var(--f7-searchbar-inner-padding-left) + var(--f7-safe-area-left)); margin-top: 5px; margin-bottom: 5px">
<f7-button :active="dockView === 'tools'" @click="$f7.emit('selectDeveloperDock',{'dock': 'tools'})">Tools</f7-button>
<f7-button :active="dockView === 'help'" @click="$f7.emit('selectDeveloperDock',{'dock': 'help'})">Help</f7-button>
<f7-button :active="dockView === 'tools'" @click="$f7.emit('selectDeveloperDock',{'dock': 'tools'})">
Tools
</f7-button>
<f7-button :active="dockView === 'help'" @click="$f7.emit('selectDeveloperDock',{'dock': 'help'})">
Help
</f7-button>
</f7-segmented>
<f7-segmented v-if="dockView === 'help'" strong tag="p" style="margin-right: calc(var(--f7-searchbar-inner-padding-right) + var(--f7-safe-area-right)); margin-left: calc(var(--f7-searchbar-inner-padding-left) + var(--f7-safe-area-left)); margin-top: 0">
<f7-button :active="activeHelpTab === 'current'" icon-f7="doc_richtext" icon-size="18" @click="$f7.emit('selectDeveloperDock',{'dock': 'help','helpTab': 'current'})" />
Expand All @@ -17,8 +21,8 @@
<f7-button :active="activeToolTab === 'scripting'" icon-f7="pencil_ellipsis_rectangle" icon-size="18" @click="$f7.emit('selectDeveloperDock',{'dock': 'tools','toolTab': 'scripting'})" />
<f7-button :active="activeToolTab === 'tools'" icon-f7="rectangle_stack_badge_plus" icon-size="18" @click="$f7.emit('selectDeveloperDock',{'dock': 'tools','toolTab': 'tools'})" />
</f7-segmented>
<developer-sidebar v-if="dockView === 'tools'" :activeToolTab="activeToolTab"/>
<help-sidebar v-if="dockView === 'help'" :activeHelpTab="activeHelpTab"/>
<developer-sidebar v-if="dockView === 'tools'" :activeToolTab="activeToolTab" />
<help-sidebar v-if="dockView === 'help'" :activeHelpTab="activeHelpTab" />
</f7-page>
</template>

Expand Down Expand Up @@ -47,7 +51,7 @@ export default {
DeveloperSidebar,
HelpSidebar
},
props: ['dock','helpTab','toolTab'],
props: ['dock', 'helpTab', 'toolTab'],
computed: {
dockView () {
return this.dock
Expand All @@ -60,4 +64,4 @@ export default {
}
}
}
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<f7-accordion-content>
<f7-list media-list>
<f7-list-item v-for="step in instruct.steps" :key="step.title" :link="step.link" :title="step.title">
<div class="item-text" v-html="step.text"></div>
<div class="item-text" v-html="step.text" />
</f7-list-item>
<f7-list-button v-if="instruct.button" :external="true" :title="instruct.button.title" :href="documentationLinkPrefix+instruct.button.link" target="_blank"></f7-list-button>
<f7-list-button v-if="instruct.button" :external="true" :title="instruct.button.title" :href="documentationLinkPrefix+instruct.button.link" target="_blank" />
</f7-list>
</f7-accordion-content>
</f7-list-item>
Expand All @@ -31,14 +31,20 @@
</f7-block>
<f7-block class="no-margin no-padding">
<f7-list accordion-list>
<f7-list-item class="faq-title" accordion-item v-for="faq in faqs" :key="faq.title" :title="faq.title">
<f7-list-item class="faq-title" accordion-item v-for="faq in faqs" :key="faq.title" :title="faq.title">
<f7-accordion-content>
<f7-block>
<p v-if="faq.goto">
In the left panel go to <f7-link :href="faq.goto.target">{{ faq.goto.text }}</f7-link>
In the left panel go to <f7-link :href="faq.goto.target">
{{ faq.goto.text }}
</f7-link>
</p>
<p v-html="faq.text" />
<p v-if="faq.doclink">
<f7-link external target="_blank" :href="documentationLinkPrefix+faq.doclink">
Full Help Docs
</f7-link>
</p>
<p v-html="faq.text"></p>
<p v-if="faq.doclink"><f7-link external target="_blank" :href="documentationLinkPrefix+faq.doclink">Full Help Docs</f7-link></p>
</f7-block>
</f7-accordion-content>
</f7-list-item>
Expand All @@ -54,7 +60,7 @@
</f7-block>
<f7-block class="no-margin no-padding">
<f7-list media-list>
<f7-list-item v-for="addon in addons" :key="addon.uid" :link="addon.link" :external="true" target="_blank" :title="addon.label.replaceAll(/Binding|Transformation|Persistence/gi,'')" :text="addon.type"></f7-list-item>
<f7-list-item v-for="addon in addons" :key="addon.uid" :link="addon.link" :external="true" target="_blank" :title="addon.label.replaceAll(/Binding|Transformation|Persistence/gi,'')" :text="addon.type" />
</f7-list>
</f7-block>
</div>
Expand All @@ -66,16 +72,16 @@
</f7-block-title>
</f7-block>
<f7-block class="no-margin no-padding">
<thing-context v-if="($store.state.pagePath).indexOf('things')>=0"/>
<item-context v-else-if="($store.state.pagePath).indexOf('items')>=0"/>
<model-context v-else-if="($store.state.pagePath).indexOf('model')>=0"/>
<page-context v-else-if="($store.state.pagePath).indexOf('pages')>=0"/>
<rule-context v-else-if="($store.state.pagePath).indexOf('rules')>=0 || ($store.state.pagePath).indexOf('schedule')>=0" type="Rules"/>
<rule-context v-else-if="($store.state.pagePath).indexOf('scenes')>=0" type="Scenes"/>
<rule-context v-else-if="($store.state.pagePath).indexOf('scripts')>=0" type="Scripts"/>
<widget-context v-else-if="($store.state.pagePath).indexOf('widgets')>=0"/>
<transform-context v-else-if="($store.state.pagePath).indexOf('transformations')>=0"/>
<addon-context v-else-if="($store.state.pagePath).indexOf('addons')>=0"/>
<thing-context v-if="($store.state.pagePath).indexOf('things')>=0" />
<item-context v-else-if="($store.state.pagePath).indexOf('items')>=0" />
<model-context v-else-if="($store.state.pagePath).indexOf('model')>=0" />
<page-context v-else-if="($store.state.pagePath).indexOf('pages')>=0" />
<rule-context v-else-if="($store.state.pagePath).indexOf('rules')>=0 || ($store.state.pagePath).indexOf('schedule')>=0" type="Rules" />
<rule-context v-else-if="($store.state.pagePath).indexOf('scenes')>=0" type="Scenes" />
<rule-context v-else-if="($store.state.pagePath).indexOf('scripts')>=0" type="Scripts" />
<widget-context v-else-if="($store.state.pagePath).indexOf('widgets')>=0" />
<transform-context v-else-if="($store.state.pagePath).indexOf('transformations')>=0" />
<addon-context v-else-if="($store.state.pagePath).indexOf('addons')>=0" />
<default-context v-else/>
</f7-block>
<f7-block>
Expand All @@ -89,7 +95,6 @@
</f7-block>
</div>
</div>

</f7-block>
</template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
Community made Rule Templates can also be added to your system from the <strong>Automation</strong> tab of the Add-on Store.
</p>
<p v-else-if="(type == 'Rules' && ($store.state.pagePath).indexOf('schedule')>=0)">
The shedule page shows you a calendar layout of all Rules that have the <f7-chip text="Schedule" media-bg-color="blue"><f7-icon slot="media" f7="tag_fill"></f7-icon></f7-chip> tag and trigger at one or more defined times.
The shedule page shows you a calendar layout of all Rules that have the
<f7-chip text="Schedule" media-bg-color="blue">
<f7-icon slot="media" f7="tag_fill" />
</f7-chip>
tag and trigger at one or more defined times.
</p>
<p>
On these pages you can manage all the basic {{ type }} you have added to your system.
Expand All @@ -25,7 +29,7 @@
Click on any Scene in the main list to edit scene's item commands
</f7-list-item>
<f7-list-item :title="`Delete ${type}`">
Select multiple {{ type }} using the top <strong>Select</strong> button and use the <strong>Remove</strong> button at the bottom or use the <span style="color: red">Remove {{ type }}</span> button on the individual {{ type.slice(0,-1).toLowerCase() }} pages
Select multiple {{ type }} using the top <strong>Select</strong> button and use the <strong>Remove</strong> button at the bottom or use the <span style="color: red">Remove {{ type }}</span> button on the individual {{ type.slice(0,-1).toLowerCase() }} pages
</f7-list-item>
<f7-list-item v-if="(type == 'Rules' || type == 'Scripts')" :title="`Enable/Disable ${type}`">
Select multiple {{ type }} using the top <strong>Select</strong> button and use the <strong>Enable</strong> or <strong>Disable</strong> buttons at the bottom or use the <i class="f7-icons size-22">play_circle</i> and <i class="f7-icons size-22">pause_circle</i> buttons on the individual {{ type.slice(0,-1).toLowerCase() }} pages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
<strong>Transformations</strong> are openHAB objects that convert a value or item state into different value or state. Transformations can be used in many different instances including Links betweens Channels and Items, Rule scripts, and some Thing configurations.
</p>
<p>
The different available Transformation methods must be individually installed via the <strong>Other</strong> tab of the <f7-link href="/addons/">Add-on Store</f7-link>.
The different available Transformation methods must be individually installed via the <strong>Other</strong> tab of the
<f7-link href="/addons/">
Add-on Store
</f7-link>
.
</p>
<p>
On these pages you can manage all the Transformations you have added to your system.
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.openhab.ui/web/src/js/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const store = new Vuex.Store({
locale: null,
runtimeInfo: null,
developerDock: false,
pagePath: null,
pagePath: null
},
getters: {
apiEndpoint: (state) => (type) => (!state.apiEndpoints) ? null : state.apiEndpoints.find((e) => e.type === type),
Expand Down

0 comments on commit 0383962

Please sign in to comment.