Added dynamic tooltip for sidebar tongue

This commit is contained in:
Joel Louzado 2017-02-15 21:30:03 +05:30
parent be9adfaad4
commit 7393818fc0
3 changed files with 10 additions and 1 deletions

View file

@ -1,7 +1,7 @@
template(name="sidebar")
.board-sidebar.sidebar(class="{{#if isOpen}}is-open{{/if}}")
a.sidebar-tongue.js-toggle-sidebar(
class="{{#if isTongueHidden}}is-hidden{{/if}}")
class="{{#if isTongueHidden}}is-hidden{{/if}}")(title="{{showTongueTitle}}")
i.fa.fa-angle-left
.sidebar-shadow
.sidebar-content.sidebar-shortcuts

View file

@ -89,6 +89,13 @@ BlazeComponent.extendComponent({
return TAPi18n.__(viewTitles[this.getView()]);
},
showTongueTitle() {
if (this.isOpen())
return `${TAPi18n.__('sidebar-close')}`;
else
return `${TAPi18n.__('sidebar-open')}`;
},
events() {
return [{
'click .js-hide-sidebar': this.hide,