Skip to content

Commit

Permalink
Update shortcut text on tab drag
Browse files Browse the repository at this point in the history
  • Loading branch information
kanishk98 committed Jan 9, 2019
1 parent d0f9d35 commit eb129f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/renderer/js/components/server-tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ class ServerTab extends Tab {

return shortcutText;
}

updateShortcutText(index) {
this.props.index = index;
let serverTabShortcut = document.getElementsByClassName('server-tab-shortcut')[index];
serverTabShortcut.innerHTML = this.generateShortcutText();
}
}

module.exports = ServerTab;
1 change: 1 addition & 0 deletions app/renderer/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ class ServerManagerView {
const onHover = this.onHover.bind(this, oldIndex);
const onHoverOut = this.onHoverOut.bind(this, oldIndex);
this.tabs[index].updateListeners(onClick, onHover, onHoverOut);
this.tabs[index].updateShortcutText(index);
}

initActions() {
Expand Down

0 comments on commit eb129f3

Please sign in to comment.