Use custom plugin icon titles where given
This commit is contained in:
parent
603c7746ce
commit
c1234df9ae
2 changed files with 17 additions and 7 deletions
|
|
@ -8,7 +8,7 @@
|
||||||
>
|
>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
<div class="tabtitle">
|
<div class="tabtitle">
|
||||||
{{ title }}
|
{{ computedTitle }}
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -22,6 +22,11 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: undefined
|
||||||
|
},
|
||||||
currentTab: {
|
currentTab: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
|
|
@ -35,15 +40,19 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
title: function() {
|
computedTitle: function() {
|
||||||
// Get the last section of a fully qualified name
|
if (this.title !== undefined) {
|
||||||
var topName = this.id.split(".").pop();
|
return this.title;
|
||||||
// Make first character uppercase, then add the rest of the string
|
} else {
|
||||||
return topName.charAt(0).toUpperCase() + topName.slice(1);
|
// Get the last section of a fully qualified name
|
||||||
|
var topName = this.id.split(".").pop();
|
||||||
|
// Make first character uppercase, then add the rest of the string
|
||||||
|
return topName.charAt(0).toUpperCase() + topName.slice(1);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
tooltipOptions: function() {
|
tooltipOptions: function() {
|
||||||
return `pos: right; title: ${this.title}; delay: 500`;
|
return `pos: right; title: ${this.computedTitle}; delay: 500`;
|
||||||
},
|
},
|
||||||
|
|
||||||
classObject: function() {
|
classObject: function() {
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@
|
||||||
v-for="plugin in pluginsGuiList"
|
v-for="plugin in pluginsGuiList"
|
||||||
:id="plugin.id"
|
:id="plugin.id"
|
||||||
:key="plugin.id"
|
:key="plugin.id"
|
||||||
|
:title="plugin.title"
|
||||||
:require-connection="plugin.requiresConnection"
|
:require-connection="plugin.requiresConnection"
|
||||||
:current-tab="currentTab"
|
:current-tab="currentTab"
|
||||||
:click-callback="updatePlugins"
|
:click-callback="updatePlugins"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue