mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-05 22:25:36 +00:00
refactor(theme): single-source the HealthChat Light theme
Author the theme once in apps/web/element.io/healthchat/HealthChat-Light-Theme.json
and sync it into the web (apps/web/config.json) and desktop
(apps/desktop/element.io/healthchat/config.json) configs via
scripts/healthchat-sync-theme.mjs, removing the drifted duplicate.
`pnpm healthchat:theme` writes it; `pnpm lint` runs healthchat:theme:check to
fail on drift.
The canonical palette is the reviewed desktop theme, which reverts the web-only
contrast tweak (f64923ea1a) so web and desktop match.
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "HealthChat Light",
|
||||
"is_dark": false,
|
||||
"colors": {
|
||||
"accent-color": "#1f4d85",
|
||||
"primary-color": "#1f4d85",
|
||||
"alert": "#df8e1d",
|
||||
"warning-color": "#d20f39",
|
||||
"sidebar-color": "#12325c",
|
||||
"roomlist-background-color": "#f5f5f5",
|
||||
"roomlist-highlights-color": "#d9d9d9",
|
||||
"roomlist-separator-color": "#9b9898",
|
||||
"roomlist-text-color": "#473e3e",
|
||||
"roomlist-text-secondary-color": "#9b9898",
|
||||
"timeline-background-color": "#ffffff",
|
||||
"timeline-highlights-color": "#d9d9d9",
|
||||
"timeline-text-color": "#473e3e",
|
||||
"timeline-text-secondary-color": "#9b9898",
|
||||
"secondary-content": "#9b9898",
|
||||
"tertiary-content": "#9b9898",
|
||||
"focus-bg-color": "#d9d9d9",
|
||||
"menu-selected-color": "#d9d9d9",
|
||||
"other-user-pill-bg-color": "#376A91",
|
||||
"room-highlight-color": "#376A91",
|
||||
"reaction-row-button-selected-bg-color": "#d9d9d9",
|
||||
"togglesw-off-color": "#9b9898",
|
||||
"avatar-background-colors": ["#12325c", "#1f4d85", "#376A91"],
|
||||
"username-colors": ["#12325c", "#2a4063", "#1f4d85", "#376A91", "#473e3e", "#1f4d85", "#2a4063", "#12325c"]
|
||||
},
|
||||
"fonts": {
|
||||
"general": "\"Century Gothic\", \"Futura\", \"Trebuchet MS\", \"Arial\", sans-serif"
|
||||
},
|
||||
"compound": {
|
||||
"--cpd-color-text-action-accent": "#1f4d85",
|
||||
"--cpd-color-bg-action-primary-rest": "#1f4d85",
|
||||
"--cpd-color-bg-action-primary-hovered": "#2a4063",
|
||||
"--cpd-color-bg-action-primary-pressed": "#12325c",
|
||||
"--cpd-color-text-link-external": "#1f4d85",
|
||||
"--cpd-color-icon-accent-tertiary": "#376A91"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
HealthChat theme — single source of truth
|
||||
=========================================
|
||||
|
||||
HealthChat-Light-Theme.json The canonical "HealthChat Light" theme.
|
||||
|
||||
Edit the palette HERE and nowhere else. apps/web/scripts/healthchat-sync-theme.mjs injects
|
||||
it into the element-web configs that ship it:
|
||||
|
||||
- apps/web/config.json (dev server; also baked into the web image)
|
||||
- apps/desktop/element.io/healthchat/config.json (desktop variant, bundled into the app)
|
||||
|
||||
After editing, run:
|
||||
pnpm --filter element-web healthchat:theme
|
||||
`pnpm lint` runs `healthchat:theme:check`, which fails if a config is out of sync — so an
|
||||
un-propagated edit is caught in CI.
|
||||
|
||||
Production web deployment
|
||||
-------------------------
|
||||
The production web client is deployed by matrix-docker-ansible-deploy, whose
|
||||
matrix-client-element role renders config.json from host_vars (no upstream role change).
|
||||
It carries an INLINE copy of this theme in
|
||||
inventory/host_vars/matrix.healthchat.ch/vars.yml
|
||||
(matrix_client_element_setting_defaults_custom_themes)
|
||||
When you change the theme here, re-copy it into that host_vars block. themes_enabled is off
|
||||
there, so the (stale) Novaloop-AG/element-themes repo does not append an older theme.
|
||||
Reference in New Issue
Block a user