Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BitFun-Installer/src-tauri/src/installer/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl Default for InstallOptions {
add_to_path: true,
launch_after_install: true,
app_language: "zh-CN".to_string(),
theme_preference: "bitfun-dark".to_string(),
theme_preference: "bitfun-light".to_string(),
model_config: None,
}
}
Expand Down
7 changes: 5 additions & 2 deletions BitFun-Installer/src/pages/ThemeSetup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ const THEMES: InstallerTheme[] = [
];

const THEME_DISPLAY_ORDER: ThemeId[] = [
'bitfun-light',
'bitfun-slate',
'bitfun-dark',
'bitfun-light',
'bitfun-midnight',
'bitfun-china-style',
'bitfun-china-night',
Expand Down Expand Up @@ -223,7 +223,10 @@ export function ThemeSetup({ options, setOptions, onLaunch, onClose }: ThemeSetu
};

useEffect(() => {
const selectedTheme = THEMES.find((theme) => theme.id === options.themePreference) ?? THEMES[0];
const selectedTheme =
THEMES.find((theme) => theme.id === options.themePreference) ??
THEMES.find((theme) => theme.id === 'bitfun-light') ??
THEMES[0];
const root = document.documentElement;
const { colors } = selectedTheme;

Expand Down
2 changes: 1 addition & 1 deletion BitFun-Installer/src/types/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ export const DEFAULT_OPTIONS: InstallOptions = {
addToPath: true,
launchAfterInstall: true,
appLanguage: 'zh-CN',
themePreference: 'bitfun-slate',
themePreference: 'bitfun-light',
modelConfig: null,
};
20 changes: 10 additions & 10 deletions src/apps/desktop/src/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ pub struct ThemeConfig {

impl Default for ThemeConfig {
fn default() -> Self {
Self::get_builtin_theme("bitfun-slate").unwrap_or_else(|| Self {
id: "bitfun-slate".to_string(),
bg_primary: "#1a1c1e".to_string(),
bg_secondary: "#1a1c1e".to_string(),
bg_scene: "#1d2023".to_string(),
is_light: false,
text_primary: "#e4e6e8".to_string(),
text_muted: "#8a8d92".to_string(),
accent_color: "#6b9bd5".to_string(),
Self::get_builtin_theme("bitfun-light").unwrap_or_else(|| Self {
id: "bitfun-light".to_string(),
bg_primary: "#f4f4f4".to_string(),
bg_secondary: "#ffffff".to_string(),
bg_scene: "#ffffff".to_string(),
is_light: true,
text_primary: "#111827".to_string(),
text_muted: "rgba(0, 0, 0, 0.5)".to_string(),
accent_color: "#3b82f6".to_string(),
})
}
}
Expand Down Expand Up @@ -145,7 +145,7 @@ impl ThemeConfig {
.themes
.as_ref()
.map(|t| t.current.as_str())
.unwrap_or("bitfun-slate");
.unwrap_or("bitfun-light");

match Self::get_builtin_theme(theme_id) {
Some(config) => config,
Expand Down
4 changes: 2 additions & 2 deletions src/crates/core/src/service/config/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ pub struct ThemesConfig {
impl Default for ThemesConfig {
fn default() -> Self {
Self {
current: "bitfun-slate".to_string(),
current: "bitfun-light".to_string(),
custom: None,
}
}
Expand Down Expand Up @@ -1067,7 +1067,7 @@ impl Default for EditorConfig {
side: "right".to_string(),
size: "proportional".to_string(),
},
theme: "vs-dark".to_string(),
theme: "vs".to_string(),
auto_save: "afterDelay".to_string(),
auto_save_delay: 1000,
format_on_save: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ interface ThemeStepProps {
}

const THEME_OPTIONS = [
{
id: 'bitfun-dark',
nameKey: 'theme.themes.bitfun-dark.name',
descKey: 'theme.themes.bitfun-dark.description'
},
{
id: 'bitfun-light',
nameKey: 'theme.themes.bitfun-light.name',
descKey: 'theme.themes.bitfun-light.description'
},
{
id: 'bitfun-dark',
nameKey: 'theme.themes.bitfun-dark.name',
descKey: 'theme.themes.bitfun-dark.description'
},
{
id: 'bitfun-midnight',
nameKey: 'theme.themes.bitfun-midnight.name',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const useOnboardingStore = create<OnboardingState>()(
skipped: false,

selectedLanguage: 'zh-CN',
selectedTheme: 'bitfun-dark',
selectedTheme: 'bitfun-light',
modelConfig: null,

// Start onboarding
Expand Down
2 changes: 1 addition & 1 deletion src/web-ui/src/infrastructure/theme/presets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const builtinThemes: ThemeConfig[] = [
];


export const DEFAULT_THEME_ID = 'bitfun-slate';
export const DEFAULT_THEME_ID = 'bitfun-light';



Loading