mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add theme_mode, theme_light, theme_dark to UserAppearanceSettings (#25076)
Part 1: Backend portion of a change broken into 2 PRs. Part 2: #25077 Adds three new UserAppearanceSettings fields (theme_mode, theme_light, theme_dark) on top of the existing theme_preference and terminal_font. Replaces GetUserThemePreference and GetUserTerminalFont with a single GetUserAppearanceSettings aggregate query. The PUT handler is wrapped in db.InTx so sync-mode's mode + slot writes can never half-apply.
This commit is contained in:
Generated
+9
@@ -547,6 +547,9 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/appearance \
|
||||
```json
|
||||
{
|
||||
"terminal_font": "",
|
||||
"theme_dark": "string",
|
||||
"theme_light": "string",
|
||||
"theme_mode": "",
|
||||
"theme_preference": "string"
|
||||
}
|
||||
```
|
||||
@@ -578,6 +581,9 @@ curl -X PUT http://coder-server:8080/api/v2/users/{user}/appearance \
|
||||
```json
|
||||
{
|
||||
"terminal_font": "",
|
||||
"theme_dark": "light",
|
||||
"theme_light": "light",
|
||||
"theme_mode": "sync",
|
||||
"theme_preference": "string"
|
||||
}
|
||||
```
|
||||
@@ -596,6 +602,9 @@ curl -X PUT http://coder-server:8080/api/v2/users/{user}/appearance \
|
||||
```json
|
||||
{
|
||||
"terminal_font": "",
|
||||
"theme_dark": "string",
|
||||
"theme_light": "string",
|
||||
"theme_mode": "",
|
||||
"theme_preference": "string"
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user