mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-10-08 15:43:10 +08:00
refactor: rebuild desktop app with Tauri
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#141414" />
|
||||
<style>
|
||||
html,
|
||||
body,
|
||||
#root {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
background-color: var(--vscode-editor-background, var(--startup-background, #141414));
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
(() => {
|
||||
try {
|
||||
const theme = localStorage.getItem("cursor-byok.theme") === "default-light"
|
||||
? "default-light"
|
||||
: "default-dark";
|
||||
const light = theme === "default-light";
|
||||
const background = light ? "#fcfcfc" : "#141414";
|
||||
document.documentElement.dataset.theme = theme;
|
||||
document.documentElement.style.setProperty("--startup-background", background);
|
||||
document.documentElement.style.colorScheme = light ? "light" : "dark";
|
||||
document.querySelector('meta[name="theme-color"]')?.setAttribute("content", background);
|
||||
} catch {
|
||||
// The inline CSS already provides the dark-theme fallback.
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<title>Cursor BYOK</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<noscript>Cursor BYOK 需要 JavaScript 才能运行。</noscript>
|
||||
<div id="root"></div>
|
||||
|
||||
<script src="/src/index.tsx" type="module"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user