mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
feat: support multiple terminal fonts (#17257)
Fixes: https://github.com/coder/coder/issues/15024
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user