Added custom themes, import/export option with json (#159)

Reviewed-on: https://codeberg.org/ArkHost/HelixNotes/pulls/159
This commit is contained in:
blake
2026-06-23 20:19:23 +02:00
committed by ArkHost
parent 84ff75f223
commit 7b3609afbb
9 changed files with 866 additions and 10 deletions
+17
View File
@@ -1,6 +1,7 @@
import { invoke } from "@tauri-apps/api/core";
import type {
AppConfig,
CustomTheme,
NoteContent,
NoteEntry,
NoteMeta,
@@ -36,6 +37,22 @@ export async function setAccentColor(color: string): Promise<void> {
return invoke("set_accent_color", { color });
}
export async function saveCustomTheme(theme: CustomTheme): Promise<void> {
return invoke("save_custom_theme", { theme });
}
export async function deleteCustomTheme(id: string): Promise<void> {
return invoke("delete_custom_theme", { id });
}
export async function exportCustomTheme(id: string, path: string): Promise<void> {
return invoke("export_custom_theme", { id, path });
}
export async function importCustomThemes(path: string): Promise<CustomTheme[]> {
return invoke("import_custom_themes", { path });
}
export async function setFontSize(size: number): Promise<void> {
return invoke("set_font_size", { size });
}