aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorUMTS at Teleco <crt@teleco.ch>2025-12-13 02:51:15 +0100
committerUMTS at Teleco <crt@teleco.ch>2025-12-13 02:51:15 +0100
commit8323fdd73272a2882781aba3c499ba0be3dff2a6 (patch)
treeffbf86473933e69cfaeef30d5c6ea7e5b494856c /src/config.rs
committing to insanityHEADmaster
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
new file mode 100644
index 0000000..f78d58f
--- /dev/null
+++ b/src/config.rs
@@ -0,0 +1,43 @@
+use serde::{Deserialize, Serialize};
+
+use crate::ui::ribbon::RibbonConfig;
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct AppConfig {
+ pub success: bool,
+ pub preferences: Preferences,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct Preferences {
+ pub common: CommonPreferences,
+ #[serde(rename = "bbc-json-pie")]
+ pub bbc_json_pie: BbcJsonPie,
+ pub web: WebPreferences,
+ pub mobile: MobilePreferences,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct CommonPreferences {
+ pub language: String,
+ pub timezone: String,
+ pub date_format: String,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct BbcJsonPie {
+ pub table_definitions: serde_json::Value,
+ pub ribbon: RibbonConfig,
+ pub views: serde_json::Value,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct WebPreferences {
+ pub sidebar_collapsed: bool,
+ pub items_per_page: i32,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct MobilePreferences {
+ pub scan_mode: String,
+}