mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 04:49:41 -05:00
A new "Change Color" entry in the member menu works like Board Settings / Change Color, but is a per-user GLOBAL override saved to the profile (profile.globalThemeColor). The chosen color theme applies to the whole UI — All Boards, Search All Boards, Admin Panel, My Cards, etc. — via a board-color-<name> class on <body> and the header, so a user can pick a dark theme (dark/midnight/moderndark/exodark/cleandark) or any other theme everywhere. The first popup entry clears the override. - models/users.js: profile.globalThemeColor field + getGlobalThemeColor / globalThemeColorClass / setGlobalThemeColor helpers. - server/models/users.js: setGlobalThemeColor method, validated against BOARD_COLORS (rejects unknown colors so no arbitrary CSS class is injected) and auth-guarded; null/empty clears it. - client/components/main/globalThemeColor.js: Tracker autorun that adds the class to <body> on non-board pages; on a board the board own color wins, so the global class is cleared there to avoid two themes clashing. - header.jade: #header and #header-quick-access fall back to the user global theme class when not on a board (covers the #header-specific color rules). - Change Color menu entry + changeColorPopup (color swatches + clear option), wired in userHeader.js. - i18n change-color / theme-default; tests/globalThemeColor.test.cjs wired into test:unit:node.