修复iOS数据库连接并增强中文字体兼容

This commit is contained in:
JSR
2026-03-18 22:32:00 +08:00
parent d839bf714c
commit 6e06de4bb4
3 changed files with 17 additions and 6 deletions
+1 -1
View File
@@ -121,7 +121,7 @@ pub fn setup_app(app: &mut App) -> Result<(), Box<dyn std::error::Error>> {
fn setup_database(app: &mut App) -> Result<(), Box<dyn std::error::Error>> { fn setup_database(app: &mut App) -> Result<(), Box<dyn std::error::Error>> {
let handle = app.handle().clone(); let handle = app.handle().clone();
let db_path = if cfg!(debug_assertions) { let db_path = if cfg!(all(debug_assertions, desktop)) {
std::path::PathBuf::from("data.sql") std::path::PathBuf::from("data.sql")
} else { } else {
let app_data_dir = handle let app_data_dir = handle
+15 -3
View File
@@ -2,9 +2,11 @@
:root { :root {
--ss-font-family: --ss-font-family:
"PingFang SC", "Hiragino Sans GB", "Heiti SC", "Noto Sans SC", "Noto Sans CJK SC", "PingFang SC", "PingFangTC-Regular", "Hiragino Sans GB", "Hiragino Sans",
"Microsoft YaHei", "微软雅黑", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "STHeiti", "Heiti SC", "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC",
"Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; "Microsoft YaHei UI", "Microsoft YaHei", "微软雅黑", -apple-system, BlinkMacSystemFont,
"Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji",
sans-serif;
} }
html, html,
@@ -32,6 +34,16 @@ select {
font-family: var(--ss-font-family); font-family: var(--ss-font-family);
} }
.ant-typography,
.ant-btn,
.ant-input,
.ant-input-affix-wrapper,
.ant-select,
.ant-select-selection-item,
.ant-message-notice-content {
font-family: var(--ss-font-family) !important;
}
.ss-sidebar { .ss-sidebar {
color: var(--ss-sidebar-text, var(--ss-text-main)); color: var(--ss-sidebar-text, var(--ss-text-main));
} }
+1 -2
View File
@@ -774,8 +774,7 @@ export const OOBE: React.FC<oobeProps> = ({ visible, onComplete }) => {
maxWidth: "90vw", maxWidth: "90vw",
boxShadow: isDark ? "0 8px 32px rgba(0, 0, 0, 0.3)" : "0 8px 32px rgba(0, 0, 0, 0.1)", boxShadow: isDark ? "0 8px 32px rgba(0, 0, 0, 0.3)" : "0 8px 32px rgba(0, 0, 0, 0.1)",
border: isDark ? "1px solid rgba(255, 255, 255, 0.08)" : "1px solid rgba(0, 0, 0, 0.06)", border: isDark ? "1px solid rgba(255, 255, 255, 0.08)" : "1px solid rgba(0, 0, 0, 0.06)",
fontFamily: fontFamily: "var(--ss-font-family)",
'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", sans-serif, "Apple Color Emoji", "Segoe UI Emoji"',
}} }}
> >
{contextHolder} {contextHolder}