added close; fixed some issues

This commit is contained in:
2026-03-28 15:09:56 -06:00
parent 2ffc406b10
commit 246d816f84
8 changed files with 164 additions and 69 deletions

View File

@ -1,4 +1,5 @@
import { useEffect, useState, useRef } from 'react';
import { invoke } from '@tauri-apps/api/core';
import { useEditorStore } from './store/editorStore';
import VideoPlayer from './components/VideoPlayer';
import TranscriptEditor from './components/TranscriptEditor';
@ -18,6 +19,7 @@ import {
} from 'lucide-react';
const IS_ELECTRON = !!window.electronAPI;
const IS_TAURI = !IS_ELECTRON && '__TAURI_INTERNALS__' in window;
type Panel = 'ai' | 'settings' | 'export' | null;
@ -45,6 +47,8 @@ export default function App() {
useEffect(() => {
if (IS_ELECTRON) {
window.electronAPI!.getBackendUrl().then(setBackendUrl);
} else if (IS_TAURI) {
invoke<string>('get_backend_url').then(setBackendUrl).catch(console.error);
}
}, [setBackendUrl]);