refactor: rebuild desktop app with Tauri

This commit is contained in:
leookun committed 2026-08-24 02:49:00 +08:00
1 parent a3ec2a0dfc
commit 4053a7fb20
808 files changed
+87359 -181491

No files matched your search

+116
View File
@@ -0,0 +1,116 @@
@mixin vscode-theme($tokens) {
@each $name, $value in $tokens {
--vscode-#{$name}: #{$value};
}
}
:root {
--oa-card-radius: 9px;
--oa-overlay-radius: 8px;
}
:root:not([data-platform="macos"]) {
--oa-card-radius: 7px;
--oa-overlay-radius: 6px;
}
:root,
:root[data-theme="default-dark"] {
--oa-tooltip-shadow: 0 12px 32px rgb(0 0 0 / 30%);
--oa-dropdown-shadow: 0 12px 28px rgb(0 0 0 / 38%);
@include vscode-theme((
foreground: #ffffffe6,
errorForeground: #f53b3a,
descriptionForeground: #FFFFFFB3,
focusBorder: #49b0ff,
textLink-foreground: #49b0ff,
textCodeBlock-background: #2a2a2a,
editor-background: #141414,
editor-selectionBackground: #49b0ff33,
editor-selectionForeground: #ffffff,
editorCursor-foreground: #ffffff,
editorLineNumber-foreground: #ffffff40,
editorLineNumber-activeForeground: #ffffffe6,
editorWidget-background: #1f1f1f,
editorWidget-border: #ffffff0a,
editorHoverWidget-background: #1f1f1f,
editorHoverWidget-border: #ffffff0a,
editorHoverWidget-foreground: #ffffffe6,
sideBar-border: #ffffff0a,
list-activeSelectionBackground: #ffffff0d,
list-activeSelectionForeground: #ffffffe6,
list-hoverBackground: #2a2a2a,
input-background: #2a2a2a,
input-foreground: #ffffffe6,
input-border: #ffffff0a,
button-background: #4489ff,
button-foreground: #ffffff,
dropdown-background: #2a2a2a,
dropdown-foreground: #ffffffe6,
dropdown-border: #ffffff0a,
badge-background: #4489ff,
badge-foreground: #fffffff2,
scrollbarSlider-background: #ffffff14,
scrollbarSlider-hoverBackground: #ffffff1a,
scrollbarSlider-activeBackground: #ffffff26,
gitDecoration-addedResourceForeground: #00ec7e,
notifications-background: #1f1f1f,
notifications-foreground: #ffffffe6,
notifications-border: #ffffff14,
checkbox-background: #ffffff0d,
checkbox-foreground: #ffffff,
checkbox-border: #ffffff0a,
));
color-scheme: dark;
}
:root[data-theme="default-light"] {
--oa-tooltip-shadow: 0 8px 22px rgb(0 0 0 / 12%);
--oa-dropdown-shadow: 0 8px 20px rgb(0 0 0 / 14%);
@include vscode-theme((
foreground: #191919,
errorForeground: #f53b3a,
descriptionForeground: #888888,
focusBorder: #317cff,
textLink-foreground: #317cff,
textCodeBlock-background: #f0f0f0,
editor-background: #f5f5f5,
editor-selectionBackground: #317cff40,
editor-selectionForeground: #191919,
editorCursor-foreground: #000000,
editorLineNumber-foreground: #1919194d,
editorLineNumber-activeForeground: #191919,
editorWidget-background: #ffffff,
editorWidget-border: #00000024,
editorHoverWidget-background: #ffffff,
editorHoverWidget-border: #00000024,
editorHoverWidget-foreground: #191919,
sideBar-border: #00000024,
list-activeSelectionBackground: #0000000f,
list-activeSelectionForeground: #191919,
list-hoverBackground: #E6E6E67A,
input-background: #ffffff,
input-foreground: #191919,
input-border: #00000024,
button-background: #317cff,
button-foreground: #ffffff,
dropdown-background: #ffffff,
dropdown-foreground: #191919,
dropdown-border: #00000024,
badge-background: #317cff,
badge-foreground: #fffffff2,
scrollbarSlider-background: #00000014,
scrollbarSlider-hoverBackground: #1919191a,
scrollbarSlider-activeBackground: #19191926,
gitDecoration-addedResourceForeground: #00a558,
notifications-background: #ffffff,
notifications-foreground: #191919,
notifications-border: #00000024,
checkbox-background: #0000000f,
checkbox-foreground: #ffffff,
checkbox-border: #00000024,
));
color-scheme: light;
}
+7
View File
@@ -0,0 +1,7 @@
$font-size-2xs: 12px;
$font-size-xs: 13px;
$font-size-base: 14px;
$font-size-lg: 16px;
$font-size-xl: 18px;
$font-size-xxl: 24px;
$font-size-3xl: 30px;
+96
View File
@@ -0,0 +1,96 @@
@use "./typography" as type;
@use "./themes";
@font-face {
font-family: "PingFang-Medium";
src: url("../assets/fonts/PingFang-Medium.ttf") format("truetype");
font-weight: 500;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: "HFKos";
src: url("../assets/fonts/HFKos-R.ttf") format("truetype");
font-weight: 400;
font-style: normal;
font-display: swap;
}
:root {
--window-header-height: 30px;
--oa-ui-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
--oa-code-font: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
--oa-metrics-font: "PingFang-Medium", var(--oa-ui-font);
--oa-number-font: "HFKos", "PingFang-Medium", var(--oa-ui-font);
font-family: var(--oa-ui-font);
font-size: type.$font-size-base;
color: var(--vscode-foreground);
background: transparent;
font-synthesis: none;
text-rendering: optimizeLegibility;
}
* {
box-sizing: border-box;
}
::selection {
color: var(--vscode-editor-selectionForeground);
background: var(--vscode-editor-selectionBackground);
}
html,
body,
#root {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
}
button,
input,
select {
font: inherit;
color: inherit;
}
button {
cursor: pointer;
}
[data-tauri-drag-region] {
-webkit-app-region: drag;
}
.scroll-shadow-top[data-scrolled="true"] {
-webkit-mask-image: linear-gradient(
to bottom,
transparent 0,
black var(--app-content-top) ,
black 100%
);
mask-image: linear-gradient(
to bottom,
transparent 0,
black var(--app-content-top),
black 100%
);
}
.scroll-shadow-bottom {
--scroll-shadow-bottom-size: 16px;
-webkit-mask-image: linear-gradient(
to bottom,
black 0,
black calc(100% - var(--scroll-shadow-bottom-size)),
transparent 100%
);
mask-image: linear-gradient(
to bottom,
black 0,
black calc(100% - var(--scroll-shadow-bottom-size)),
transparent 100%
);
}