mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Add auto-width board-header toggle
This commit is contained in:
parent
2ebff3a864
commit
fb34dd6114
3 changed files with 12 additions and 3 deletions
|
@ -23,7 +23,7 @@ template(name="boardHeaderBar")
|
|||
span
|
||||
= currentBoard.stars
|
||||
|
||||
a.board-header-btn.js-auto-width-board(class="{{#if isAutoWidth}}is-active{{/if}}"
|
||||
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}}")
|
||||
|
||||
|
@ -70,7 +70,7 @@ template(name="boardHeaderBar")
|
|||
span
|
||||
= currentBoard.stars
|
||||
|
||||
a.board-header-btn.js-auto-width-board(class="{{#if isAutoWidth}}is-active{{/if}}"
|
||||
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}}")
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ BlazeComponent.extendComponent({
|
|||
isAutoWidth() {
|
||||
const boardId = Session.get('currentBoard');
|
||||
const user = ReactiveCache.getCurrentUser();
|
||||
return user && user.hasAutoWidth(boardId);
|
||||
return user && user.isAutoWidth(boardId);
|
||||
},
|
||||
|
||||
// Only show the star counter if the number of star is greater than 2
|
||||
|
|
|
@ -417,6 +417,15 @@ Users.attachSchema(
|
|||
defaultValue: {},
|
||||
blackbox: true,
|
||||
},
|
||||
'profile.autoWidthBoards': {
|
||||
/**
|
||||
* User-specified flag for enabling auto-width for boards (false is the default).
|
||||
* profile[boardId][listId] = constraint;
|
||||
*/
|
||||
type: Object,
|
||||
defaultValue: {},
|
||||
blackbox: true,
|
||||
},
|
||||
'profile.swimlaneHeights': {
|
||||
/**
|
||||
* User-specified heights of each swimlane (or nothing if default).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue