Move preferences from the database to a YAML config file

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Georg Bauer
2026-07-26 09:50:39 +02:00
parent 3f2c42513f
commit 5d441038bc
19 changed files with 571 additions and 964 deletions

View File

@@ -64,7 +64,7 @@ impl App {
fn main_view(&self) -> Element<'_, Message> {
let mut body = row![].width(Length::Fill).height(Length::Fill);
if !self.preferences.sidebar_collapsed {
if !self.config.interface.sidebar_collapsed {
body = body.push(self.sidebar());
body = body.push(
mouse_area(
@@ -272,7 +272,8 @@ impl App {
.spacing(10),
)
.width(
self.preferences
self.config
.interface
.sidebar_width
.clamp(MIN_SIDEBAR_WIDTH, MAX_SIDEBAR_WIDTH) as f32,
)
@@ -327,10 +328,11 @@ impl App {
.style(button::text);
// Center the tabs over the detail area, not the whole window, so the
// sidebar's width (plus its divider) shifts them along.
let detail_offset = if self.preferences.sidebar_collapsed {
let detail_offset = if self.config.interface.sidebar_collapsed {
0.0
} else {
self.preferences
self.config
.interface
.sidebar_width
.clamp(MIN_SIDEBAR_WIDTH, MAX_SIDEBAR_WIDTH) as f32
+ 5.0