"Auto List Width" is now at "List ☰ Set Width" popup.

Thanks to xet7 !

Fixes https://github.com/wekan/wekan/pull/5628
This commit is contained in:
Lauri Ojansivu 2024-12-25 06:43:02 +02:00
parent 14c9b70149
commit a862486ec3
5 changed files with 20 additions and 21 deletions

View file

@ -23,10 +23,6 @@ template(name="boardHeaderBar")
span
= currentBoard.stars
a.board-header-btn.js-auto-width-board(
title="{{#if isAutoWidth}}{{_ 'click-to-disable-auto-width'}}{{else}}{{_ 'click-to-enable-auto-width'}}{{/if}}")
i.fa(class="fa-solid fa-{{#if isAutoWidth}}compress{{else}}expand{{/if}}")
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")
@ -75,10 +71,6 @@ template(name="boardHeaderBar")
span
= currentBoard.stars
a.board-header-btn.js-auto-width-board(
title="{{#if isAutoWidth}}{{_ 'click-to-disable-auto-width'}}{{else}}{{_ 'click-to-enable-auto-width'}}{{/if}}")
i.fa(class="fa-solid fa-{{#if isAutoWidth}}compress{{else}}expand{{/if}}")
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")

View file

@ -39,12 +39,6 @@ BlazeComponent.extendComponent({
return user && user.hasStarred(boardId);
},
isAutoWidth() {
const boardId = Utils.getCurrentBoardId();
const user = ReactiveCache.getCurrentUser();
return user && user.isAutoWidth(boardId);
},
isKeyboardShortcuts() {
const user = ReactiveCache.getCurrentUser();
return user && user.isKeyboardShortcuts();
@ -83,10 +77,6 @@ BlazeComponent.extendComponent({
'click .js-star-board'() {
ReactiveCache.getCurrentUser().toggleBoardStar(Session.get('currentBoard'));
},
'click .js-auto-width-board'() {
dragscroll.reset();
ReactiveCache.getCurrentUser().toggleAutoWidth(Utils.getCurrentBoardId());
},
'click .js-keyboard-shortcuts-toggle'() {
ReactiveCache.getCurrentUser().toggleKeyboardShortcuts();
},