feat: support multiple terminal fonts (#17257)

Fixes: https://github.com/coder/coder/issues/15024
This commit is contained in:
Marcin Tojek
2025-04-07 14:30:10 +02:00
committed by GitHub
parent 30f41cdd42
commit 743d308eb3
29 changed files with 815 additions and 230 deletions

View File

@ -102,7 +102,7 @@ SET
WHERE
id = $1;
-- name: GetUserAppearanceSettings :one
-- name: GetUserThemePreference :one
SELECT
value as theme_preference
FROM
@ -111,7 +111,7 @@ WHERE
user_id = @user_id
AND key = 'theme_preference';
-- name: UpdateUserAppearanceSettings :one
-- name: UpdateUserThemePreference :one
INSERT INTO
user_configs (user_id, key, value)
VALUES
@ -125,6 +125,29 @@ WHERE user_configs.user_id = @user_id
AND user_configs.key = 'theme_preference'
RETURNING *;
-- name: GetUserTerminalFont :one
SELECT
value as terminal_font
FROM
user_configs
WHERE
user_id = @user_id
AND key = 'terminal_font';
-- name: UpdateUserTerminalFont :one
INSERT INTO
user_configs (user_id, key, value)
VALUES
(@user_id, 'terminal_font', @terminal_font)
ON CONFLICT
ON CONSTRAINT user_configs_pkey
DO UPDATE
SET
value = @terminal_font
WHERE user_configs.user_id = @user_id
AND user_configs.key = 'terminal_font'
RETURNING *;
-- name: UpdateUserRoles :one
UPDATE
users