mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 19:12:27 +08:00
feat(pdf): improve save filter on Windows
This commit is contained in:
parent
7813c896c3
commit
d4965e8d41
@ -14,6 +14,7 @@ import { formatDownloadTitle, isDev, isMac, isWindows } from "./utils.js";
|
|||||||
|
|
||||||
import { fileURLToPath } from "url";
|
import { fileURLToPath } from "url";
|
||||||
import { dirname } from "path";
|
import { dirname } from "path";
|
||||||
|
import { t } from "i18next";
|
||||||
|
|
||||||
// Prevent the window being garbage collected
|
// Prevent the window being garbage collected
|
||||||
let mainWindow: BrowserWindow | null;
|
let mainWindow: BrowserWindow | null;
|
||||||
@ -61,7 +62,7 @@ ipcMain.on("export-as-pdf", async (e, opts: ExportAsPdfOpts) => {
|
|||||||
defaultPath: formatDownloadTitle(opts.title, "file", "application/pdf"),
|
defaultPath: formatDownloadTitle(opts.title, "file", "application/pdf"),
|
||||||
filters: [
|
filters: [
|
||||||
{
|
{
|
||||||
name: "PDF",
|
name: t("pdf.export_filter"),
|
||||||
extensions: [ "pdf" ]
|
extensions: [ "pdf" ]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -253,5 +253,8 @@
|
|||||||
},
|
},
|
||||||
"content_renderer": {
|
"content_renderer": {
|
||||||
"note-cannot-be-displayed": "This note type cannot be displayed."
|
"note-cannot-be-displayed": "This note type cannot be displayed."
|
||||||
|
},
|
||||||
|
"pdf": {
|
||||||
|
"export_filter": "PDF Document (*.pdf)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -254,5 +254,8 @@
|
|||||||
},
|
},
|
||||||
"content_renderer": {
|
"content_renderer": {
|
||||||
"note-cannot-be-displayed": "Acest tip de notiță nu poate fi afișat."
|
"note-cannot-be-displayed": "Acest tip de notiță nu poate fi afișat."
|
||||||
|
},
|
||||||
|
"pdf": {
|
||||||
|
"export_filter": "Document PDF (*.pdf)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user