mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 07:35:55 +08:00
Added "copy to" action in menu's for #1559
This commit is contained in:
parent
0aa48a8dd4
commit
53a6f04f18
|
@ -20,7 +20,8 @@ import { isArray } from 'Common/Utils';
|
|||
|
||||
export const
|
||||
|
||||
moveAction = ko.observable(false),
|
||||
// 1 = move, 2 = copy
|
||||
moveAction = ko.observable(0),
|
||||
|
||||
dropdownsDetectVisibility = (() =>
|
||||
dropdownVisibility(!!dropdowns.find(item => item.classList.contains('show')))
|
||||
|
@ -359,5 +360,5 @@ populateMessageBody = (oMessage, popup) => {
|
|||
}
|
||||
};
|
||||
|
||||
leftPanelDisabled.subscribe(value => value && moveAction(false));
|
||||
leftPanelDisabled.subscribe(value => value && moveAction(0));
|
||||
moveAction.subscribe(value => value && leftPanelDisabled(false));
|
||||
|
|
|
@ -109,7 +109,7 @@ export class MailBoxUserScreen extends AbstractScreen {
|
|||
*/
|
||||
onBuild() {
|
||||
doc.addEventListener('click', event =>
|
||||
event.target.closest('#rl-right') && moveAction(false)
|
||||
event.target.closest('#rl-right') && moveAction(0)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -77,13 +77,14 @@ export class MailFolderList extends AbstractViewLeft {
|
|||
const folder = ko.dataFor(el);
|
||||
if (folder) {
|
||||
if (moveAction()) {
|
||||
moveAction(false);
|
||||
let messages = MessagelistUserStore.listCheckedOrSelectedUidsWithSubMails();
|
||||
const copy = event.ctrlKey || 2 === moveAction(),
|
||||
messages = MessagelistUserStore.listCheckedOrSelectedUidsWithSubMails();
|
||||
moveAction(0);
|
||||
messages.size && MessagelistUserStore.moveMessages(
|
||||
messages.folder,
|
||||
messages,
|
||||
folder.fullName,
|
||||
event.ctrlKey
|
||||
copy
|
||||
);
|
||||
} else {
|
||||
if (!SettingsUserStore.usePreviewPane()) {
|
||||
|
@ -160,7 +161,7 @@ export class MailFolderList extends AbstractViewLeft {
|
|||
// addShortcut('tab', 'shift', ScopeFolderList, () => {
|
||||
addShortcut('escape,tab,arrowright', '', ScopeFolderList, () => {
|
||||
AppUserStore.focusedState(ScopeMessageList);
|
||||
moveAction(false);
|
||||
moveAction(0);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -331,6 +331,7 @@ export class MailMessageList extends AbstractViewRight {
|
|||
spamCommand: canBeMovedHelper,
|
||||
notSpamCommand: canBeMovedHelper,
|
||||
moveCommand: canBeMovedHelper,
|
||||
copyCommand: canBeMovedHelper
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -415,18 +416,26 @@ export class MailMessageList extends AbstractViewRight {
|
|||
moveMessagesToFolderType(FolderType.Inbox);
|
||||
}
|
||||
|
||||
moveCommand(vm, event) {
|
||||
moveOrCopy(vm, event, mode) {
|
||||
if (canBeMovedHelper()) {
|
||||
if (vm && event?.preventDefault) {
|
||||
stopEvent(event);
|
||||
}
|
||||
|
||||
let b = moveAction();
|
||||
AppUserStore.focusedState(b ? ScopeMessageList : ScopeFolderList);
|
||||
moveAction(!b);
|
||||
let i = moveAction();
|
||||
AppUserStore.focusedState(i ? ScopeMessageList : ScopeFolderList);
|
||||
moveAction(i ? 0 : mode);
|
||||
}
|
||||
}
|
||||
|
||||
moveCommand(vm, event) {
|
||||
this.moveOrCopy(vm, event, 1);
|
||||
}
|
||||
|
||||
copyCommand(vm, event) {
|
||||
this.moveOrCopy(vm, event, 2);
|
||||
}
|
||||
|
||||
composeClick() {
|
||||
showMessageComposer();
|
||||
}
|
||||
|
|
|
@ -240,6 +240,7 @@ export class MailMessageView extends AbstractViewRight {
|
|||
decorateKoCommands(this, {
|
||||
editCommand: self => self.messageVisible(),
|
||||
moveCommand: self => self.messageVisible(),
|
||||
copyCommand: self => self.messageVisible(),
|
||||
goUpCommand: self => !self.messageListOrViewLoading(),
|
||||
goDownCommand: self => !self.messageListOrViewLoading()
|
||||
});
|
||||
|
@ -257,13 +258,21 @@ export class MailMessageView extends AbstractViewRight {
|
|||
currentMessage() && showMessageComposer([ComposeType.Draft, currentMessage()]);
|
||||
}
|
||||
|
||||
moveCommand(vm, event) {
|
||||
moveOrCopy(vm, event, mode) {
|
||||
if (vm && event?.preventDefault) {
|
||||
stopEvent(event);
|
||||
}
|
||||
this.actionsMenu().ddBtn.hide();
|
||||
AppUserStore.focusedState(ScopeFolderList);
|
||||
moveAction(true);
|
||||
moveAction(mode);
|
||||
}
|
||||
|
||||
moveCommand(vm, event) {
|
||||
this.moveOrCopy(vm, event, 1);
|
||||
}
|
||||
|
||||
copyCommand(vm, event) {
|
||||
this.moveOrCopy(vm, event, 2);
|
||||
}
|
||||
|
||||
setUnseen() {
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "تسجيل الخروج",
|
||||
"MORE": "المزيد",
|
||||
"MOVE_TO": "..انقل الى",
|
||||
"COPY_TO": "نسخ الى",
|
||||
"NAME": "البريد الوارد",
|
||||
"NONE": "None",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Выйсці",
|
||||
"MORE": "Яшчэ",
|
||||
"MOVE_TO": "Перамясціць у",
|
||||
"COPY_TO": "Скапіраваць у",
|
||||
"NAME": "Імя",
|
||||
"NONE": "Нічога",
|
||||
"TO_SPAM": "Перамясціць паведамленне(-і) у Спам",
|
||||
|
@ -455,7 +456,7 @@
|
|||
"HIDE_DELETED_MESSAGES": "Схаваць паведамленні, азначаныя для выдалення",
|
||||
"USE_CHECKBOXES_IN_LIST": "Паказваць сцяжкі ў спісах",
|
||||
"USE_THREADS": "Згортваць лісты ў перапісках",
|
||||
"THREADS ALGORITHM": "Алгарытм нітак",
|
||||
"THREAD_ALGORITHM": "Threads algorithm",
|
||||
"REPLY_SAME_FOLDER": "Змяшчаць адказы ў той жа каталог, дзе знаходзіцца арыгінал",
|
||||
"PREFER_HTML": "Аддаваць перавагу HTML замест звычайнага тэксту",
|
||||
"PREFER_HTML_INFO": "Паведамленні часамі прыходзяць у абодвух фарматах. Гэты параметр вызначае, ці вы хочаце каб адлюстроўвалася HTML-частка ці звычайны тэкст.",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Изход",
|
||||
"MORE": "Още",
|
||||
"MOVE_TO": "Премести в",
|
||||
"COPY_TO": "Копирай в",
|
||||
"NAME": "Вх. кутия",
|
||||
"NONE": "Няма",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Odhlásit",
|
||||
"MORE": "Více",
|
||||
"MOVE_TO": "Přesunout do",
|
||||
"COPY_TO": "Kopírovat do",
|
||||
"NAME": "Přijaté",
|
||||
"NONE": "Žádný",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Log ud",
|
||||
"MORE": "Mere",
|
||||
"MOVE_TO": "Flyt til",
|
||||
"COPY_TO": "Kopier til",
|
||||
"NAME": "Indbakke",
|
||||
"NONE": "Ingen",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Abmelden",
|
||||
"MORE": "Mehr",
|
||||
"MOVE_TO": "Verschieben nach",
|
||||
"COPY_TO": "Kopieren nach",
|
||||
"NAME": "Name",
|
||||
"NONE": "Keine",
|
||||
"TO_SPAM": "Nachricht(en) zu Spam verschieben",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Έξοδος",
|
||||
"MORE": "Περισσότερα",
|
||||
"MOVE_TO": "Μετακίνησε σε",
|
||||
"COPY_TO": "Αντέγραψε στο",
|
||||
"NAME": "Εισερχόμενα",
|
||||
"NONE": "Κανένα",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Logout",
|
||||
"MORE": "More",
|
||||
"MOVE_TO": "Move To",
|
||||
"COPY_TO": "Copy To",
|
||||
"NAME": "Name",
|
||||
"NONE": "None",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Cerrar sesión",
|
||||
"MORE": "Más",
|
||||
"MOVE_TO": "Mover",
|
||||
"COPY_TO": "Copiar a",
|
||||
"NAME": "Nombre",
|
||||
"NONE": "Ninguno",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Logi välja",
|
||||
"MORE": "Näita rohkem",
|
||||
"MOVE_TO": "Liiguta kausta",
|
||||
"COPY_TO": "Kopeeri",
|
||||
"NAME": "Saabunud kirjad",
|
||||
"NONE": "Puuduvad",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Saioa itxi",
|
||||
"MORE": "Gehiago",
|
||||
"MOVE_TO": "Mugitu",
|
||||
"COPY_TO": "Kopiatu hona",
|
||||
"NAME": "Izena",
|
||||
"NONE": "Bat ere ez",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "خروج",
|
||||
"MORE": "بیشتر",
|
||||
"MOVE_TO": "انتقال به",
|
||||
"COPY_TO": "کپی به",
|
||||
"NAME": "صندوق ورودی",
|
||||
"NONE": "هیچکدام",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Kirjaudu ulos",
|
||||
"MORE": "Lisää",
|
||||
"MOVE_TO": "Siirrä",
|
||||
"COPY_TO": "Kopioi",
|
||||
"NAME": "Postilaatikko",
|
||||
"NONE": "Ei mitään",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Déconnexion",
|
||||
"MORE": "Plus",
|
||||
"MOVE_TO": "Déplacer vers",
|
||||
"COPY_TO": "Copier",
|
||||
"NAME": "Nom",
|
||||
"NONE": "Aucun",
|
||||
"TO_SPAM": "Déplacer le(s) message(s) vers Indésirable",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Kilépés",
|
||||
"MORE": "Tovább",
|
||||
"MOVE_TO": "Áthelyezés ide",
|
||||
"COPY_TO": "Másold",
|
||||
"NAME": "Beérkező levelek",
|
||||
"NONE": "Semmi",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Keluar",
|
||||
"MORE": "Lagi",
|
||||
"MOVE_TO": "Pindahkan Ke",
|
||||
"COPY_TO": "Salin ke",
|
||||
"NAME": "Kotak Masuk",
|
||||
"NONE": "Tidak ada",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Útskrá",
|
||||
"MORE": "Meira",
|
||||
"MOVE_TO": "Færa í",
|
||||
"COPY_TO": "Afrita til",
|
||||
"NAME": "Innhólf",
|
||||
"NONE": "Ekkert",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Esci",
|
||||
"MORE": "Altro",
|
||||
"MOVE_TO": "Sposta in",
|
||||
"COPY_TO": "Copia a",
|
||||
"NAME": "Nome",
|
||||
"NONE": "Nessuno",
|
||||
"TO_SPAM": "Sposta messaggio\/i nel spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "ログアウト",
|
||||
"MORE": "その他",
|
||||
"MOVE_TO": "移動",
|
||||
"COPY_TO": "コピー先",
|
||||
"NAME": "受信トレイ",
|
||||
"NONE": "なし",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "로그아웃",
|
||||
"MORE": "더 보기",
|
||||
"MOVE_TO": "다음 위치로 이동",
|
||||
"COPY_TO": "에게 복사",
|
||||
"NAME": "받은 편지함",
|
||||
"NONE": "없음",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Atsijungti",
|
||||
"MORE": "Daugiau",
|
||||
"MOVE_TO": "Perkelti į",
|
||||
"COPY_TO": "Nukopijuoti",
|
||||
"NAME": "Gautieji",
|
||||
"NONE": "Nieko",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Izlogoties",
|
||||
"MORE": "Vairāk",
|
||||
"MOVE_TO": "Pārvietot uz",
|
||||
"COPY_TO": "Kopēt uz",
|
||||
"NAME": "Iesūtne",
|
||||
"NONE": "None",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Logg ut",
|
||||
"MORE": "Mer",
|
||||
"MOVE_TO": "Flytt til",
|
||||
"COPY_TO": "Kopier til",
|
||||
"NAME": "Innboks",
|
||||
"NONE": "Ingen",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Uitloggen",
|
||||
"MORE": "Meer",
|
||||
"MOVE_TO": "Verplaats naar",
|
||||
"COPY_TO": "Kopiëren naar",
|
||||
"NAME": "Naam",
|
||||
"NONE": "Geen",
|
||||
"TO_SPAM": "Verplaats bericht(en) naar Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Wyloguj",
|
||||
"MORE": "Więcej",
|
||||
"MOVE_TO": "Przenieś do",
|
||||
"COPY_TO": "Kopiuj do",
|
||||
"NAME": "Nazwa",
|
||||
"NONE": "Brak",
|
||||
"TO_SPAM": "Przenieś wiadomość(-ci) do spamu",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Sair",
|
||||
"MORE": "Mais",
|
||||
"MOVE_TO": "Mover Para",
|
||||
"COPY_TO": "Copiar para",
|
||||
"NAME": "Caixa de Entrada",
|
||||
"NONE": "Nenhum",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Sair",
|
||||
"MORE": "Mais",
|
||||
"MOVE_TO": "Mover para",
|
||||
"COPY_TO": "Copiar para",
|
||||
"NAME": "Nome",
|
||||
"NONE": "Nenhum",
|
||||
"TO_SPAM": "Mover mensagem(ns) para o Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Deconectare",
|
||||
"MORE": "Mai mult",
|
||||
"MOVE_TO": "Mută la",
|
||||
"COPY_TO": "Copiaza in",
|
||||
"NAME": "Intrări",
|
||||
"NONE": "None",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Выйти",
|
||||
"MORE": "Еще",
|
||||
"MOVE_TO": "Переместить в",
|
||||
"COPY_TO": "Скопировать в",
|
||||
"NAME": "Имя",
|
||||
"NONE": "Ничего",
|
||||
"TO_SPAM": "Переместить сообщение(-я) в Спам",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Odhlásiť",
|
||||
"MORE": "Viac",
|
||||
"MOVE_TO": "Presunúť do",
|
||||
"COPY_TO": "Kopírovať do",
|
||||
"NAME": "Prijaté",
|
||||
"NONE": "Žiadny",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Odjavi",
|
||||
"MORE": "Več",
|
||||
"MOVE_TO": "Premakni v",
|
||||
"COPY_TO": "Kopiraj v",
|
||||
"NAME": "Prejeto",
|
||||
"NONE": "Nobeno",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Logga ut",
|
||||
"MORE": "Mer",
|
||||
"MOVE_TO": "Flytta till",
|
||||
"COPY_TO": "Kopia till",
|
||||
"NAME": "Inkorg",
|
||||
"NONE": "Ingen",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Çıkış",
|
||||
"MORE": "devamı",
|
||||
"MOVE_TO": "Taşı",
|
||||
"COPY_TO": "Kopyala",
|
||||
"NAME": "Gelen Kutusu",
|
||||
"NONE": "None",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Вийти",
|
||||
"MORE": "Ще",
|
||||
"MOVE_TO": "Перемістити",
|
||||
"COPY_TO": "Копіювати в",
|
||||
"NAME": "Вхідні",
|
||||
"NONE": "None",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "Đăng xuất",
|
||||
"MORE": "More",
|
||||
"MOVE_TO": "Chuyển đến",
|
||||
"COPY_TO": "Sao chép vào",
|
||||
"NAME": "Tên gọi",
|
||||
"NONE": "Trống",
|
||||
"TO_SPAM": "Move message(s) to Spam",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "登出",
|
||||
"MORE": "更多",
|
||||
"MOVE_TO": "移至",
|
||||
"COPY_TO": "复制到",
|
||||
"NAME": "名稱",
|
||||
"NONE": "無",
|
||||
"TO_SPAM": "移動郵件至垃圾郵件",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"LOGOUT": "注销",
|
||||
"MORE": "更多",
|
||||
"MOVE_TO": "移至",
|
||||
"COPY_TO": "复制到",
|
||||
"NAME": "名称",
|
||||
"NONE": "无",
|
||||
"TO_SPAM": "移动到垃圾邮件",
|
||||
|
|
|
@ -48,6 +48,9 @@
|
|||
<li class="dividerbar" role="presentation" data-bind="command: moveCommand">
|
||||
<a href="#" tabindex="-1" data-icon="📁" data-i18n="GLOBAL/MOVE_TO"></a>
|
||||
</li>
|
||||
<li class="presentation" role="presentation" data-bind="command: copyCommand">
|
||||
<a href="#" tabindex="-1" data-icon="" data-i18n="GLOBAL/COPY_TO"></a>
|
||||
</li>
|
||||
<li role="presentation" data-bind="visible: archiveAllowed, command: archiveCommand">
|
||||
<a href="#" tabindex="-1" data-icon="🗄" data-i18n="GLOBAL/TO_ARCHIVE">🗄</a>
|
||||
</li>
|
||||
|
|
|
@ -79,6 +79,9 @@
|
|||
<li role="presentation">
|
||||
<a href="#" tabindex="-1" data-bind="command: moveCommand" data-icon="📁" data-i18n="GLOBAL/MOVE_TO"></a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#" tabindex="-1" data-bind="command: copyCommand" data-icon="" data-i18n="GLOBAL/COPY_TO"></a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#" tabindex="-1" data-bind="command: deleteCommand" data-icon="🗑" data-i18n="GLOBAL/DELETE"></a>
|
||||
</li>
|
||||
|
|
Loading…
Reference in a new issue