forked from taskmasterpeace/Ai-Directors-Desktop
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
70 lines (69 loc) · 3.69 KB
/
index.html
File metadata and controls
70 lines (69 loc) · 3.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="icon" type="image/svg+xml" href="/logo.svg">
<title>Director's Desktop</title>
</head>
<body class="bg-background text-foreground">
<div id="root"></div>
<script>
// Dev-only mock for browser testing (outside Electron)
if (!window.electronAPI && location.protocol === 'http:') {
const noop = () => Promise.resolve();
window.electronAPI = {
getBackendUrl: () => Promise.resolve('http://localhost:8000'),
getModelsPath: () => Promise.resolve('C:/models'),
readLocalFile: () => Promise.resolve({ data: '', mimeType: 'image/png' }),
checkGpu: () => Promise.resolve({ available: true, name: 'NVIDIA RTX 4090', vram: 24576 }),
getAppInfo: () => Promise.resolve({ version: '1.0.0-dev', isPackaged: false, modelsPath: 'C:/models', userDataPath: 'C:/users/test' }),
checkFirstRun: () => Promise.resolve({ needsSetup: false, needsLicense: false }),
acceptLicense: () => Promise.resolve(true),
completeSetup: () => Promise.resolve(true),
fetchLicenseText: () => Promise.resolve('MIT License'),
getNoticesText: () => Promise.resolve(''),
openLtxApiKeyPage: () => Promise.resolve(true),
openReplicateApiKeyPage: () => Promise.resolve(true),
openParentFolderOfFile: noop,
showItemInFolder: noop,
getLogs: () => Promise.resolve({ logPath: '', lines: [] }),
getLogPath: () => Promise.resolve({ logPath: '', logDir: '' }),
sendRendererLog: () => {},
openLogFolder: () => Promise.resolve(true),
getResourcePath: () => Promise.resolve(null),
getDownloadsPath: () => Promise.resolve('C:/downloads'),
ensureDirectory: () => Promise.resolve({ success: true }),
showSaveDialog: () => Promise.resolve(null),
saveFile: () => Promise.resolve({ success: true }),
saveBinaryFile: () => Promise.resolve({ success: true }),
showOpenDirectoryDialog: () => Promise.resolve(null),
searchDirectoryForFiles: () => Promise.resolve({}),
copyFile: () => Promise.resolve({ success: true }),
checkFilesExist: () => Promise.resolve({}),
showOpenFileDialog: () => Promise.resolve(null),
exportNative: () => Promise.resolve({ success: true }),
exportCancel: () => Promise.resolve({ ok: true }),
checkPythonReady: () => Promise.resolve({ ready: true }),
startPythonSetup: noop,
startPythonBackend: noop,
getBackendHealthStatus: () => Promise.resolve({ status: 'alive' }),
onPythonSetupProgress: () => {},
removePythonSetupProgress: () => {},
onBackendHealthStatus: (cb) => { setTimeout(() => cb({ status: 'alive' }), 100); return () => {}; },
extractVideoFrame: () => Promise.resolve({ path: 'C:/temp/frame.png', url: 'file:///C:/temp/frame.png' }),
writeLog: noop,
getAnalyticsState: () => Promise.resolve({ analyticsEnabled: false, installationId: 'test' }),
setAnalyticsEnabled: noop,
sendAnalyticsEvent: noop,
platform: 'win32'
};
console.log('[DEV] electronAPI mock injected for browser testing');
}
</script>
<script type="module" src="/frontend/main.tsx"></script>
</body>
</html>