Commit c1234df9 authored by Joel Collins's avatar Joel Collins
Browse files

Use custom plugin icon titles where given

parent 603c7746
Loading
Loading
Loading
Loading
+16 −7
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
  >
    <slot></slot>
    <div class="tabtitle">
      {{ title }}
      {{ computedTitle }}
    </div>
  </a>
</template>
@@ -22,6 +22,11 @@ export default {
      type: String,
      required: true
    },
    title: {
      type: String,
      required: false,
      default: undefined
    },
    currentTab: {
      type: String,
      required: true
@@ -35,15 +40,19 @@ export default {
  },

  computed: {
    title: function() {
    computedTitle: function() {
      if (this.title !== undefined) {
        return this.title;
      } else {
        // 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() {
      return `pos: right; title: ${this.title}; delay: 500`;
      return `pos: right; title: ${this.computedTitle}; delay: 500`;
    },

    classObject: function() {
+1 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@
        v-for="plugin in pluginsGuiList"
        :id="plugin.id"
        :key="plugin.id"
        :title="plugin.title"
        :require-connection="plugin.requiresConnection"
        :current-tab="currentTab"
        :click-callback="updatePlugins"