This commit is contained in:
the-djmaze 2024-02-11 20:48:03 +01:00
parent ec5d570ac6
commit 4c84c6cdfc
5 changed files with 15 additions and 6 deletions

View file

@ -21,7 +21,7 @@ import { AbstractModel } from 'Knoin/AbstractModel';
import { /*koComputable,*/ addObservablesTo } from 'External/ko'; import { /*koComputable,*/ addObservablesTo } from 'External/ko';
//import { mailBox } from 'Common/Links'; import { mailBox } from 'Common/Links';
import Remote from 'Remote/User/Fetch'; import Remote from 'Remote/User/Fetch';
@ -476,7 +476,7 @@ export class FolderModel extends AbstractModel {
folder => folder.unreadCount() | folder.hasSubscribedUnreadMessagesSubfolders() folder => folder.unreadCount() | folder.hasSubscribedUnreadMessagesSubfolders()
).length ).length
*/ */
// ,href: () => this.canBeSelected() && mailBox(this.fullNameHash) ,href: () => this.canBeSelected() && mailBox(this.fullNameHash)
}); });
} }

View file

@ -17,11 +17,14 @@
width: 100%; width: 100%;
} }
/* https://github.com/the-djmaze/snappymail/issues/1427 /* https://github.com/the-djmaze/snappymail/issues/1427 */
#V-MailFolderList .e-checkbox {
margin: 0 4px;
width: calc(100% - 8px);
}
#V-MailFolderList .unreadOnly li a:not(.unread-sub):not([data-unread]) { #V-MailFolderList .unreadOnly li a:not(.unread-sub):not([data-unread]) {
display:none; display:none;
} }
*/
.b-folders { .b-folders {
display: flex; display: flex;

View file

@ -39,6 +39,8 @@ export class MailFolderList extends AbstractViewLeft {
this.foldersFilter = foldersFilter; this.foldersFilter = foldersFilter;
this.filterUnseen = ko.observable(false);
addComputablesTo(this, { addComputablesTo(this, {
foldersFilterVisible: () => 20 < FolderUserStore.folderList().CountRec, foldersFilterVisible: () => 20 < FolderUserStore.folderList().CountRec,

View file

@ -24,7 +24,11 @@
<input type="search" id="folderSearchInput" data-bind="textInput: foldersFilter" data-i18n="[placeholder]GLOBAL/SEARCH"> <input type="search" id="folderSearchInput" data-bind="textInput: foldersFilter" data-i18n="[placeholder]GLOBAL/SEARCH">
<a data-bind="click: clearFolderSearch, visible: foldersFilter"></a> <a data-bind="click: clearFolderSearch, visible: foldersFilter"></a>
</div> </div>
<ul class="b-folders-user" data-bind="template: { name: 'MailFolderListItem', foreach: folderListVisible }"></ul> <div class="e-checkbox" tabindex="0" data-bind="toggle: filterUnseen">
<i role="checkbox" class="fontastic" data-bind="text: filterUnseen() ? '☑' : '☐'"></i>
<span data-i18n="SEARCH/UNSEEN"></span>
</div>
<ul class="b-folders-user" data-bind="css: {unreadOnly: filterUnseen}, template: { name: 'MailFolderListItem', foreach: folderListVisible }"></ul>
<div class="move-action-content-wrapper" data-bind="visible: moveAction"></div> <div class="move-action-content-wrapper" data-bind="visible: moveAction"></div>
</div> </div>
<div class="b-footer btn-toolbar"> <div class="b-footer btn-toolbar">

View file

@ -1,7 +1,7 @@
<li> <li>
<a data-bind="dropmessages: $data, <a data-bind="dropmessages: $data,
css: { 'selected': selected() && !isSystemFolder(), 'system': isSystemFolder, 'selectable': canBeSelected, 'unread-sub': hasSubscribedUnreadMessagesSubfolders, 'anim-action-class': actionBlink }, css: { 'selected': selected() && !isSystemFolder(), 'system': isSystemFolder, 'selectable': canBeSelected, 'unread-sub': hasSubscribedUnreadMessagesSubfolders, 'anim-action-class': actionBlink },
attr: { 'data-unread': unreadCount }"> attr: { 'data-unread': unreadCount, href: href }">
<i data-bind="css: collapsedCss()"></i> <i data-bind="css: collapsedCss()"></i>
<!-- ko text: name --><!-- /ko --> <!-- ko text: name --><!-- /ko -->
</a> </a>