Add Rose Pink and Baby Blue application themes
This commit is contained in:
parent
45b6b2b537
commit
340c5e3021
@ -9,7 +9,8 @@ public sealed class ApplicationAppearance
|
||||
public static IReadOnlyDictionary<string, string> Themes { get; } = new Dictionary<string, string>
|
||||
{
|
||||
["modern-light"] = "Modern Light", ["modern-dark"] = "Modern Dark",
|
||||
["warm-light"] = "Warm Light", ["warm-dark"] = "Warm Dark"
|
||||
["warm-light"] = "Warm Light", ["warm-dark"] = "Warm Dark",
|
||||
["rose-pink"] = "Rose Pink", ["baby-blue"] = "Baby Blue"
|
||||
};
|
||||
public static bool IsValid(string? theme) => theme is not null && Themes.ContainsKey(theme);
|
||||
}
|
||||
|
||||
21
PlotLine/Sql/205_UserApplicationAppearanceThemes.sql
Normal file
21
PlotLine/Sql/205_UserApplicationAppearanceThemes.sql
Normal file
@ -0,0 +1,21 @@
|
||||
SET ANSI_NULLS ON;
|
||||
GO
|
||||
SET QUOTED_IDENTIFIER ON;
|
||||
GO
|
||||
CREATE OR ALTER PROCEDURE dbo.UserAppearance_SaveTheme
|
||||
@UserID int,
|
||||
@ThemeKey nvarchar(32),
|
||||
@OnlyIfUnset bit = 0
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON;
|
||||
|
||||
IF @ThemeKey NOT IN ('modern-light','modern-dark','warm-light','warm-dark','rose-pink','baby-blue') OR @ThemeKey IS NULL
|
||||
THROW 50001, 'Unknown application theme', 1;
|
||||
|
||||
UPDATE dbo.AppUser
|
||||
SET ApplicationThemeKey = @ThemeKey
|
||||
WHERE UserID = @UserID
|
||||
AND (@OnlyIfUnset = 0 OR ApplicationThemeKey IS NULL);
|
||||
END;
|
||||
GO
|
||||
@ -32,6 +32,26 @@ html[data-app-theme="warm-dark"] {
|
||||
--pd-text: #eee3d4; --pd-muted: #c4af99; --pd-heading: #faecdc; --pd-accent: #dda872; --pd-accent-hover: #f0c18e;
|
||||
--pd-selected: #4a3524; --pd-hover: #43362b; --pd-focus: #edb787; --pd-on-accent: #211a15; --pd-shadow: none;
|
||||
}
|
||||
html[data-app-theme="rose-pink"] {
|
||||
--pd-workspace: #f8f3f4; --pd-surface: #fffdfd; --pd-surface-2: #f5e9ed; --pd-elevated: #fffafa;
|
||||
--pd-chrome: #f2e3e8; --pd-chrome-secondary: #fbf4f6; --pd-border: #d9bec8; --pd-border-subtle: #ead9df;
|
||||
--pd-text: #392a30; --pd-muted: #756069; --pd-heading: #34242b; --pd-accent: #96415f; --pd-accent-hover: #7b304c;
|
||||
--pd-selected: #efd5de; --pd-hover: #f2e1e7; --pd-focus: #a33e63; --pd-on-accent: #fff;
|
||||
--pd-danger: #b52f43; --pd-warning: #8a5a10; --pd-success: #2f7255; --pd-info: #356d9a;
|
||||
--pd-icon-books: #416fa7; --pd-icon-planning: #467b7e; --pd-icon-calendar: #a75151; --pd-icon-characters: #7658a0;
|
||||
--pd-icon-locations: #477951; --pd-icon-relationships: #9b426c; --pd-icon-review: #90621c;
|
||||
--pd-shadow: 0 3px 14px rgb(82 40 55 / 6%);
|
||||
}
|
||||
html[data-app-theme="baby-blue"] {
|
||||
--pd-workspace: #f2f7fa; --pd-surface: #fcfeff; --pd-surface-2: #e7f1f7; --pd-elevated: #fff;
|
||||
--pd-chrome: #dfedf5; --pd-chrome-secondary: #f3f9fc; --pd-border: #b9d1df; --pd-border-subtle: #d7e6ee;
|
||||
--pd-text: #26343d; --pd-muted: #5c6f7b; --pd-heading: #20313c; --pd-accent: #326b91; --pd-accent-hover: #255676;
|
||||
--pd-selected: #cfe4f1; --pd-hover: #deedf5; --pd-focus: #2876a8; --pd-on-accent: #fff;
|
||||
--pd-danger: #b23848; --pd-warning: #845c16; --pd-success: #2f725a; --pd-info: #286c9b;
|
||||
--pd-icon-books: #356fa8; --pd-icon-planning: #307982; --pd-icon-calendar: #a65c42; --pd-icon-characters: #6d5a9d;
|
||||
--pd-icon-locations: #3f7955; --pd-icon-relationships: #995073; --pd-icon-review: #86631e;
|
||||
--pd-shadow: 0 3px 14px rgb(40 78 101 / 6%);
|
||||
}
|
||||
html[data-app-theme$="dark"] {
|
||||
--pd-danger: #f08c97; --pd-warning: #efbf68; --pd-success: #80c7a5; --pd-info: #8cb9f0;
|
||||
--pd-icon-books: #88b5f3; --pd-icon-planning: #76c3c9; --pd-icon-calendar: #ecab83; --pd-icon-characters: #c0a3ec;
|
||||
@ -114,6 +134,7 @@ html[data-app-theme] .app-layout {
|
||||
.pd-theme-swatch { width: 13px; height: 13px; border-radius: 50%; border: 1px solid #8a8a8a; flex-shrink: 0; }
|
||||
[data-swatch="modern-light"] { background: #f4f5f7; } [data-swatch="modern-dark"] { background: #25282d; }
|
||||
[data-swatch="warm-light"] { background: #f4ebdd; } [data-swatch="warm-dark"] { background: #30271f; }
|
||||
[data-swatch="rose-pink"] { background: #efd5de; } [data-swatch="baby-blue"] { background: #cfe4f1; }
|
||||
.pd-shell-dialog { font-family: var(--pd-font-ui); }
|
||||
:is(.pd-shell, .pd-shell-dialog) .modal-content { background: var(--pd-elevated) !important; color: var(--pd-text); border: 1px solid var(--pd-border); border-radius: 7px; }
|
||||
:is(.pd-shell, .pd-shell-dialog) .modal-title { font: 600 17px var(--pd-font-ui); }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user