|
|
|
@ -146,7 +146,7 @@ export class TabProxy extends Plugin { |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
this.on('manager', 'pluginActivated', ({ name, location, displayName, icon }) => { |
|
|
|
|
this.on('manager', 'pluginActivated', ({ name, location, displayName, icon, description }) => { |
|
|
|
|
if (location === 'mainPanel') { |
|
|
|
|
this.addTab( |
|
|
|
|
name, |
|
|
|
@ -160,7 +160,8 @@ export class TabProxy extends Plugin { |
|
|
|
|
this.emit('closeApp', name) |
|
|
|
|
this.call('manager', 'deactivatePlugin', name) |
|
|
|
|
}, |
|
|
|
|
icon |
|
|
|
|
icon, |
|
|
|
|
description |
|
|
|
|
) |
|
|
|
|
this.switchTab(name) |
|
|
|
|
} |
|
|
|
@ -223,7 +224,7 @@ export class TabProxy extends Plugin { |
|
|
|
|
this.removeTab(oldName) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
addTab (name, title, switchTo, close, icon) { |
|
|
|
|
addTab (name, title, switchTo, close, icon, description = '') { |
|
|
|
|
if (this._handlers[name]) return this.renderComponent() |
|
|
|
|
|
|
|
|
|
var slash = name.split('/') |
|
|
|
@ -244,7 +245,7 @@ export class TabProxy extends Plugin { |
|
|
|
|
name, |
|
|
|
|
title, |
|
|
|
|
icon, |
|
|
|
|
tooltip: title || name, |
|
|
|
|
tooltip: name, |
|
|
|
|
iconClass: getPathIcon(name) |
|
|
|
|
}) |
|
|
|
|
formatPath.shift() |
|
|
|
@ -252,7 +253,7 @@ export class TabProxy extends Plugin { |
|
|
|
|
const index = this.loadedTabs.findIndex(({ title }) => title === formatPath.join('/')) |
|
|
|
|
if (index > -1) { |
|
|
|
|
const duplicateTabName = this.loadedTabs[index].name |
|
|
|
|
const duplicateTabTooltip = this.loadedTabs[index].tooltip |
|
|
|
|
const duplicateTabTooltip = this.loadedTabs[index].description |
|
|
|
|
const duplicateTabPath = duplicateTabName.split('/') |
|
|
|
|
const duplicateTabFormatPath = [...duplicateTabPath].reverse() |
|
|
|
|
const duplicateTabTitle = duplicateTabFormatPath.slice(0, titleLength).reverse().join('/') |
|
|
|
@ -261,7 +262,7 @@ export class TabProxy extends Plugin { |
|
|
|
|
name: duplicateTabName, |
|
|
|
|
title: duplicateTabTitle, |
|
|
|
|
icon, |
|
|
|
|
tooltip: duplicateTabTooltip, |
|
|
|
|
tooltip: duplicateTabTooltip || duplicateTabTitle, |
|
|
|
|
iconClass: getPathIcon(duplicateTabName) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -275,7 +276,7 @@ export class TabProxy extends Plugin { |
|
|
|
|
name, |
|
|
|
|
title, |
|
|
|
|
icon, |
|
|
|
|
tooltip: title || name, |
|
|
|
|
tooltip: description || title, |
|
|
|
|
iconClass: getPathIcon(name) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|