mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 16:33:47 +03:00
webmail: make double click on mailbox expand/collapse, and make mailbox text unselectable (so the double click doesn't also select text)
This commit is contained in:
parent
941a2311f0
commit
9bc860e207
3 changed files with 21 additions and 1 deletions
|
@ -49,7 +49,7 @@ table.search td { padding: .25em; }
|
|||
.keyword { background-color: gold; color: black; border: 1px solid #8c7600; padding: 0 .15em; border-radius: .15em; font-weight: normal; font-size: .9em; margin: 0 .15em; white-space: nowrap; }
|
||||
.keyword.keywordcollapsed { background-color: #ffeb7e; color: #333; }
|
||||
.mailbox { padding: .15em .25em; }
|
||||
.mailboxitem { cursor: pointer; border-radius: .15em; }
|
||||
.mailboxitem { cursor: pointer; border-radius: .15em; user-select: none; }
|
||||
.mailboxitem.dropping { background: gold !important; }
|
||||
.mailboxitem:hover { background: #eee; }
|
||||
.mailboxitem.active { background: linear-gradient(135deg, #ffc7ab 0%, #ffdeab 100%); }
|
||||
|
|
|
@ -4300,6 +4300,16 @@ const newMailboxView = (xmb, mailboxlistView, otherMailbox) => {
|
|||
else if (e.key === 'b') {
|
||||
cmdOpenActions();
|
||||
}
|
||||
}, async function dblclick() {
|
||||
if (mailboxlistView.mailboxLeaf(mbv)) {
|
||||
return;
|
||||
}
|
||||
if (settings.mailboxCollapsed[mbv.mailbox.ID]) {
|
||||
cmdExpand();
|
||||
}
|
||||
else {
|
||||
cmdCollapse();
|
||||
}
|
||||
}, async function click() {
|
||||
mbv.root.focus();
|
||||
await withStatus('Opening mailbox', mbv.open(true));
|
||||
|
|
|
@ -4157,6 +4157,16 @@ const newMailboxView = (xmb: api.Mailbox, mailboxlistView: MailboxlistView, othe
|
|||
cmdOpenActions()
|
||||
}
|
||||
},
|
||||
async function dblclick() {
|
||||
if (mailboxlistView.mailboxLeaf(mbv)) {
|
||||
return
|
||||
}
|
||||
if (settings.mailboxCollapsed[mbv.mailbox.ID]) {
|
||||
cmdExpand()
|
||||
} else {
|
||||
cmdCollapse()
|
||||
}
|
||||
},
|
||||
async function click() {
|
||||
mbv.root.focus()
|
||||
await withStatus('Opening mailbox', mbv.open(true))
|
||||
|
|
Loading…
Reference in a new issue