Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"@codemirror/rangeset": "^0.19.9",
"@guolao/vue-monaco-editor": "^1.5.1",
"@vueuse/core": "^10.9.0",
"monaco-editor": "0.43.0",
"primeicons": "^7.0.0",
"primevue": "^3.52.0",
"vue": "^3.2.37"
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const title = ref<string>("");

function updateStatus(data: { status: Status; message: string }) {
status.value = data.status ?? Status.Unknown;
console.log('updating status to:', status.value)
title.value = data.message;
}

Expand Down
7 changes: 5 additions & 2 deletions frontend/src/components/pages/Profiles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,11 @@ async function previewVoice(key: string) {
const modelVoiceID = "::" + Object.keys(selectedModels[key])[0] + ":" + selectedVoices[key].voiceID;

await EventTrigger('notification.enabled', false);
await Play(voice.name + ": " + voice.name, false, modelVoiceID, selectedProfile.value);
await EventTrigger('notification.enabled', true);
try {
await Play(voice.name + ": " + voice.name, false, modelVoiceID, selectedProfile.value);
} finally {
await EventTrigger('notification.enabled', true);
}
}

async function removeVoice(key: string) {
Expand Down
19 changes: 8 additions & 11 deletions frontend/src/components/pages/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import '../../css/pages/settings.css';

import Button from "primevue/button";
import {onBeforeMount, ref, watch} from "vue";
import {useEventListener} from "@vueuse/core";
import {GetConfigSchema, GetSettings, SaveSettings} from "../../../wailsjs/go/main/App";
import {config as configuration} from "../../../wailsjs/go/models";
import type {ConfigField, ConfigSchema} from "../../interfaces/config";
Expand All @@ -28,15 +29,11 @@ async function loadData() {
// Load config
config.value = await GetSettings();
originalConfig.value = JSON.stringify(config.value);
console.log('we got settings');
console.log(config.value);

// Load schema
try {
const schemaResult = await GetConfigSchema();
schema.value = JSON.parse(schemaResult);
console.log('Schema loaded:', schema.value);
console.log('Server fields:', schema.value?.fields.filter(f => f.path.startsWith('settings.server')));
} catch (err) {
console.error('Failed to load config schema:', err);
}
Expand Down Expand Up @@ -81,15 +78,15 @@ function setValueByPath(path: string, value: any) {
}

// Confirm before leaving if there are unsaved changes
useEventListener(window, 'beforeunload', (e) => {
if (hasUnsavedChanges.value) {
e.preventDefault();
e.returnValue = '';
}
});

onBeforeMount(async () => {
await loadData();

window.addEventListener('beforeunload', (e) => {
if (hasUnsavedChanges.value) {
e.preventDefault();
e.returnValue = '';
}
});
});


Expand Down