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
28 changes: 28 additions & 0 deletions src/crates/core/src/service/config/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,30 @@ use async_trait::async_trait;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;

/// Web UI font preferences (settings → basics). Keys match `FontPreference` in the frontend (camelCase).
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct FontPreferenceSnapshot {
pub ui_size: UiFontSizeSnapshot,
pub flow_chat: FlowChatFontSnapshot,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct UiFontSizeSnapshot {
pub level: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub custom_px: Option<u32>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct FlowChatFontSnapshot {
pub mode: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub base_px: Option<u32>,
}

/// Global configuration structure - matches the frontend `GlobalConfig` exactly.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(default)]
Expand All @@ -23,6 +47,9 @@ pub struct GlobalConfig {
/// Theme system configuration.
#[serde(skip_serializing_if = "Option::is_none")]
pub themes: Option<ThemesConfig>,
/// Web UI font size preferences (`get_config` / `set_config` path `font`).
#[serde(skip_serializing_if = "Option::is_none")]
pub font: Option<FontPreferenceSnapshot>,
pub version: String,
#[serde(with = "chrono::serde::ts_milliseconds")]
pub last_modified: chrono::DateTime<chrono::Utc>,
Expand Down Expand Up @@ -910,6 +937,7 @@ impl Default for GlobalConfig {
ai: AIConfig::default(),
mcp_servers: None,
themes: Some(ThemesConfig::default()),
font: None,
version: "1.0.0".to_string(),
last_modified: chrono::Utc::now(),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
&__description {
margin: 0;
color: var(--color-text-secondary);
font-size: $font-size-sm;
font-size: var(--font-size-sm);
line-height: $line-height-relaxed;
}

Expand All @@ -56,7 +56,7 @@
gap: $size-gap-2;
flex-wrap: wrap;
color: var(--color-text-muted);
font-size: $font-size-xs;
font-size: var(--font-size-xs);
}

&__content {
Expand Down
16 changes: 8 additions & 8 deletions src/web-ui/src/app/components/GalleryLayout/GalleryLayout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ $content-max: 1480px;

&__subtitle {
margin: 0;
font-size: $font-size-xs;
font-size: var(--font-size-xs);
color: var(--color-text-muted);
line-height: $line-height-relaxed;

Expand Down Expand Up @@ -130,13 +130,13 @@ $content-max: 1480px;
}

&__title {
font-size: $font-size-sm;
font-size: var(--font-size-sm);
font-weight: $font-weight-semibold;
color: var(--color-text-primary);
}

&__subtitle {
font-size: $font-size-xs;
font-size: var(--font-size-xs);
color: var(--color-text-muted);
line-height: $line-height-relaxed;
}
Expand Down Expand Up @@ -197,7 +197,7 @@ $content-max: 1480px;
justify-content: center;
gap: $size-gap-3;
padding: $size-gap-8 $size-gap-6;
font-size: $font-size-sm;
font-size: var(--font-size-sm);
color: var(--color-text-muted);
text-align: center;

Expand Down Expand Up @@ -268,7 +268,7 @@ $content-max: 1480px;
}

.gallery-action-btn {
font-size: $font-size-xs;
font-size: var(--font-size-xs);
font-weight: $font-weight-medium;

&--primary {
Expand Down Expand Up @@ -317,7 +317,7 @@ $content-max: 1480px;
border-radius: $size-radius-full;
background: transparent;
color: var(--color-text-muted);
font-size: $font-size-xs;
font-size: var(--font-size-xs);
font-weight: $font-weight-medium;
cursor: pointer;

Expand Down Expand Up @@ -377,7 +377,7 @@ $content-max: 1480px;
border-radius: $size-radius-full;
background: var(--element-bg-medium);
border: 1px solid var(--border-subtle);
font-size: $font-size-xs;
font-size: var(--font-size-xs);
font-weight: $font-weight-semibold;
color: var(--color-text-muted);
white-space: nowrap;
Expand All @@ -396,7 +396,7 @@ $content-max: 1480px;
}

.gallery-run-empty {
font-size: $font-size-xs;
font-size: var(--font-size-xs);
color: var(--color-text-muted);
padding: $size-gap-3 0;
text-align: center;
Expand Down
42 changes: 21 additions & 21 deletions src/web-ui/src/app/components/NavPanel/NavPanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ $_section-header-height: 24px;
&__mode-pill-caption {
margin: 0;
padding: 0 4px;
font-size: 10px;
font-size: var(--font-size-xxs);
line-height: 1.35;
color: var(--color-text-muted);
opacity: 0.78;
Expand Down Expand Up @@ -254,7 +254,7 @@ $_section-header-height: 24px;
gap: 4px;
min-width: 0;
padding: 6px 4px;
font-size: 10px;
font-size: var(--font-size-xxs);
font-weight: 600;
line-height: 1.15;
color: var(--color-text-muted);
Expand Down Expand Up @@ -355,7 +355,7 @@ $_section-header-height: 24px;
border-radius: $size-radius-base 0 0 $size-radius-base;
background: var(--element-bg-soft);
color: var(--color-text-primary);
font-size: 12px;
font-size: var(--font-size-xs);
font-weight: 600;
cursor: pointer;
transition: background $motion-fast $easing-standard,
Expand Down Expand Up @@ -473,7 +473,7 @@ $_section-header-height: 24px;
background: transparent;
color: var(--color-text-secondary);
cursor: pointer;
font-size: $font-size-sm;
font-size: var(--font-size-sm);
text-align: left;
transition: color $motion-fast $easing-standard,
background $motion-fast $easing-standard;
Expand Down Expand Up @@ -576,7 +576,7 @@ $_section-header-height: 24px;
}

&__section-label {
font-size: 11px;
font-size: var(--font-size-2xs);
font-weight: 600;
letter-spacing: 0.05em;
text-transform: uppercase;
Expand All @@ -589,7 +589,7 @@ $_section-header-height: 24px;
}

&__section-header--scene-entry &__section-label {
font-size: 13px;
font-size: var(--font-size-sm);
font-weight: 600;
letter-spacing: normal;
text-transform: none;
Expand Down Expand Up @@ -659,7 +659,7 @@ $_section-header-height: 24px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 13px;
font-size: var(--font-size-sm);
font-weight: 500;
line-height: 1.1;
}
Expand Down Expand Up @@ -728,7 +728,7 @@ $_section-header-height: 24px;
position: absolute;
top: 0;
right: -36px;
font-size: 9px;
font-size: var(--font-size-xxs);
padding: 1px 5px;
border-radius: 4px;
}
Expand All @@ -738,7 +738,7 @@ $_section-header-height: 24px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 13px;
font-size: var(--font-size-sm);
font-weight: 500;
line-height: 1.1;
}
Expand Down Expand Up @@ -794,7 +794,7 @@ $_section-header-height: 24px;
&--more {
background: color-mix(in srgb, var(--element-bg-medium) 92%, transparent);
color: var(--color-text-secondary);
font-size: 10px;
font-size: var(--font-size-xxs);
font-weight: 700;
letter-spacing: 0.01em;
filter: none;
Expand Down Expand Up @@ -902,7 +902,7 @@ $_section-header-height: 24px;
background: transparent;
color: var(--color-text-secondary);
cursor: pointer;
font-size: $font-size-sm;
font-size: var(--font-size-sm);
text-align: left;
transition: color $motion-fast $easing-standard,
background $motion-fast $easing-standard;
Expand Down Expand Up @@ -984,15 +984,15 @@ $_section-header-height: 24px;
gap: $size-gap-1;
padding: $size-gap-1 $size-gap-3;
color: var(--color-text-muted);
font-size: $font-size-xs;
font-size: var(--font-size-xs);
text-transform: uppercase;
letter-spacing: 0.04em;
}

&__workspace-menu-empty {
padding: $size-gap-2 $size-gap-3;
color: var(--color-text-muted);
font-size: $font-size-xs;
font-size: var(--font-size-xs);
}

&__workspace-menu-workspaces {
Expand Down Expand Up @@ -1129,7 +1129,7 @@ $_section-header-height: 24px;
color: var(--color-text-primary);
cursor: pointer;
text-align: left;
font-size: $font-size-sm;
font-size: var(--font-size-sm);
font-weight: 400;
width: 100%;
position: relative;
Expand Down Expand Up @@ -1215,7 +1215,7 @@ $_section-header-height: 24px;

&__item-badge {
flex-shrink: 0;
font-size: 10px;
font-size: var(--font-size-xxs);
color: var(--color-text-muted);
margin-left: auto;
max-width: 80px;
Expand Down Expand Up @@ -1561,7 +1561,7 @@ $_section-header-height: 24px;
background: transparent;
color: var(--color-text-secondary);
cursor: pointer;
font-size: $font-size-sm;
font-size: var(--font-size-sm);
font-weight: 400;
text-align: left;
white-space: nowrap;
Expand Down Expand Up @@ -1660,7 +1660,7 @@ $_section-header-height: 24px;
background: transparent;
color: var(--color-text-secondary);
cursor: pointer;
font-size: $font-size-sm;
font-size: var(--font-size-sm);
font-weight: 400;
text-align: left;
white-space: nowrap;
Expand Down Expand Up @@ -1718,7 +1718,7 @@ $_section-header-height: 24px;

.bitfun-nav-panel__remote-disclaimer-text {
margin: 0;
font-size: 12px;
font-size: var(--font-size-xs);
line-height: 1.2;
color: var(--color-text-muted);
}
Expand All @@ -1731,7 +1731,7 @@ $_section-header-height: 24px;
gap: 0;

li {
font-size: 12px;
font-size: var(--font-size-xs);
line-height: 1.2;
color: var(--color-text-secondary);
padding-right: 0;
Expand All @@ -1752,7 +1752,7 @@ $_section-header-height: 24px;
border: 1px solid transparent;
min-width: 112px;
padding: 7px 16px;
font-size: 12px;
font-size: var(--font-size-xs);
cursor: pointer;
transition: all $motion-fast $easing-standard;
}
Expand Down Expand Up @@ -1898,7 +1898,7 @@ $_section-header-height: 24px;
border-radius: $size-radius-base;
background: transparent;
color: var(--color-text-primary);
font-size: 12.5px;
font-size: var(--font-size-sm);
font-weight: 500;
cursor: pointer;
text-align: left;
Expand Down
12 changes: 6 additions & 6 deletions src/web-ui/src/app/components/NavPanel/NavSearchDialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
}

&.search .search__input {
font-size: $font-size-sm;
font-size: var(--font-size-sm);

&::placeholder {
color: var(--color-text-disabled);
Expand Down Expand Up @@ -142,7 +142,7 @@
padding: $size-gap-4 $size-gap-2;
text-align: center;
color: var(--color-text-muted);
font-size: $font-size-sm;
font-size: var(--font-size-sm);
animation: bitfun-nav-search-fade-rise 0.32s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

Expand Down Expand Up @@ -172,7 +172,7 @@

.bitfun-nav-search-dialog__group-label {
padding: $size-gap-1 $size-gap-1 $size-gap-1 2px;
font-size: 10px;
font-size: var(--font-size-xxs);
font-weight: 700;
color: var(--color-text-muted);
text-transform: uppercase;
Expand Down Expand Up @@ -229,15 +229,15 @@
}

.bitfun-nav-search-dialog__item-label {
font-size: $font-size-sm;
font-size: var(--font-size-sm);
color: var(--color-text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.bitfun-nav-search-dialog__item-sublabel {
font-size: $font-size-xs;
font-size: var(--font-size-xs);
color: var(--color-text-muted);
white-space: nowrap;
overflow: hidden;
Expand Down Expand Up @@ -276,7 +276,7 @@
inset 0 0 0 1px color-mix(in srgb, var(--border-subtle) 65%, transparent);
cursor: text;
color: var(--color-text-primary);
font-size: $font-size-xs;
font-size: var(--font-size-xs);
text-align: left;
box-sizing: border-box;
transition:
Expand Down
Loading
Loading