mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-24 14:57:26 +08:00
Cleanup folder handling a bit
This commit is contained in:
parent
421efc62ad
commit
18dc2889ce
6 changed files with 10 additions and 20 deletions
|
@ -1,5 +1,4 @@
|
|||
import ko from 'ko';
|
||||
import { koComputable } from 'External/ko';
|
||||
|
||||
import { Notification } from 'Common/Enums';
|
||||
import { FolderMetadataKeys } from 'Common/EnumsUser';
|
||||
|
@ -48,14 +47,7 @@ export class UserSettingsFolders /*extends AbstractViewSettings*/ {
|
|||
this.folderListError = FolderUserStore.folderListError;
|
||||
this.hideUnsubscribed = SettingsUserStore.hideUnsubscribed;
|
||||
|
||||
this.loading = koComputable(() => {
|
||||
const loading = FolderUserStore.foldersLoading(),
|
||||
creating = FolderUserStore.foldersCreating(),
|
||||
deleting = FolderUserStore.foldersDeleting(),
|
||||
renaming = FolderUserStore.foldersRenaming();
|
||||
|
||||
return loading || creating || deleting || renaming;
|
||||
});
|
||||
this.loading = FolderUserStore.foldersChanging;
|
||||
|
||||
this.folderForDeletion = folderForDeletion;
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ export const FolderUserStore = new class {
|
|||
foldersChanging: () =>
|
||||
self.foldersLoading() | self.foldersCreating() | self.foldersDeleting() | self.foldersRenaming(),
|
||||
|
||||
folderListSystemNames: () => {
|
||||
systemFoldersNames: () => {
|
||||
const list = [getFolderInboxName()],
|
||||
others = [self.sentFolder(), self.draftsFolder(), self.spamFolder(), self.trashFolder(), self.archiveFolder()];
|
||||
|
||||
|
@ -74,8 +74,8 @@ export const FolderUserStore = new class {
|
|||
return list;
|
||||
},
|
||||
|
||||
folderListSystem: () =>
|
||||
self.folderListSystemNames().map(name => getFolderFromCacheList(name)).filter(v => v)
|
||||
systemFolders: () =>
|
||||
self.systemFoldersNames().map(name => getFolderFromCacheList(name)).filter(v => v)
|
||||
});
|
||||
|
||||
const
|
||||
|
|
|
@ -19,7 +19,7 @@ export class FolderSystemPopupView extends AbstractViewPopup {
|
|||
|
||||
this.folderSelectList = koComputable(() =>
|
||||
folderListOptionsBuilder(
|
||||
FolderUserStore.folderListSystemNames(),
|
||||
FolderUserStore.systemFoldersNames(),
|
||||
[
|
||||
['', i18n('POPUPS_SYSTEM_FOLDERS/SELECT_CHOOSE_ONE')],
|
||||
[UNUSED_OPTION_VALUE, i18n('POPUPS_SYSTEM_FOLDERS/SELECT_UNUSE_NAME')]
|
||||
|
|
|
@ -31,9 +31,7 @@ export class MailFolderList extends AbstractViewLeft {
|
|||
|
||||
this.composeInEdit = AppUserStore.composeInEdit;
|
||||
|
||||
this.folderList = FolderUserStore.folderList;
|
||||
this.folderListSystem = FolderUserStore.folderListSystem;
|
||||
this.foldersChanging = FolderUserStore.foldersChanging;
|
||||
this.systemFolders = FolderUserStore.systemFolders;
|
||||
|
||||
this.moveAction = moveAction;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<a class="btn buttonContacts fontastic" data-bind="visible: allowContacts, click: contactsClick" data-i18n="[title]GLOBAL/CONTACTS">📇</a>
|
||||
</div>
|
||||
<div class="b-content">
|
||||
<ul class="b-folders-system" data-bind="foreach: folderListSystem">
|
||||
<ul class="b-folders-system" data-bind="foreach: systemFolders">
|
||||
<li>
|
||||
<a data-bind="dropmessages: $data,
|
||||
css: { 'selected': selected, 'selectable': selectable, 'anim-action-class': actionBlink, 'is-flagged': isFlagged },
|
||||
|
@ -32,7 +32,7 @@
|
|||
</div>
|
||||
<div class="btn-group hide-on-panel-disabled">
|
||||
<a class="btn" data-bind="click: createFolder" data-i18n="[title]POPUPS_CREATE_FOLDER/TITLE_CREATE_FOLDER">
|
||||
<i data-bind="css: {'icon-folder-add': !foldersChanging(), 'icon-spinner': foldersChanging()}"></i>
|
||||
<i class="icon-folder-add"></i>
|
||||
</a>
|
||||
<a class="btn fontastic" data-bind="click: configureFolders">⚙</a>
|
||||
</div>
|
||||
|
|
4
vendors/fontastic/styles.css
vendored
4
vendors/fontastic/styles.css
vendored
|
@ -68,10 +68,10 @@
|
|||
content: "\e033";
|
||||
}
|
||||
.icon-file-text::before {
|
||||
content: "\e034";
|
||||
content: "\e034"; /* 🖹 | 🖺 */
|
||||
}
|
||||
.icon-file-image::before {
|
||||
content: "\e036";
|
||||
content: "\e036"; /* 🖻 */
|
||||
}
|
||||
.icon-file-certificate::before {
|
||||
content: "\e038";
|
||||
|
|
Loading…
Reference in a new issue