mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-06-05 21:02:45 +00:00
core: wallpapers api (#4110)
* core: wallpapers api * optional colors * update * api * update * whitespace * typo * test, fix * fix color parsing * separate UI and Theme color schemes * update * enable test * multiple themes, one per color scheme * theme overrides as a separate type * rename --------- Co-authored-by: Avently <7953703+avently@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
e38d5bd885
commit
bc5af35a3e
@@ -0,0 +1,22 @@
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
|
||||
module Simplex.Chat.Migrations.M20240430_ui_theme where
|
||||
|
||||
import Database.SQLite.Simple (Query)
|
||||
import Database.SQLite.Simple.QQ (sql)
|
||||
|
||||
m20240430_ui_theme :: Query
|
||||
m20240430_ui_theme =
|
||||
[sql|
|
||||
ALTER TABLE users ADD COLUMN ui_themes TEXT;
|
||||
ALTER TABLE contacts ADD COLUMN ui_themes TEXT;
|
||||
ALTER TABLE groups ADD COLUMN ui_themes TEXT;
|
||||
|]
|
||||
|
||||
down_m20240430_ui_theme :: Query
|
||||
down_m20240430_ui_theme =
|
||||
[sql|
|
||||
ALTER TABLE users DROP COLUMN ui_themes;
|
||||
ALTER TABLE contacts DROP COLUMN ui_themes;
|
||||
ALTER TABLE groups DROP COLUMN ui_themes;
|
||||
|]
|
||||
@@ -34,7 +34,8 @@ CREATE TABLE users(
|
||||
show_ntfs INTEGER NOT NULL DEFAULT 1,
|
||||
send_rcpts_contacts INTEGER NOT NULL DEFAULT 0,
|
||||
send_rcpts_small_groups INTEGER NOT NULL DEFAULT 0,
|
||||
user_member_profile_updated_at TEXT, -- 1 for active user
|
||||
user_member_profile_updated_at TEXT,
|
||||
ui_themes TEXT, -- 1 for active user
|
||||
FOREIGN KEY(user_id, local_display_name)
|
||||
REFERENCES display_names(user_id, local_display_name)
|
||||
ON DELETE RESTRICT
|
||||
@@ -74,6 +75,7 @@ CREATE TABLE contacts(
|
||||
contact_grp_inv_sent INTEGER NOT NULL DEFAULT 0,
|
||||
contact_status TEXT NOT NULL DEFAULT 'active',
|
||||
custom_data BLOB,
|
||||
ui_themes TEXT,
|
||||
FOREIGN KEY(user_id, local_display_name)
|
||||
REFERENCES display_names(user_id, local_display_name)
|
||||
ON DELETE CASCADE
|
||||
@@ -122,7 +124,8 @@ CREATE TABLE groups(
|
||||
send_rcpts INTEGER,
|
||||
via_group_link_uri_hash BLOB,
|
||||
user_member_profile_sent_at TEXT,
|
||||
custom_data BLOB, -- received
|
||||
custom_data BLOB,
|
||||
ui_themes TEXT, -- received
|
||||
FOREIGN KEY(user_id, local_display_name)
|
||||
REFERENCES display_names(user_id, local_display_name)
|
||||
ON DELETE CASCADE
|
||||
|
||||
Reference in New Issue
Block a user