From cdd15123dc90f03d98c3462979094d8a1952b367 Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Thu, 2 Jun 2022 17:37:01 -0700 Subject: [PATCH 1/2] begin theme scaffolding --- src/utils/themes.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/utils/themes.ts diff --git a/src/utils/themes.ts b/src/utils/themes.ts new file mode 100644 index 0000000..45e4836 --- /dev/null +++ b/src/utils/themes.ts @@ -0,0 +1,24 @@ +import { invoke } from "@tauri-apps/api" + +interface Theme { + name: string + version: string + description: string + + // Included custom CSS and JS files + includes: { + css: string[] + js: string[] + } + + customBackgroundURL?: string + customBackgroundPath?: string +} + +export async function getThemeList() { + // Do some invoke to backend to get the theme list +} + +export async function loadTheme() { + // Do some invoke to backend to load the theme +} \ No newline at end of file From 28d9b8968685a8609aa88a95e3457badbd908dba Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Thu, 2 Jun 2022 17:48:42 -0700 Subject: [PATCH 2/2] pass theme --- src/utils/themes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/themes.ts b/src/utils/themes.ts index 45e4836..b9a0a86 100644 --- a/src/utils/themes.ts +++ b/src/utils/themes.ts @@ -19,6 +19,6 @@ export async function getThemeList() { // Do some invoke to backend to get the theme list } -export async function loadTheme() { +export async function loadTheme(theme: string) { // Do some invoke to backend to load the theme } \ No newline at end of file