mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-26 16:26:44 +03:00
Replace {'inbox-star-icon': isInboxStarred} with {'flag-icon': isFlagged} for future improvements
This commit is contained in:
parent
db1615f2ca
commit
8934205ede
6 changed files with 14 additions and 17 deletions
|
|
@ -10,6 +10,7 @@ import * as Local from 'Storage/Client';
|
|||
|
||||
import { AppUserStore } from 'Stores/User/App';
|
||||
import { FolderUserStore } from 'Stores/User/Folder';
|
||||
import { MessageUserStore } from 'Stores/User/Message';
|
||||
import { SettingsUserStore } from 'Stores/User/Settings';
|
||||
|
||||
import ko from 'ko';
|
||||
|
|
@ -252,6 +253,9 @@ export class FolderModel extends AbstractModel {
|
|||
|
||||
isInbox: () => FolderType.Inbox === folder.type(),
|
||||
|
||||
isFlagged: () => FolderUserStore.currentFolder() === folder
|
||||
&& MessageUserStore.listSearch().trim().includes('is:flagged'),
|
||||
|
||||
hasSubscribedSubfolders:
|
||||
() => !!folder.subFolders().find(
|
||||
oFolder => {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import { PgpUserStore } from 'Stores/User/Pgp';
|
|||
import { SettingsUserStore } from 'Stores/User/Settings';
|
||||
import { NotificationUserStore } from 'Stores/User/Notification';
|
||||
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
//import Remote from 'Remote/User/Fetch'; Circular dependency
|
||||
|
||||
const
|
||||
hcont = Element.fromHTML('<div area="hidden" style="position:absolute;left:-5000px"></div>'),
|
||||
|
|
@ -617,7 +617,7 @@ export const MessageUserStore = new class {
|
|||
if (oMessage) {
|
||||
preload || this.hideMessageBodies();
|
||||
preload || this.messageLoading(true);
|
||||
Remote.message((iError, oData, bCached) => {
|
||||
rl.app.Remote.message((iError, oData, bCached) => {
|
||||
if (iError) {
|
||||
if (Notification.RequestAborted !== iError && !preload) {
|
||||
this.message(null);
|
||||
|
|
|
|||
|
|
@ -175,15 +175,15 @@
|
|||
right: 0;
|
||||
}
|
||||
|
||||
.inbox-star-icon {
|
||||
.flag-icon {
|
||||
margin-left: 7px;
|
||||
}
|
||||
.inbox-star-icon::after {
|
||||
.flag-icon::after {
|
||||
content:'☆';
|
||||
opacity: .5;
|
||||
}
|
||||
&.inbox-is-starred {
|
||||
.inbox-star-icon::after {
|
||||
.is-flagged {
|
||||
.flag-icon::after {
|
||||
color: orange;
|
||||
content:'★';
|
||||
opacity: 1;
|
||||
|
|
|
|||
|
|
@ -40,13 +40,6 @@ export class FolderListMailBoxUserView extends AbstractViewLeft {
|
|||
this.allowContacts = AppUserStore.allowContacts();
|
||||
|
||||
this.folderListFocused = ko.computed(() => Scope.FolderList === AppUserStore.focusedState());
|
||||
|
||||
this.isInboxStarred = ko.computed(
|
||||
() =>
|
||||
FolderUserStore.currentFolder() &&
|
||||
FolderUserStore.currentFolder().isInbox() &&
|
||||
MessageUserStore.listSearch().trim().includes('is:flagged')
|
||||
);
|
||||
}
|
||||
|
||||
onBuild(dom) {
|
||||
|
|
@ -93,7 +86,7 @@ export class FolderListMailBoxUserView extends AbstractViewLeft {
|
|||
setFolderHash(folder.fullNameRaw, '');
|
||||
}
|
||||
|
||||
rl.route.setHash((eqs(event, '.b-folders li a.selectable .inbox-star-icon') && !this.isInboxStarred())
|
||||
rl.route.setHash((eqs(event, '.b-folders li a.selectable .flag-icon') && !folder.isFlagged())
|
||||
? mailBox(folder.fullNameHash, 1, 'is:flagged')
|
||||
: mailBox(folder.fullNameHash)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="b-folders g-ui-user-select-none" data-bind="css: {'focused': folderListFocused, 'single-root-inbox': foldersListWithSingleInboxRootFolder, 'inbox-is-starred': isInboxStarred}">
|
||||
<div class="b-folders g-ui-user-select-none" data-bind="css: {'focused': folderListFocused, 'single-root-inbox': foldersListWithSingleInboxRootFolder}">
|
||||
<div class="b-toolbar btn-toolbar hide-mobile">
|
||||
<a class="btn buttonCompose" data-bind="visible: allowComposer, click: composeClick, css: {'btn-warning': composeInEdit, 'btn-success': !composeInEdit()}" data-i18n="[title]FOLDER_LIST/BUTTON_NEW_MESSAGE">
|
||||
<i class="icon-paper-plane"></i>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<li>
|
||||
<a data-bind="dropmessages: $data,
|
||||
css: { 'selected': selected, 'selectable': selectable, 'anim-action-class': actionBlink },
|
||||
css: { 'selected': selected, 'selectable': selectable, 'anim-action-class': actionBlink, 'is-flagged': isFlagged },
|
||||
attr: { 'data-unread': printableUnreadCount }">
|
||||
<!-- ko text: localName --><!-- /ko -->
|
||||
<!-- ko if: isInbox -->
|
||||
<span class="inbox-star-icon fontastic"></span>
|
||||
<span class="flag-icon fontastic"></span>
|
||||
<!-- /ko -->
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue