mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 16:00:13 +01:00
Keyboard Shortcuts Enable/Disable is now at Right Sidebar, where already was list of Keyboard Shortcuts.
Thanks to xet7 ! Fixes https://github.com/wekan/wekan/pull/5628
This commit is contained in:
parent
7fc364cb63
commit
275ac445d0
5 changed files with 17 additions and 15 deletions
|
|
@ -23,11 +23,6 @@ template(name="boardHeaderBar")
|
||||||
span
|
span
|
||||||
= currentBoard.stars
|
= currentBoard.stars
|
||||||
|
|
||||||
a.board-header-btn.js-keyboard-shortcuts-toggle(
|
|
||||||
title="{{#if isKeyboardShortcuts}}{{_ 'keyboard-shortcuts-enabled'}}{{else}}{{_ 'keyboard-shortcuts-disabled'}}{{/if}}")
|
|
||||||
i.fa(class="fa-solid fa-keyboard")
|
|
||||||
i.fa(class="fa-solid fa-{{#if isKeyboardShortcuts}}check-square-o{{else}}ban{{/if}}")
|
|
||||||
|
|
||||||
a.board-header-btn(
|
a.board-header-btn(
|
||||||
class="{{#if currentUser.isBoardAdmin}}js-change-visibility{{else}}is-disabled{{/if}}"
|
class="{{#if currentUser.isBoardAdmin}}js-change-visibility{{else}}is-disabled{{/if}}"
|
||||||
title="{{_ currentBoard.permission}}")
|
title="{{_ currentBoard.permission}}")
|
||||||
|
|
|
||||||
|
|
@ -39,11 +39,6 @@ BlazeComponent.extendComponent({
|
||||||
return user && user.hasStarred(boardId);
|
return user && user.hasStarred(boardId);
|
||||||
},
|
},
|
||||||
|
|
||||||
isKeyboardShortcuts() {
|
|
||||||
const user = ReactiveCache.getCurrentUser();
|
|
||||||
return user && user.isKeyboardShortcuts();
|
|
||||||
},
|
|
||||||
|
|
||||||
// Only show the star counter if the number of star is greater than 2
|
// Only show the star counter if the number of star is greater than 2
|
||||||
showStarCounter() {
|
showStarCounter() {
|
||||||
const currentBoard = Utils.getCurrentBoard();
|
const currentBoard = Utils.getCurrentBoard();
|
||||||
|
|
@ -77,9 +72,6 @@ BlazeComponent.extendComponent({
|
||||||
'click .js-star-board'() {
|
'click .js-star-board'() {
|
||||||
ReactiveCache.getCurrentUser().toggleBoardStar(Session.get('currentBoard'));
|
ReactiveCache.getCurrentUser().toggleBoardStar(Session.get('currentBoard'));
|
||||||
},
|
},
|
||||||
'click .js-keyboard-shortcuts-toggle'() {
|
|
||||||
ReactiveCache.getCurrentUser().toggleKeyboardShortcuts();
|
|
||||||
},
|
|
||||||
'click .js-open-board-menu': Popup.open('boardMenu'),
|
'click .js-open-board-menu': Popup.open('boardMenu'),
|
||||||
'click .js-change-visibility': Popup.open('boardChangeVisibility'),
|
'click .js-change-visibility': Popup.open('boardChangeVisibility'),
|
||||||
'click .js-watch-board': Popup.open('boardChangeWatch'),
|
'click .js-watch-board': Popup.open('boardChangeWatch'),
|
||||||
|
|
|
||||||
|
|
@ -104,10 +104,14 @@
|
||||||
}
|
}
|
||||||
.sidebar .sidebar-shortcuts {
|
.sidebar .sidebar-shortcuts {
|
||||||
top: 7px;
|
top: 7px;
|
||||||
font-size: 0.8em;
|
font-size: 1em;
|
||||||
line-height: 1.6em;
|
line-height: 1.6em;
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
.sidebar .sidebar-shortcuts .sidebar-btn {
|
||||||
|
margin-left: 3px;
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
.board-sidebar {
|
.board-sidebar {
|
||||||
display: none;
|
display: none;
|
||||||
width: 30vw;
|
width: 30vw;
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,12 @@ template(name="sidebar")
|
||||||
// i.fa.fa-navicon
|
// i.fa.fa-navicon
|
||||||
.sidebar-actions
|
.sidebar-actions
|
||||||
.sidebar-shortcuts
|
.sidebar-shortcuts
|
||||||
a.board-header-btn.js-shortcuts(title="{{_ 'keyboard-shortcuts' }}")
|
a.sidebar-btn.js-shortcuts(title="{{_ 'keyboard-shortcuts' }}")
|
||||||
i.fa.fa-keyboard-o
|
i.fa.fa-keyboard-o
|
||||||
span {{_ 'keyboard-shortcuts' }}
|
span {{_ 'keyboard-shortcuts' }}
|
||||||
|
a.sidebar-btn.js-keyboard-shortcuts-toggle(
|
||||||
|
title="{{#if isKeyboardShortcuts}}{{_ 'keyboard-shortcuts-enabled'}}{{else}}{{_ 'keyboard-shortcuts-disabled'}}{{/if}}")
|
||||||
|
i.fa(class="fa-solid fa-{{#if isKeyboardShortcuts}}check-square-o{{else}}ban{{/if}}")
|
||||||
a.sidebar-xmark.js-close-sidebar ✕
|
a.sidebar-xmark.js-close-sidebar ✕
|
||||||
.sidebar-content.js-board-sidebar-content
|
.sidebar-content.js-board-sidebar-content
|
||||||
//a.hide-btn.js-hide-sidebar
|
//a.hide-btn.js-hide-sidebar
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,11 @@ BlazeComponent.extendComponent({
|
||||||
else return `${TAPi18n.__('sidebar-open')}`;
|
else return `${TAPi18n.__('sidebar-open')}`;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isKeyboardShortcuts() {
|
||||||
|
const user = ReactiveCache.getCurrentUser();
|
||||||
|
return user && user.isKeyboardShortcuts();
|
||||||
|
},
|
||||||
|
|
||||||
events() {
|
events() {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
|
|
@ -126,6 +131,9 @@ BlazeComponent.extendComponent({
|
||||||
'click .js-shortcuts'() {
|
'click .js-shortcuts'() {
|
||||||
FlowRouter.go('shortcuts');
|
FlowRouter.go('shortcuts');
|
||||||
},
|
},
|
||||||
|
'click .js-keyboard-shortcuts-toggle'() {
|
||||||
|
ReactiveCache.getCurrentUser().toggleKeyboardShortcuts();
|
||||||
|
},
|
||||||
'click .js-close-sidebar'() {
|
'click .js-close-sidebar'() {
|
||||||
Sidebar.toggle()
|
Sidebar.toggle()
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue