feat: add post-export action setting (keep/archive/trash)
This commit is contained in:
@@ -3094,7 +3094,11 @@ export function EmailViewer({
|
||||
await client.downloadBlob(email.blobId, emailExportFilename(email, emailFilenameOptions), 'message/rfc822');
|
||||
} catch {
|
||||
toast.error(tNotifications('export_email_error'));
|
||||
return;
|
||||
}
|
||||
const action = useSettingsStore.getState().postExportAction;
|
||||
if (action === 'archive') onArchive?.();
|
||||
else if (action === 'trash') onDelete?.();
|
||||
};
|
||||
|
||||
// Import email from .eml file or .zip archive containing .eml files
|
||||
|
||||
@@ -138,6 +138,7 @@ export function DownloadsSettings() {
|
||||
filenameLowercase,
|
||||
filenameStripDiacritics,
|
||||
filenameCollapseSeparators,
|
||||
postExportAction,
|
||||
updateSetting,
|
||||
} = useSettingsStore();
|
||||
|
||||
@@ -249,6 +250,17 @@ export function DownloadsSettings() {
|
||||
onChange={(checked) => updateSetting("filenameCollapseSeparators", checked)}
|
||||
/>
|
||||
</SettingItem>
|
||||
<SettingItem label={t("after_export.label")} description={t("after_export.description")}>
|
||||
<Select
|
||||
value={postExportAction}
|
||||
onChange={(value) => updateSetting("postExportAction", value as "keep" | "archive" | "trash")}
|
||||
options={[
|
||||
{ value: "keep", label: t("after_export.keep") },
|
||||
{ value: "archive", label: t("after_export.archive") },
|
||||
{ value: "trash", label: t("after_export.trash") },
|
||||
]}
|
||||
/>
|
||||
</SettingItem>
|
||||
</SettingsSection>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1531,6 +1531,13 @@
|
||||
"collapse_separators": {
|
||||
"label": "Sloučit opakované oddělovače",
|
||||
"description": "Sloučit posloupnosti mezer, podtržítek nebo pomlček do jednoho znaku."
|
||||
},
|
||||
"after_export": {
|
||||
"label": "Po exportu",
|
||||
"description": "Po exportu jako .eml lze e-mail volitelně přesunout.",
|
||||
"keep": "Ponechat ve schránce",
|
||||
"archive": "Přesunout do archivu",
|
||||
"trash": "Přesunout do koše"
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
|
||||
@@ -1534,6 +1534,13 @@
|
||||
"collapse_separators": {
|
||||
"label": "Slå gentagne skilletegn sammen",
|
||||
"description": "Slå serier af mellemrum, understreger eller bindestreger sammen til ét tegn."
|
||||
},
|
||||
"after_export": {
|
||||
"label": "Efter eksport",
|
||||
"description": "Flyt eventuelt e-mailen efter den er eksporteret som .eml.",
|
||||
"keep": "Behold i postkassen",
|
||||
"archive": "Flyt til arkiv",
|
||||
"trash": "Flyt til papirkurv"
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
|
||||
@@ -1531,6 +1531,13 @@
|
||||
"collapse_separators": {
|
||||
"label": "Trennzeichen zusammenfassen",
|
||||
"description": "Aufeinanderfolgende Leerzeichen, Unterstriche oder Bindestriche zu einem Zeichen zusammenfassen."
|
||||
},
|
||||
"after_export": {
|
||||
"label": "Nach dem Export",
|
||||
"description": "E-Mail nach dem Export als .eml optional verschieben.",
|
||||
"keep": "Im Postfach behalten",
|
||||
"archive": "Ins Archiv verschieben",
|
||||
"trash": "In den Papierkorb verschieben"
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
|
||||
@@ -1534,6 +1534,13 @@
|
||||
"collapse_separators": {
|
||||
"label": "Collapse repeated separators",
|
||||
"description": "Collapse runs of spaces, underscores, or dashes to a single character."
|
||||
},
|
||||
"after_export": {
|
||||
"label": "After export",
|
||||
"description": "Optionally move the email after exporting it as .eml.",
|
||||
"keep": "Keep in mailbox",
|
||||
"archive": "Move to archive",
|
||||
"trash": "Move to trash"
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
|
||||
@@ -1531,6 +1531,13 @@
|
||||
"collapse_separators": {
|
||||
"label": "Combinar separadores repetidos",
|
||||
"description": "Combina secuencias de espacios, guiones bajos o guiones en un único carácter."
|
||||
},
|
||||
"after_export": {
|
||||
"label": "Después de exportar",
|
||||
"description": "Opcionalmente, mover el correo después de exportarlo como .eml.",
|
||||
"keep": "Mantener en el buzón",
|
||||
"archive": "Mover al archivo",
|
||||
"trash": "Mover a la papelera"
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
|
||||
@@ -1531,6 +1531,13 @@
|
||||
"collapse_separators": {
|
||||
"label": "Fusionner les séparateurs répétés",
|
||||
"description": "Fusionner les suites d’espaces, de tirets bas ou de tirets en un seul caractère."
|
||||
},
|
||||
"after_export": {
|
||||
"label": "Après l’export",
|
||||
"description": "Déplacer éventuellement l’e-mail après l’avoir exporté en .eml.",
|
||||
"keep": "Garder dans la boîte",
|
||||
"archive": "Déplacer vers les archives",
|
||||
"trash": "Déplacer vers la corbeille"
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
|
||||
@@ -1531,6 +1531,13 @@
|
||||
"collapse_separators": {
|
||||
"label": "Riduci i separatori ripetuti",
|
||||
"description": "Riduci sequenze di spazi, underscore o trattini a un solo carattere."
|
||||
},
|
||||
"after_export": {
|
||||
"label": "Dopo l’esportazione",
|
||||
"description": "Sposta facoltativamente l’email dopo averla esportata come .eml.",
|
||||
"keep": "Mantieni nella casella",
|
||||
"archive": "Sposta nell’archivio",
|
||||
"trash": "Sposta nel cestino"
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
|
||||
@@ -1531,6 +1531,13 @@
|
||||
"collapse_separators": {
|
||||
"label": "連続した区切り文字をまとめる",
|
||||
"description": "連続するスペース、アンダースコア、ハイフンを 1 文字にまとめます。"
|
||||
},
|
||||
"after_export": {
|
||||
"label": "エクスポート後",
|
||||
"description": "メールを .eml としてエクスポートした後、必要に応じて移動します。",
|
||||
"keep": "メールボックスに残す",
|
||||
"archive": "アーカイブへ移動",
|
||||
"trash": "ごみ箱へ移動"
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
|
||||
@@ -1531,6 +1531,13 @@
|
||||
"collapse_separators": {
|
||||
"label": "반복된 구분자 결합",
|
||||
"description": "연속된 공백, 밑줄, 대시를 단일 문자로 결합합니다."
|
||||
},
|
||||
"after_export": {
|
||||
"label": "내보낸 후",
|
||||
"description": ".eml로 내보낸 후 이메일을 선택적으로 이동합니다.",
|
||||
"keep": "메일함에 유지",
|
||||
"archive": "보관함으로 이동",
|
||||
"trash": "휴지통으로 이동"
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
|
||||
@@ -1531,6 +1531,13 @@
|
||||
"collapse_separators": {
|
||||
"label": "Apvienot atkārtotus atdalītājus",
|
||||
"description": "Apvienot virknes atstarpju, pasvītrojumu vai defisu vienā rakstzīmē."
|
||||
},
|
||||
"after_export": {
|
||||
"label": "Pēc eksporta",
|
||||
"description": "Pēc e-pasta eksportēšanas kā .eml to var pārvietot.",
|
||||
"keep": "Paturēt pastkastē",
|
||||
"archive": "Pārvietot uz arhīvu",
|
||||
"trash": "Pārvietot uz miskasti"
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
|
||||
@@ -1531,6 +1531,13 @@
|
||||
"collapse_separators": {
|
||||
"label": "Herhaalde scheidingstekens samenvoegen",
|
||||
"description": "Voeg reeksen spaties, underscores of streepjes samen tot één teken."
|
||||
},
|
||||
"after_export": {
|
||||
"label": "Na exporteren",
|
||||
"description": "Verplaats de e-mail eventueel nadat deze als .eml is geëxporteerd.",
|
||||
"keep": "In postvak houden",
|
||||
"archive": "Naar archief verplaatsen",
|
||||
"trash": "Naar prullenbak verplaatsen"
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
|
||||
@@ -1531,6 +1531,13 @@
|
||||
"collapse_separators": {
|
||||
"label": "Łącz powtórzone separatory",
|
||||
"description": "Połącz ciągi spacji, podkreśleń lub myślników w jeden znak."
|
||||
},
|
||||
"after_export": {
|
||||
"label": "Po eksporcie",
|
||||
"description": "Opcjonalnie przenieś wiadomość po wyeksportowaniu jako .eml.",
|
||||
"keep": "Zachowaj w skrzynce",
|
||||
"archive": "Przenieś do archiwum",
|
||||
"trash": "Przenieś do kosza"
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
|
||||
@@ -1531,6 +1531,13 @@
|
||||
"collapse_separators": {
|
||||
"label": "Combinar separadores repetidos",
|
||||
"description": "Combina sequências de espaços, sublinhados ou hifens em um único caractere."
|
||||
},
|
||||
"after_export": {
|
||||
"label": "Após exportar",
|
||||
"description": "Opcionalmente, mover o e-mail depois de exportá-lo como .eml.",
|
||||
"keep": "Manter na caixa",
|
||||
"archive": "Mover para o arquivo",
|
||||
"trash": "Mover para a lixeira"
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
|
||||
@@ -1531,6 +1531,13 @@
|
||||
"collapse_separators": {
|
||||
"label": "Сжимать повторяющиеся разделители",
|
||||
"description": "Сжимать последовательности пробелов, подчёркиваний или дефисов до одного символа."
|
||||
},
|
||||
"after_export": {
|
||||
"label": "После экспорта",
|
||||
"description": "При необходимости переместить письмо после экспорта в .eml.",
|
||||
"keep": "Оставить в ящике",
|
||||
"archive": "Переместить в архив",
|
||||
"trash": "Переместить в корзину"
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
|
||||
@@ -1531,6 +1531,13 @@
|
||||
"collapse_separators": {
|
||||
"label": "Tekrarlanan ayırıcıları birleştir",
|
||||
"description": "Art arda gelen boşluk, alt çizgi veya tireleri tek bir karaktere indir."
|
||||
},
|
||||
"after_export": {
|
||||
"label": "Dışa aktarmadan sonra",
|
||||
"description": "E-postayı .eml olarak dışa aktardıktan sonra isteğe bağlı olarak taşı.",
|
||||
"keep": "Posta kutusunda tut",
|
||||
"archive": "Arşive taşı",
|
||||
"trash": "Çöp kutusuna taşı"
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
|
||||
@@ -1531,6 +1531,13 @@
|
||||
"collapse_separators": {
|
||||
"label": "Об'єднати повторювані роздільники",
|
||||
"description": "Об'єднати послідовності пробілів, підкреслень або дефісів в один символ."
|
||||
},
|
||||
"after_export": {
|
||||
"label": "Після експорту",
|
||||
"description": "За потреби перемістити лист після експорту як .eml.",
|
||||
"keep": "Залишити у скриньці",
|
||||
"archive": "Перемістити в архів",
|
||||
"trash": "Перемістити у кошик"
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
|
||||
@@ -1531,6 +1531,13 @@
|
||||
"collapse_separators": {
|
||||
"label": "合并重复的分隔符",
|
||||
"description": "将连续的空格、下划线或短横线合并为单个字符。"
|
||||
},
|
||||
"after_export": {
|
||||
"label": "导出后",
|
||||
"description": "将邮件导出为 .eml 后可选择移动到其他位置。",
|
||||
"keep": "保留在邮箱中",
|
||||
"archive": "移动到归档",
|
||||
"trash": "移动到回收站"
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
|
||||
@@ -247,6 +247,7 @@ interface SettingsState {
|
||||
filenameLowercase: boolean;
|
||||
filenameStripDiacritics: boolean;
|
||||
filenameCollapseSeparators: boolean;
|
||||
postExportAction: 'keep' | 'archive' | 'trash';
|
||||
|
||||
// Advanced
|
||||
debugMode: boolean;
|
||||
@@ -441,6 +442,7 @@ const DEFAULT_SETTINGS = {
|
||||
filenameLowercase: false,
|
||||
filenameStripDiacritics: false,
|
||||
filenameCollapseSeparators: true,
|
||||
postExportAction: 'keep' as 'keep' | 'archive' | 'trash',
|
||||
|
||||
// Advanced
|
||||
debugMode: false,
|
||||
|
||||
Reference in New Issue
Block a user