Fix: WebUI Auth & Tauri Auth

This commit is contained in:
Youwes09
2026-06-08 20:27:22 -05:00
parent 615fa1e92f
commit 3b8c8dea38
11 changed files with 274 additions and 364 deletions
@@ -3,6 +3,7 @@ import { getCurrentWindow } from '@tauri-apps/api
import { listen } from '@tauri-apps/api/event'
import { open } from '@tauri-apps/plugin-dialog'
import { readFile, writeFile } from '@tauri-apps/plugin-fs'
import { fetch as tauriFetch } from '@tauri-apps/plugin-http'
import { open as openUrl } from '@tauri-apps/plugin-shell'
import { getVersion } from '@tauri-apps/api/app'
import { connect, disconnect, setActivity, clearActivity } from 'tauri-plugin-discord-rpc-api'
@@ -116,6 +117,12 @@ export class TauriAdapter implements PlatformAdapter {
return invoke('get_auto_backup_dir')
}
async fetchImage(url: string, headers: Record<string, string>): Promise<Blob> {
const res = await tauriFetch(url, { method: 'GET', headers })
if (!res.ok) throw new Error(`${res.status}`)
return res.blob()
}
async launchServer(config: ServerLaunchConfig): Promise<void> {
await invoke('spawn_server', {
binary: config.binary ?? '',