frontend cleanup

This commit is contained in:
Priler 2026-01-04 22:50:34 +05:00
parent 78eb0c0080
commit 4ceaa7ff20
38 changed files with 2873 additions and 1180 deletions

34
frontend/_src/stores.ts Normal file
View file

@ -0,0 +1,34 @@
import { invoke } from "@tauri-apps/api/core"
import { writable } from 'svelte/store'
// listen state
export const is_listening = writable(true);
let is_listening__val: boolean;
is_listening.subscribe(value => {
is_listening__val = value;
});
export function isListening() {return is_listening__val}
// assistant voice
export const assistant_voice = writable("");
(async () => {
assistant_voice.set(await invoke("db_read", {key: "assistant_voice"}));
})().catch(err => {
console.error(err);
});
// etc
export let tg_official_link = "";
export let feedback_link = "";
export let github_repository_link = "";
export let log_file_path = "";
(async () => {
tg_official_link = await invoke("get_tg_official_link")
feedback_link = await invoke("get_feedback_link")
github_repository_link = await invoke("get_repository_link")
log_file_path = await invoke("get_log_file_path")
})().catch(err => {
console.error(err);
});