feat: redmine_tonalmine plugin for default and per-account appearance
Admins set the default mode, contrast and color on Settings > Display, shown as three labelled form rows below the Theme select. Logged-in users' choices are saved on their account and override only the parts they changed; anonymous visitors get the default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
77040e24a8
commit
20b7269df2
@@ -8,6 +8,10 @@ Material Design 3 theme for Redmine 7.0.
|
||||
2. Restart Redmine (theme assets are compiled at boot).
|
||||
3. Select **Tonalmine** in Administration → Settings → Display → Theme.
|
||||
|
||||
Optional: the `redmine_tonalmine` plugin adds a default appearance for administrators and saves each
|
||||
user's choice on their account. Copy the `redmine_tonalmine/` folder into `<redmine>/plugins/` and
|
||||
restart Redmine (no migrations).
|
||||
|
||||
## Development
|
||||
|
||||
Requires Docker.
|
||||
@@ -49,8 +53,19 @@ the map, so run it after every Redmine update.
|
||||
### Colors
|
||||
|
||||
Each user picks a mode (Auto / Light / Dark), a contrast level (Standard / Medium / High) and a color (Purple, Blue, Green, Orange) in the
|
||||
**Appearance** section of the profile menu (top right; in the mobile menu at the bottom). The choice is
|
||||
stored per browser (`localStorage`); Auto follows the operating system. The last (rainbow) swatch
|
||||
**Appearance** section of the profile menu (top right; in the mobile menu at the bottom). Auto follows
|
||||
the operating system. Without the plugin, the choice is stored per browser (`localStorage`).
|
||||
|
||||
With the `redmine_tonalmine` plugin:
|
||||
|
||||
- Administrators set the default appearance in Administration → Settings → Display, below the Theme
|
||||
select. It shows while Tonalmine is selected; when switching from another theme, save once first.
|
||||
- Logged-in users' choices are saved on their account (`pref[:tonalmine]`) and follow them to every
|
||||
browser. Only the parts a user changed override the default; **Reset to default** clears them.
|
||||
A choice already stored in the browser is moved to the account on the first visit.
|
||||
- Anonymous visitors get the default; their own choice is still stored per browser.
|
||||
|
||||
`node e2e/check-appearance.mjs` checks this end to end (it empties the default when done). The last (rainbow) swatch
|
||||
lets users pick any color: `javascripts/scheme.js` is loaded on demand, generates the scheme in the
|
||||
browser, and the generated CSS is stored with the choice, so later page loads don't need it.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user