mirror of
https://github.com/zadam/trilium.git
synced 2026-01-04 21:54:23 +01:00
feat(client/bundle): add button to open script note
This commit is contained in:
parent
1e94125133
commit
c558255450
@ -1,6 +1,8 @@
|
||||
import { signal } from "@preact/signals";
|
||||
|
||||
import appContext from "../components/app_context.js";
|
||||
import froca from "./froca.js";
|
||||
import { t } from "./i18n.js";
|
||||
import utils from "./utils.js";
|
||||
|
||||
export interface ToastOptions {
|
||||
@ -69,7 +71,13 @@ export async function showErrorForScriptNote(noteId: string, message: string) {
|
||||
title: note?.title ?? "",
|
||||
icon: note?.getIcon() ?? "bx bx-error-circle",
|
||||
message,
|
||||
timeout: 15_000
|
||||
timeout: 15_000,
|
||||
buttons: [
|
||||
{
|
||||
text: t("toast.open-script-note"),
|
||||
onClick: () => appContext.tabManager.openInNewTab(noteId, null, true)
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -29,7 +29,8 @@
|
||||
"widget-render-error": {
|
||||
"title": "Failed to render a custom React widget"
|
||||
},
|
||||
"widget-missing-parent": "Custom widget does not have mandatory 'parentWidget' property defined."
|
||||
"widget-missing-parent": "Custom widget does not have mandatory 'parentWidget' property defined.",
|
||||
"open-script-note": "Open script note"
|
||||
},
|
||||
"add_link": {
|
||||
"add_link": "Add link",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user