@@ -15,6 +15,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
{tooltip}
--border-left-radius="5px"
--border-right-radius="5px"
+ {disabled}
>
{@render children()}
diff --git a/ts/routes/editor/ActionButtons.svelte b/ts/routes/editor/ActionButtons.svelte
index 30b273ff4..289c04e56 100644
--- a/ts/routes/editor/ActionButtons.svelte
+++ b/ts/routes/editor/ActionButtons.svelte
@@ -6,11 +6,14 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import AddButton from "./AddButton.svelte";
import CloseButton from "./CloseButton.svelte";
import HelpButton from "./HelpButton.svelte";
- import type { EditorMode } from "./types";
+ import HistoryButton from "./HistoryButton.svelte";
+ import type { EditorMode, HistoryEntry } from "./types";
export let mode: EditorMode;
export let onClose: () => void;
export let onAdd: () => void;
+ export let onHistory: () => void;
+ export let history: HistoryEntry[] = [];
diff --git a/ts/routes/editor/HistoryButton.svelte b/ts/routes/editor/HistoryButton.svelte
new file mode 100644
index 000000000..5a07cc8d6
--- /dev/null
+++ b/ts/routes/editor/HistoryButton.svelte
@@ -0,0 +1,27 @@
+
+
+
+
+ {tr.addingHistory()}
+
+
+
diff --git a/ts/routes/editor/HistoryModal.svelte b/ts/routes/editor/HistoryModal.svelte
new file mode 100644
index 000000000..29f5b71ae
--- /dev/null
+++ b/ts/routes/editor/HistoryModal.svelte
@@ -0,0 +1,208 @@
+
+
+
+
+
+
+
+
+
+ {#each history as entry}
+ -
+
+
+ {/each}
+
+
+
+
+
+
+
+
diff --git a/ts/routes/editor/NoteEditor.svelte b/ts/routes/editor/NoteEditor.svelte
index 1416fc115..fa5a55fb7 100644
--- a/ts/routes/editor/NoteEditor.svelte
+++ b/ts/routes/editor/NoteEditor.svelte
@@ -15,6 +15,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import LabelName from "./LabelName.svelte";
import { EditorState, type EditorMode } from "./types";
import { ContextMenu, Item } from "$lib/context-menu";
+ import type Modal from "bootstrap/js/dist/modal";
+ import { getContext } from "svelte";
+ import { modalsKey } from "$lib/components/context-keys";
export interface NoteEditorAPI {
fields: EditorFieldAPI[];
@@ -85,7 +88,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import PlainTextBadge from "./PlainTextBadge.svelte";
import RichTextInput, { editingInputIsRichText } from "./rich-text-input";
import RichTextBadge from "./RichTextBadge.svelte";
- import type { NotetypeIdAndModTime, SessionOptions } from "./types";
+ import type { HistoryEntry, NotetypeIdAndModTime, SessionOptions } from "./types";
let contextMenu: ContextMenu;
const [onContextMenu, contextMenuItems] = setupContextMenu();
@@ -446,6 +449,34 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
await addCurrentNote(1n);
}
+ const modals = getContext