mirror of
https://github.com/zadam/trilium.git
synced 2025-11-04 13:39:01 +01:00
chore(server): address requested changes
This commit is contained in:
parent
17319d25e8
commit
dd5b3a3c1c
@ -151,7 +151,7 @@ function register(router: Router) {
|
||||
const format = req.query.format || "html";
|
||||
|
||||
if (typeof format !== "string" || !["html", "markdown", "share"].includes(format)) {
|
||||
throw new eu.EtapiError(400, "UNRECOGNIZED_EXPORT_FORMAT", `Unrecognized export format '${format}', supported values are 'html' (default) or 'markdown'.`);
|
||||
throw new eu.EtapiError(400, "UNRECOGNIZED_EXPORT_FORMAT", `Unrecognized export format '${format}', supported values are 'html' (default), 'markdown' or 'share'.`);
|
||||
}
|
||||
|
||||
const taskContext = new TaskContext("no-progress-reporting", "export", null);
|
||||
|
||||
@ -100,13 +100,6 @@ export default class ShareThemeExportProvider extends ZipExportProvider {
|
||||
}
|
||||
|
||||
function getShareThemeAssets(nameWithExtension: string) {
|
||||
// Rename share.css to style.css.
|
||||
if (nameWithExtension === "style.css") {
|
||||
nameWithExtension = "share.css";
|
||||
} else if (nameWithExtension === "script.js") {
|
||||
nameWithExtension = "share.js";
|
||||
}
|
||||
|
||||
let path: string | undefined;
|
||||
if (nameWithExtension === "icon-color.svg") {
|
||||
path = join(RESOURCE_DIR, "images", nameWithExtension);
|
||||
|
||||
@ -7,8 +7,6 @@ if (isExternalLink) {
|
||||
linkHref = note.getLabelValue("shareExternal");
|
||||
} else if (note.shareId) {
|
||||
linkHref = `./${note.shareId}`;
|
||||
} else {
|
||||
linkHref = `#${note.getBestNotePath().join("/")}`;
|
||||
}
|
||||
|
||||
const target = isExternalLink ? ` target="_blank" rel="noopener noreferrer"` : "";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user