mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 15:45:55 +08:00
Added icon to system folders
This commit is contained in:
parent
eaf405e250
commit
cc03185ea0
|
@ -467,6 +467,19 @@ export class FolderModel extends AbstractModel {
|
||||||
|
|
||||||
detailedName: () => this.name() + ' ' + this.nameInfo(),
|
detailedName: () => this.name() + ' ' + this.nameInfo(),
|
||||||
|
|
||||||
|
icon: () => {
|
||||||
|
switch (this.type())
|
||||||
|
{
|
||||||
|
case 1: return '📥'; // FolderType.Inbox
|
||||||
|
case 2: return '📧'; // FolderType.Sent icon-paper-plane
|
||||||
|
case 3: return '🗎'; // FolderType.Drafts
|
||||||
|
case 4: return '⚠'; // FolderType.Junk
|
||||||
|
case 5: return '🗑'; // FolderType.Trash
|
||||||
|
case 6: return '🗄'; // FolderType.Archive
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
|
||||||
hasSubscribedUnreadMessagesSubfolders: () =>
|
hasSubscribedUnreadMessagesSubfolders: () =>
|
||||||
!!this.subFolders().find(
|
!!this.subFolders().find(
|
||||||
folder => folder.unreadEmails() | folder.hasSubscribedUnreadMessagesSubfolders()
|
folder => folder.unreadEmails() | folder.hasSubscribedUnreadMessagesSubfolders()
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<li>
|
<li>
|
||||||
<a data-bind="dropmessages: $data,
|
<a data-bind="dropmessages: $data,
|
||||||
css: { 'selected': selected, 'selectable': selectable, 'anim-action-class': actionBlink, 'is-flagged': isFlagged },
|
css: { 'selected': selected, 'selectable': selectable, 'anim-action-class': actionBlink, 'is-flagged': isFlagged },
|
||||||
attr: { 'data-unread': unreadCount }">
|
attr: { 'data-icon': icon, 'data-unread': unreadCount }">
|
||||||
<!-- ko text: localName --><!-- /ko -->
|
<!-- ko text: localName --><!-- /ko -->
|
||||||
<!-- ko if: isInbox -->
|
<!-- ko if: isInbox -->
|
||||||
<span class="flag-icon fontastic"></span>
|
<span class="flag-icon fontastic"></span>
|
||||||
|
|
|
@ -6,27 +6,27 @@
|
||||||
<div class="form-horizontal">
|
<div class="form-horizontal">
|
||||||
<div class="alert" data-bind="visible: '' !== notification()" data-bind="text: notification"></div>
|
<div class="alert" data-bind="visible: '' !== notification()" data-bind="text: notification"></div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label data-i18n="FOLDER_LIST/SENT_NAME"></label>
|
<label data-icon="📧" data-i18n="FOLDER_LIST/SENT_NAME"></label>
|
||||||
<select data-bind="options: folderSelectList, value: sentFolder,
|
<select data-bind="options: folderSelectList, value: sentFolder,
|
||||||
optionsText: 'name', optionsValue: 'id', optionsAfterRender: $root.defaultOptionsAfterRender"></select>
|
optionsText: 'name', optionsValue: 'id', optionsAfterRender: $root.defaultOptionsAfterRender"></select>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label data-i18n="FOLDER_LIST/DRAFTS_NAME"></label>
|
<label data-icon="🗎" data-i18n="FOLDER_LIST/DRAFTS_NAME"></label>
|
||||||
<select data-bind="options: folderSelectList, value: draftsFolder,
|
<select data-bind="options: folderSelectList, value: draftsFolder,
|
||||||
optionsText: 'name', optionsValue: 'id', optionsAfterRender: defaultOptionsAfterRender"></select>
|
optionsText: 'name', optionsValue: 'id', optionsAfterRender: defaultOptionsAfterRender"></select>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label data-i18n="GLOBAL/SPAM"></label>
|
<label data-icon="⚠" data-i18n="GLOBAL/SPAM"></label>
|
||||||
<select data-bind="options: folderSelectList, value: spamFolder,
|
<select data-bind="options: folderSelectList, value: spamFolder,
|
||||||
optionsText: 'name', optionsValue: 'id', optionsAfterRender: $root.defaultOptionsAfterRender"></select>
|
optionsText: 'name', optionsValue: 'id', optionsAfterRender: $root.defaultOptionsAfterRender"></select>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label data-i18n="FOLDER_LIST/TRASH_NAME"></label>
|
<label data-icon="🗑" data-i18n="FOLDER_LIST/TRASH_NAME"></label>
|
||||||
<select data-bind="options: folderSelectList, value: trashFolder,
|
<select data-bind="options: folderSelectList, value: trashFolder,
|
||||||
optionsText: 'name', optionsValue: 'id', optionsAfterRender: $root.defaultOptionsAfterRender"></select>
|
optionsText: 'name', optionsValue: 'id', optionsAfterRender: $root.defaultOptionsAfterRender"></select>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label data-i18n="FOLDER_LIST/ARCHIVE_NAME"></label>
|
<label data-icon="🗄" data-i18n="FOLDER_LIST/ARCHIVE_NAME"></label>
|
||||||
<select data-bind="options: folderSelectList, value: archiveFolder,
|
<select data-bind="options: folderSelectList, value: archiveFolder,
|
||||||
optionsText: 'name', optionsValue: 'id', optionsAfterRender: $root.defaultOptionsAfterRender"></select>
|
optionsText: 'name', optionsValue: 'id', optionsAfterRender: $root.defaultOptionsAfterRender"></select>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue