added close; fixed some issues
This commit is contained in:
@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user