Item Details: Add a link to search for the item in the developer bar (#3004)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>pull/3010/head
parent
03a7fa1182
commit
e7d9b65bc2
|
@ -148,7 +148,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" :searchFor="developerSearch" />
|
||||
</f7-panel>
|
||||
|
||||
<f7-block v-if="!ready && communicationFailureMsg" class="block-narrow">
|
||||
|
@ -384,6 +384,7 @@ export default {
|
|||
activeDock: 'tools',
|
||||
activeToolTab: 'pin',
|
||||
activeHelpTab: 'current',
|
||||
developerSearch: null,
|
||||
currentUrl: ''
|
||||
}
|
||||
},
|
||||
|
@ -576,6 +577,7 @@ export default {
|
|||
if (dockOpts.dock) this.activeDock = dockOpts.dock
|
||||
if (dockOpts.helpTab) this.activeHelpTab = dockOpts.helpTab
|
||||
if (dockOpts.toolTab) this.activeToolTab = dockOpts.toolTab
|
||||
if (dockOpts.searchFor) this.developerSearch = dockOpts.searchFor
|
||||
}
|
||||
if (!this.showDeveloperDock) this.toggleDeveloperDock()
|
||||
},
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<f7-button :active="activeHelpTab === 'faq'" icon-f7="question_diamond_fill" icon-size="18" @click="$f7.emit('selectDeveloperDock',{'dock': 'help','helpTab': 'faq'})" tooltip="FAQ" />
|
||||
<f7-button :active="activeHelpTab === 'quick'" icon-f7="cursor_rays" icon-size="18" @click="$f7.emit('selectDeveloperDock',{'dock': 'help','helpTab': 'quick'})" tooltip="Quick Start" />
|
||||
</f7-segmented>
|
||||
<developer-sidebar v-if="dockView === 'tools'" :activeToolTab="activeToolTab" />
|
||||
<developer-sidebar v-if="dockView === 'tools'" :activeToolTab="activeToolTab" :searchFor="searchFor" />
|
||||
<help-sidebar v-if="dockView === 'help'" :activeHelpTab="activeHelpTab" />
|
||||
</f7-page>
|
||||
</template>
|
||||
|
@ -47,7 +47,7 @@ import DeveloperSidebar from './developer-sidebar.vue'
|
|||
import HelpSidebar from './help-sidebar.vue'
|
||||
|
||||
export default {
|
||||
props: ['dock', 'helpTab', 'toolTab'],
|
||||
props: ['dock', 'helpTab', 'toolTab', 'searchFor'],
|
||||
components: {
|
||||
DeveloperSidebar,
|
||||
HelpSidebar
|
||||
|
|
|
@ -395,7 +395,12 @@ export default {
|
|||
SearchResults,
|
||||
ExpressionTester
|
||||
},
|
||||
props: ['activeToolTab'],
|
||||
props: ['activeToolTab', 'searchFor'],
|
||||
watch: {
|
||||
searchFor (val) {
|
||||
if (val) this.$refs.searchbar.search(val)
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
searchQuery: '',
|
||||
|
@ -453,6 +458,7 @@ export default {
|
|||
this.$nextTick(() => {
|
||||
if (this.$device.desktop && this.$refs.searchbar) {
|
||||
this.$refs.searchbar.f7Searchbar.$inputEl.focus()
|
||||
if (this.searchFor) this.$refs.searchbar.search(this.searchFor)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
</f7-list-button>
|
||||
</f7-list>
|
||||
<p class="developer-sidebar-tip text-align-center">
|
||||
Tip: Use the developer sidebar (Shift+Alt+D) to search for usages of this Item
|
||||
Tip: Use the developer sidebar (Shift+Alt+D) to <f7-link text="search for usages of this Item" @click="searchInSidebar" />
|
||||
</p>
|
||||
</f7-col>
|
||||
</f7-row>
|
||||
|
@ -227,6 +227,9 @@ export default {
|
|||
})
|
||||
}
|
||||
)
|
||||
},
|
||||
searchInSidebar () {
|
||||
this.$f7.emit('selectDeveloperDock', { 'dock': 'tools', 'toolTab': 'pin', 'searchFor': this.item.name })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue