From fc31b3f332182bf3ab6b07134256c289106b61ce Mon Sep 17 00:00:00 2001 From: LianaHus Date: Fri, 12 Apr 2019 21:21:36 +0200 Subject: [PATCH] fixed title of tab for plugins --- src/app/panels/tab-proxy.js | 11 +++++++---- src/app/ui/card.js | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/app/panels/tab-proxy.js b/src/app/panels/tab-proxy.js index 4927c9d808..9fcd33f0ef 100644 --- a/src/app/panels/tab-proxy.js +++ b/src/app/panels/tab-proxy.js @@ -27,7 +27,7 @@ export class TabProxy { this._view.filetabs.activateTab(file) return } - this.addTab(file, () => { + this.addTab(file, "", () => { this.fileManager.switchFile(file) this.event.emit('switchFile', file) }, @@ -39,7 +39,7 @@ export class TabProxy { fileManager.events.on('fileRenamed', (oldName, newName) => { this.removeTab(oldName) - this.addTab(newName, () => { + this.addTab(newName, "", () => { this.fileManager.switchFile(newName) this.event.emit('switchFile', newName) }, @@ -54,6 +54,7 @@ export class TabProxy { if (profile.location === 'mainPanel') { this.addTab( name, + profile.displayName, () => this.event.emit('switchApp', name), () => { this.event.emit('closeApp', name) @@ -104,11 +105,13 @@ export class TabProxy { this._view.filetabs.activateTab(name) } - addTab (name, switchTo, close, kind) { + addTab (name, title, switchTo, close, kind) { if (this._handlers[name]) return var slash = name.split('/') - let title = name.indexOf('/') !== -1 ? slash[slash.length - 1] : name + if (!title) { + title = name.indexOf('/') !== -1 ? slash[slash.length - 1] : name + } this._view.filetabs.addTab({ id: name, title, diff --git a/src/app/ui/card.js b/src/app/ui/card.js index c01bec663e..0419a53971 100644 --- a/src/app/ui/card.js +++ b/src/app/ui/card.js @@ -16,7 +16,7 @@ module.exports = class Card { if (self._view.el) return self._view.el self._view.cardBody = yo`
` - self._view.arrow = yo`` + self._view.arrow = yo`` self._view.expandCollapseButton = yo`
${self._view.arrow}
`