about summary refs log tree commit diff
path: root/src/database
diff options
context:
space:
mode:
Diffstat (limited to 'src/database')
-rw-r--r--src/database/settings.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/database/settings.rs b/src/database/settings.rs
index 77e5821..46346cc 100644
--- a/src/database/settings.rs
+++ b/src/database/settings.rs
@@ -80,3 +80,20 @@ impl Setting for Theme {
         Self(data)
     }
 }
+
+#[derive(Debug, Default, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)]
+/// Custom stylesheet for Kittybox, activated by setting the theme to [`ThemeName::Custom`].
+pub struct CustomCss(String);
+impl private::Sealed for CustomCss {}
+impl Setting for CustomCss {
+    type Data = String;
+    const ID: &'static str = "custom_css";
+
+    fn into_inner(self) -> String {
+        self.0
+    }
+
+    fn new(data: Self::Data) -> Self {
+        Self(data)
+    }
+}