Better folder unread-count view

This commit is contained in:
djmaze 2021-07-30 12:26:27 +02:00
parent cbecdd93a0
commit 0659b126e7
6 changed files with 31 additions and 56 deletions

View file

@ -280,21 +280,21 @@ export class FolderModel extends AbstractModel {
unread = folder.messageCountUnread(),
type = folder.type();
if (0 < count) {
if (count) {
if (FolderType.Draft === type) {
return '' + count;
return count;
}
if (
0 < unread &&
unread &&
FolderType.Trash !== type &&
FolderType.Archive !== type &&
FolderType.SentItems !== type
) {
return '' + unread;
return unread;
}
}
return '';
return null;
},
canBeDeleted: () => !folder.isSystemFolder() && !folder.subFolders.length,

View file

@ -17,7 +17,6 @@
@import "../../vendors/bootstrap/less/modals.less";
@import "../../vendors/bootstrap/less/utilities.less";
@import "../../vendors/bootstrap/less/navs.less";
@import "../../vendors/bootstrap/less/labels-badges.less";
@import "_FontasticToBoot.less";
@import "_BootstrapFix.less";

View file

@ -19,12 +19,6 @@
transparent 75%, transparent);
}
.b-folders-user {
a.print-count.system .badge {
display: none !important;
}
}
.b-toolbar {
position: absolute;
top: 0;
@ -148,20 +142,6 @@
color: grey;
}
.count {
position: relative;
display: none;
margin-top: 5px;
line-height: 19px;
}
&.print-count {
font-weight: bold;
.count {
display: inline;
}
}
&.unread-sub {
font-weight: bold;
}
@ -176,6 +156,10 @@
}
}
a[data-unread] {
font-weight: bold;
}
.b-sub-folders.collapsed {
max-height: 0;
height: 0;
@ -183,6 +167,23 @@
}
}
.b-folders-system a[data-unread]::after,
.b-folders-user a[data-unread]:not(.system)::after
{
content: attr(data-unread);
background-color: @grayLight;
border-radius: 9px;
color: @white;
float: right;
font-size: 80%;
line-height: 19px;
margin-top: 5px;
min-width: 1em;
padding: 1px 4px;
text-align: center;
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
}
&.inbox-is-starred {
.flagged {
color: orange;