1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Manually split out terminal color names and fully type LensTheme

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-12-05 12:11:27 -05:00
parent 621ca72f13
commit 8b9a9ab25f
4 changed files with 420 additions and 289 deletions

View File

@ -8,144 +8,146 @@ import { lensThemeDeclarationInjectionToken } from "./declaration";
const lensDarkThemeInjectable = getInjectable({ const lensDarkThemeInjectable = getInjectable({
id: "lens-dark-theme", id: "lens-dark-theme",
instantiate: () => ({ instantiate: () => ({
"name": "Dark", name: "Dark",
"type": "dark" as const, type: "dark" as const,
"description": "Original Lens dark theme", description: "Original Lens dark theme",
"author": "Mirantis", author: "Mirantis",
"monacoTheme": "clouds-midnight" as const, monacoTheme: "clouds-midnight" as const,
"colors": { colors: {
"blue": "#3d90ce", blue: "#3d90ce",
"magenta": "#c93dce", magenta: "#c93dce",
"golden": "#ffc63d", golden: "#ffc63d",
"halfGray": "#87909c80", halfGray: "#87909c80",
"primary": "#3d90ce", primary: "#3d90ce",
"textColorPrimary": "#8e9297", textColorPrimary: "#8e9297",
"textColorSecondary": "#a0a0a0", textColorSecondary: "#a0a0a0",
"textColorTertiary": "#909ba6", textColorTertiary: "#909ba6",
"textColorAccent": "#ffffff", textColorAccent: "#ffffff",
"textColorDimmed": "#8e92978c", textColorDimmed: "#8e92978c",
"borderColor": "#4c5053", borderColor: "#4c5053",
"borderFaintColor": "#373a3e", borderFaintColor: "#373a3e",
"mainBackground": "#1e2124", mainBackground: "#1e2124",
"secondaryBackground": "#1e2125", secondaryBackground: "#1e2125",
"contentColor": "#262b2f", contentColor: "#262b2f",
"layoutBackground": "#2e3136", layoutBackground: "#2e3136",
"layoutTabsBackground": "#252729", layoutTabsBackground: "#252729",
"layoutTabsActiveColor": "#ffffff", layoutTabsActiveColor: "#ffffff",
"layoutTabsLineColor": "#87909c80", layoutTabsLineColor: "#87909c80",
"sidebarBackground": "#36393e", sidebarBackground: "#36393e",
"sidebarLogoBackground": "#414448", sidebarLogoBackground: "#414448",
"sidebarActiveColor": "#ffffff", sidebarActiveColor: "#ffffff",
"sidebarSubmenuActiveColor": "#ffffff", sidebarSubmenuActiveColor: "#ffffff",
"sidebarItemHoverBackground": "#3a3e44", sidebarItemHoverBackground: "#3a3e44",
"badgeBackgroundColor": "#ffba44", badgeBackgroundColor: "#ffba44",
"buttonPrimaryBackground": "#3d90ce", buttonPrimaryBackground: "#3d90ce",
"buttonDefaultBackground": "#414448", buttonDefaultBackground: "#414448",
"buttonLightBackground": "#f1f1f1", buttonLightBackground: "#f1f1f1",
"buttonAccentBackground": "#e85555", buttonAccentBackground: "#e85555",
"buttonDisabledBackground": "#808080", buttonDisabledBackground: "#808080",
"tableBgcStripe": "#2a2d33", tableBgcStripe: "#2a2d33",
"tableBgcSelected": "#383c42", tableBgcSelected: "#383c42",
"tableHeaderBackground": "#262b2f", tableHeaderBackground: "#262b2f",
"tableHeaderBorderWidth": "1px", tableHeaderBorderWidth: "1px",
"tableHeaderBorderColor": "#36393e", tableHeaderBorderColor: "#36393e",
"tableHeaderColor": "#ffffff", tableHeaderColor: "#ffffff",
"tableSelectedRowColor": "#ffffff", tableSelectedRowColor: "#ffffff",
"helmLogoBackground": "#ffffff", helmLogoBackground: "#ffffff",
"helmStableRepo": "#3d90ce", helmStableRepo: "#3d90ce",
"helmIncubatorRepo": "#ff7043", helmIncubatorRepo: "#ff7043",
"helmDescriptionHr": "#41474a", helmDescriptionHr: "#41474a",
"helmDescriptionBlockquoteColor": "#bbb", helmDescriptionBlockquoteColor: "#bbb",
"helmDescriptionBlockquoteBorder": "#8a8f93", helmDescriptionBlockquoteBorder: "#8a8f93",
"helmDescriptionBlockquoteBackground": "#3b4348", helmDescriptionBlockquoteBackground: "#3b4348",
"helmDescriptionHeaders": "#3e4147", helmDescriptionHeaders: "#3e4147",
"helmDescriptionH6": "#6a737d", helmDescriptionH6: "#6a737d",
"helmDescriptionTdBorder": "#47494a", helmDescriptionTdBorder: "#47494a",
"helmDescriptionTrBackground": "#1c2125", helmDescriptionTrBackground: "#1c2125",
"helmDescriptionCodeBackground": "#ffffff1a", helmDescriptionCodeBackground: "#ffffff1a",
"helmDescriptionPreBackground": "#1b1f21", helmDescriptionPreBackground: "#1b1f21",
"helmDescriptionPreColor": "#b4b5b4", helmDescriptionPreColor: "#b4b5b4",
"colorSuccess": "#43a047", colorSuccess: "#43a047",
"colorOk": "#4caf50", colorOk: "#4caf50",
"colorInfo": "#3d90ce", colorInfo: "#3d90ce",
"colorError": "#ce3933", colorError: "#ce3933",
"colorSoftError": "#e85555", colorSoftError: "#e85555",
"colorWarning": "#ff9800", colorWarning: "#ff9800",
"colorVague": "#36393e", colorVague: "#36393e",
"colorTerminated": "#4c5053", colorTerminated: "#4c5053",
"dockHeadBackground": "#2e3136", dockHeadBackground: "#2e3136",
"dockInfoBackground": "#1e2125", dockInfoBackground: "#1e2125",
"dockInfoBorderColor": "#303136", dockInfoBorderColor: "#303136",
"dockEditorBackground": "#000000", dockEditorBackground: "#000000",
"dockEditorTag": "#8e97a3", dockEditorTag: "#8e97a3",
"dockEditorKeyword": "#ffffff", dockEditorKeyword: "#ffffff",
"dockEditorComment": "#808080", dockEditorComment: "#808080",
"dockEditorActiveLineBackground": "#3a3d41", dockEditorActiveLineBackground: "#3a3d41",
"dockBadgeBackground": "#36393e", dockBadgeBackground: "#36393e",
"dockTabBorderColor": "#43424d", dockTabBorderColor: "#43424d",
"dockTabActiveBackground": "#3a3e45", dockTabActiveBackground: "#3a3e45",
"logsBackground": "#000000", logsBackground: "#000000",
"logsForeground": "#ffffff", logsForeground: "#ffffff",
"logRowHoverBackground": "#35373a", logRowHoverBackground: "#35373a",
"terminalBackground": "#000000", dialogTextColor: "#87909c",
"terminalForeground": "#ffffff", dialogBackground: "#ffffff",
"terminalCursor": "#ffffff", dialogHeaderBackground: "#36393e",
"terminalCursorAccent": "#000000", dialogFooterBackground: "#f4f4f4",
"terminalSelection": "#ffffff77", drawerTogglerBackground: "#2f343a",
"terminalBlack": "#2e3436", drawerTitleText: "#ffffff",
"terminalRed": "#cc0000", drawerSubtitleBackground: "#373a3e",
"terminalGreen": "#4e9a06", drawerItemNameColor: "#87909c",
"terminalYellow": "#c4a000", drawerItemValueColor: "#a0a0a0",
"terminalBlue": "#3465a4", clusterMenuBackground: "#252729",
"terminalMagenta": "#75507b", clusterMenuBorderColor: "#252729",
"terminalCyan": "#06989a", clusterMenuCellBackground: "#2e3136",
"terminalWhite": "#d3d7cf", clusterSettingsBackground: "#1e2124",
"terminalBrightBlack": "#555753", addClusterIconColor: "#252729",
"terminalBrightRed": "#ef2929", boxShadow: "#0000003a",
"terminalBrightGreen": "#8ae234", iconActiveColor: "#ffffff",
"terminalBrightYellow": "#fce94f", iconActiveBackground: "#ffffff18",
"terminalBrightBlue": "#729fcf", filterAreaBackground: "#23272b",
"terminalBrightMagenta": "#ad7fa8", chartLiveBarBackground: "#00000033",
"terminalBrightCyan": "#34e2e2", chartStripesColor: "#ffffff08",
"terminalBrightWhite": "#eeeeec", chartCapacityColor: "#4c545f",
"dialogTextColor": "#87909c", pieChartDefaultColor: "#30353a",
"dialogBackground": "#ffffff", inputOptionHoverColor: "#87909c",
"dialogHeaderBackground": "#36393e", inputControlBackground: "#1e2125",
"dialogFooterBackground": "#f4f4f4", inputControlBorder: "#414448",
"drawerTogglerBackground": "#2f343a", inputControlHoverBorder: "#474a4f",
"drawerTitleText": "#ffffff", lineProgressBackground: "#414448",
"drawerSubtitleBackground": "#373a3e", radioActiveBackground: "#36393e",
"drawerItemNameColor": "#87909c", menuActiveBackground: "#3d90ce",
"drawerItemValueColor": "#a0a0a0", menuSelectedOptionBgc: "#36393e",
"clusterMenuBackground": "#252729", canvasBackground: "#24292e",
"clusterMenuBorderColor": "#252729", scrollBarColor: "#5f6064",
"clusterMenuCellBackground": "#2e3136", settingsBackground: "#262b2e",
"clusterSettingsBackground": "#1e2124", settingsColor: "#909ba6",
"addClusterIconColor": "#252729", navSelectedBackground: "#262b2e",
"boxShadow": "#0000003a", navHoverColor: "#dcddde",
"iconActiveColor": "#ffffff", hrColor: "#ffffff0f",
"iconActiveBackground": "#ffffff18", tooltipBackground: "#18191c",
"filterAreaBackground": "#23272b", },
"chartLiveBarBackground": "#00000033", terminalColors: {
"chartStripesColor": "#ffffff08", background: "#000000",
"chartCapacityColor": "#4c545f", foreground: "#ffffff",
"pieChartDefaultColor": "#30353a", cursor: "#ffffff",
"inputOptionHoverColor": "#87909c", cursorAccent: "#000000",
"inputControlBackground": "#1e2125", selection: "#ffffff77",
"inputControlBorder": "#414448", black: "#2e3436",
"inputControlHoverBorder": "#474a4f", red: "#cc0000",
"lineProgressBackground": "#414448", green: "#4e9a06",
"radioActiveBackground": "#36393e", yellow: "#c4a000",
"menuActiveBackground": "#3d90ce", blue: "#3465a4",
"menuSelectedOptionBgc": "#36393e", magenta: "#75507b",
"canvasBackground": "#24292e", cyan: "#06989a",
"scrollBarColor": "#5f6064", white: "#d3d7cf",
"settingsBackground": "#262b2e", brightBlack: "#555753",
"settingsColor": "#909ba6", brightRed: "#ef2929",
"navSelectedBackground": "#262b2e", brightGreen: "#8ae234",
"navHoverColor": "#dcddde", brightYellow: "#fce94f",
"hrColor": "#ffffff0f", brightBlue: "#729fcf",
"tooltipBackground": "#18191c", brightMagenta: "#ad7fa8",
brightCyan: "#34e2e2",
brightWhite: "#eeeeec",
}, },
isDefault: true, isDefault: true,
}), }),

View File

@ -8,144 +8,146 @@ import { lensThemeDeclarationInjectionToken } from "./declaration";
const lensLightThemeInjectable = getInjectable({ const lensLightThemeInjectable = getInjectable({
id: "lens-light-theme", id: "lens-light-theme",
instantiate: () => ({ instantiate: () => ({
"name": "Light", name: "Light",
"type": "light" as const, type: "light" as const,
"description": "Original Lens light theme", description: "Original Lens light theme",
"author": "Mirantis", author: "Mirantis",
"monacoTheme": "vs" as const, monacoTheme: "vs" as const,
"colors": { colors: {
"blue": "#3d90ce", blue: "#3d90ce",
"magenta": "#c93dce", magenta: "#c93dce",
"golden": "#ffc63d", golden: "#ffc63d",
"halfGray": "#87909c80", halfGray: "#87909c80",
"primary": "#3d90ce", primary: "#3d90ce",
"textColorPrimary": "#555555", textColorPrimary: "#555555",
"textColorSecondary": "#51575d", textColorSecondary: "#51575d",
"textColorTertiary": "#555555", textColorTertiary: "#555555",
"textColorAccent": "#222222", textColorAccent: "#222222",
"textColorDimmed": "#5557598c", textColorDimmed: "#5557598c",
"borderColor": "#c9cfd3", borderColor: "#c9cfd3",
"borderFaintColor": "#dfdfdf", borderFaintColor: "#dfdfdf",
"mainBackground": "#f1f1f1", mainBackground: "#f1f1f1",
"secondaryBackground": "#f2f3f5", secondaryBackground: "#f2f3f5",
"contentColor": "#ffffff", contentColor: "#ffffff",
"layoutBackground": "#e8e8e8", layoutBackground: "#e8e8e8",
"layoutTabsBackground": "#f8f8f8", layoutTabsBackground: "#f8f8f8",
"layoutTabsActiveColor": "#333333", layoutTabsActiveColor: "#333333",
"layoutTabsLineColor": "#87909c80", layoutTabsLineColor: "#87909c80",
"sidebarLogoBackground": "#f1f1f1", sidebarLogoBackground: "#f1f1f1",
"sidebarActiveColor": "#ffffff", sidebarActiveColor: "#ffffff",
"sidebarSubmenuActiveColor": "#3d90ce", sidebarSubmenuActiveColor: "#3d90ce",
"sidebarBackground": "#e8e8e8", sidebarBackground: "#e8e8e8",
"sidebarItemHoverBackground": "#f0f2f5", sidebarItemHoverBackground: "#f0f2f5",
"badgeBackgroundColor": "#ffba44", badgeBackgroundColor: "#ffba44",
"buttonPrimaryBackground": "#3d90ce", buttonPrimaryBackground: "#3d90ce",
"buttonDefaultBackground": "#414448", buttonDefaultBackground: "#414448",
"buttonLightBackground": "#f1f1f1", buttonLightBackground: "#f1f1f1",
"buttonAccentBackground": "#e85555", buttonAccentBackground: "#e85555",
"buttonDisabledBackground": "#808080", buttonDisabledBackground: "#808080",
"tableBgcStripe": "#f8f8f8", tableBgcStripe: "#f8f8f8",
"tableBgcSelected": "#f4f5f5", tableBgcSelected: "#f4f5f5",
"tableHeaderBackground": "#f1f1f1", tableHeaderBackground: "#f1f1f1",
"tableHeaderBorderWidth": "2px", tableHeaderBorderWidth: "2px",
"tableHeaderBorderColor": "#3d90ce", tableHeaderBorderColor: "#3d90ce",
"tableHeaderColor": "#555555", tableHeaderColor: "#555555",
"tableSelectedRowColor": "#222222", tableSelectedRowColor: "#222222",
"helmLogoBackground": "#ffffff", helmLogoBackground: "#ffffff",
"helmStableRepo": "#3d90ce", helmStableRepo: "#3d90ce",
"helmIncubatorRepo": "#ff7043", helmIncubatorRepo: "#ff7043",
"helmDescriptionHr": "#dddddd", helmDescriptionHr: "#dddddd",
"helmDescriptionBlockquoteColor": "#555555", helmDescriptionBlockquoteColor: "#555555",
"helmDescriptionBlockquoteBorder": "#8a8f93", helmDescriptionBlockquoteBorder: "#8a8f93",
"helmDescriptionBlockquoteBackground": "#eeeeee", helmDescriptionBlockquoteBackground: "#eeeeee",
"helmDescriptionHeaders": "#3e4147", helmDescriptionHeaders: "#3e4147",
"helmDescriptionH6": "#6a737d", helmDescriptionH6: "#6a737d",
"helmDescriptionTdBorder": "#c6c6c6", helmDescriptionTdBorder: "#c6c6c6",
"helmDescriptionTrBackground": "#1c2125", helmDescriptionTrBackground: "#1c2125",
"helmDescriptionCodeBackground": "#ffffff1a", helmDescriptionCodeBackground: "#ffffff1a",
"helmDescriptionPreBackground": "#eeeeee", helmDescriptionPreBackground: "#eeeeee",
"helmDescriptionPreColor": "#555555", helmDescriptionPreColor: "#555555",
"colorSuccess": "#206923", colorSuccess: "#206923",
"colorOk": "#399c3d", colorOk: "#399c3d",
"colorInfo": "#2d71a4", colorInfo: "#2d71a4",
"colorError": "#ce3933", colorError: "#ce3933",
"colorSoftError": "#e85555", colorSoftError: "#e85555",
"colorWarning": "#ff9800", colorWarning: "#ff9800",
"colorVague": "#ededed", colorVague: "#ededed",
"colorTerminated": "#9dabb5", colorTerminated: "#9dabb5",
"dockHeadBackground": "#e8e8e8", dockHeadBackground: "#e8e8e8",
"dockInfoBackground": "#f3f3f3", dockInfoBackground: "#f3f3f3",
"dockInfoBorderColor": "#c9cfd3", dockInfoBorderColor: "#c9cfd3",
"dockEditorBackground": "#24292e", dockEditorBackground: "#24292e",
"dockEditorTag": "#8e97a3", dockEditorTag: "#8e97a3",
"dockEditorKeyword": "#ffffff", dockEditorKeyword: "#ffffff",
"dockEditorComment": "#808080", dockEditorComment: "#808080",
"dockEditorActiveLineBackground": "#3a3d41", dockEditorActiveLineBackground: "#3a3d41",
"dockBadgeBackground": "#dedede", dockBadgeBackground: "#dedede",
"dockTabBorderColor": "#d5d4de", dockTabBorderColor: "#d5d4de",
"dockTabActiveBackground": "#ffffff", dockTabActiveBackground: "#ffffff",
"logsBackground": "#24292e", logsBackground: "#24292e",
"logsForeground": "#ffffff", logsForeground: "#ffffff",
"logRowHoverBackground": "#35373a", logRowHoverBackground: "#35373a",
"terminalBackground": "#ffffff", dialogTextColor: "#87909c",
"terminalForeground": "#2d2d2d", dialogBackground: "#ffffff",
"terminalCursor": "#2d2d2d", dialogHeaderBackground: "#36393e",
"terminalCursorAccent": "#ffffff", dialogFooterBackground: "#f4f4f4",
"terminalSelection": "#bfbfbf", drawerTogglerBackground: "#eaeced",
"terminalBlack": "#2d2d2d", drawerTitleText: "#ffffff",
"terminalRed": "#cd3734 ", drawerSubtitleBackground: "#f1f1f1",
"terminalGreen": "#18cf12", drawerItemNameColor: "#727272",
"terminalYellow": "#acb300", drawerItemValueColor: "#555555",
"terminalBlue": "#3d90ce", clusterMenuBackground: "#d7d8da",
"terminalMagenta": "#c100cd", clusterMenuBorderColor: "#c9cfd3",
"terminalCyan": "#07c4b9", clusterMenuCellBackground: "#bbbbbb",
"terminalWhite": "#d3d7cf", clusterSettingsBackground: "#ffffff",
"terminalBrightBlack": "#a8a8a8", addClusterIconColor: "#8d8d8d",
"terminalBrightRed": "#ff6259", boxShadow: "#0000003a",
"terminalBrightGreen": "#5cdb59", iconActiveColor: "#ffffff",
"terminalBrightYellow": "#f8c000", iconActiveBackground: "#a6a6a694",
"terminalBrightBlue": "#008db6", filterAreaBackground: "#f7f7f7",
"terminalBrightMagenta": "#ee55f8", chartLiveBarBackground: "#00000033",
"terminalBrightCyan": "#50e8df", chartStripesColor: "#00000009",
"terminalBrightWhite": "#eeeeec", chartCapacityColor: "#cccccc",
"dialogTextColor": "#87909c", pieChartDefaultColor: "#efefef",
"dialogBackground": "#ffffff", inputOptionHoverColor: "#ffffff",
"dialogHeaderBackground": "#36393e", inputControlBackground: "#f6f6f7",
"dialogFooterBackground": "#f4f4f4", inputControlBorder: "#cccdcf",
"drawerTogglerBackground": "#eaeced", inputControlHoverBorder: "#b9bbbe",
"drawerTitleText": "#ffffff", lineProgressBackground: "#e8e8e8",
"drawerSubtitleBackground": "#f1f1f1", radioActiveBackground: "#f1f1f1",
"drawerItemNameColor": "#727272", menuActiveBackground: "#3d90ce",
"drawerItemValueColor": "#555555", menuSelectedOptionBgc: "#e8e8e8",
"clusterMenuBackground": "#d7d8da", canvasBackground: "#24292e",
"clusterMenuBorderColor": "#c9cfd3", scrollBarColor: "#bbbbbb",
"clusterMenuCellBackground": "#bbbbbb", settingsBackground: "#ffffff",
"clusterSettingsBackground": "#ffffff", settingsColor: "#555555",
"addClusterIconColor": "#8d8d8d", navSelectedBackground: "#ffffff",
"boxShadow": "#0000003a", navHoverColor: "#2e3135",
"iconActiveColor": "#ffffff", hrColor: "#06060714",
"iconActiveBackground": "#a6a6a694", tooltipBackground: "#ffffff",
"filterAreaBackground": "#f7f7f7", },
"chartLiveBarBackground": "#00000033", terminalColors: {
"chartStripesColor": "#00000009", background: "#ffffff",
"chartCapacityColor": "#cccccc", foreground: "#2d2d2d",
"pieChartDefaultColor": "#efefef", cursor: "#2d2d2d",
"inputOptionHoverColor": "#ffffff", cursorAccent: "#ffffff",
"inputControlBackground": "#f6f6f7", selection: "#bfbfbf",
"inputControlBorder": "#cccdcf", black: "#2d2d2d",
"inputControlHoverBorder": "#b9bbbe", red: "#cd3734 ",
"lineProgressBackground": "#e8e8e8", green: "#18cf12",
"radioActiveBackground": "#f1f1f1", yellow: "#acb300",
"menuActiveBackground": "#3d90ce", blue: "#3d90ce",
"menuSelectedOptionBgc": "#e8e8e8", magenta: "#c100cd",
"canvasBackground": "#24292e", cyan: "#07c4b9",
"scrollBarColor": "#bbbbbb", white: "#d3d7cf",
"settingsBackground": "#ffffff", brightBlack: "#a8a8a8",
"settingsColor": "#555555", brightRed: "#ff6259",
"navSelectedBackground": "#ffffff", brightGreen: "#5cdb59",
"navHoverColor": "#2e3135", brightYellow: "#f8c000",
"hrColor": "#06060714", brightBlue: "#008db6",
"tooltipBackground": "#ffffff", brightMagenta: "#ee55f8",
brightCyan: "#50e8df",
brightWhite: "#eeeeec",
}, },
}), }),
injectionToken: lensThemeDeclarationInjectionToken, injectionToken: lensThemeDeclarationInjectionToken,

View File

@ -10,9 +10,147 @@ export type LensThemeType = "dark" | "light";
export interface LensTheme { export interface LensTheme {
name: string; name: string;
type: LensThemeType; type: LensThemeType;
colors: Record<string, string>; colors: Record<LensColorName, string>;
terminalColors: Partial<Record<TerminalColorName, string>>;
description: string; description: string;
author: string; author: string;
monacoTheme: MonacoTheme; monacoTheme: MonacoTheme;
isDefault?: boolean; isDefault?: boolean;
} }
export type TerminalColorName =
| "foreground"
| "background"
| "cursor"
| "cursorAccent"
| "selection"
| "selectionForeground"
| "black"
| "red"
| "green"
| "yellow"
| "blue"
| "magenta"
| "cyan"
| "white"
| "brightBlack"
| "brightRed"
| "brightGreen"
| "brightYellow"
| "brightBlue"
| "brightMagenta"
| "brightCyan"
| "brightWhite";
export type LensColorName =
| "blue"
| "magenta"
| "golden"
| "halfGray"
| "primary"
| "textColorPrimary"
| "textColorSecondary"
| "textColorTertiary"
| "textColorAccent"
| "textColorDimmed"
| "borderColor"
| "borderFaintColor"
| "mainBackground"
| "secondaryBackground"
| "contentColor"
| "layoutBackground"
| "layoutTabsBackground"
| "layoutTabsActiveColor"
| "layoutTabsLineColor"
| "sidebarLogoBackground"
| "sidebarActiveColor"
| "sidebarSubmenuActiveColor"
| "sidebarBackground"
| "sidebarItemHoverBackground"
| "badgeBackgroundColor"
| "buttonPrimaryBackground"
| "buttonDefaultBackground"
| "buttonLightBackground"
| "buttonAccentBackground"
| "buttonDisabledBackground"
| "tableBgcStripe"
| "tableBgcSelected"
| "tableHeaderBackground"
| "tableHeaderBorderWidth"
| "tableHeaderBorderColor"
| "tableHeaderColor"
| "tableSelectedRowColor"
| "helmLogoBackground"
| "helmStableRepo"
| "helmIncubatorRepo"
| "helmDescriptionHr"
| "helmDescriptionBlockquoteColor"
| "helmDescriptionBlockquoteBorder"
| "helmDescriptionBlockquoteBackground"
| "helmDescriptionHeaders"
| "helmDescriptionH6"
| "helmDescriptionTdBorder"
| "helmDescriptionTrBackground"
| "helmDescriptionCodeBackground"
| "helmDescriptionPreBackground"
| "helmDescriptionPreColor"
| "colorSuccess"
| "colorOk"
| "colorInfo"
| "colorError"
| "colorSoftError"
| "colorWarning"
| "colorVague"
| "colorTerminated"
| "dockHeadBackground"
| "dockInfoBackground"
| "dockInfoBorderColor"
| "dockEditorBackground"
| "dockEditorTag"
| "dockEditorKeyword"
| "dockEditorComment"
| "dockEditorActiveLineBackground"
| "dockBadgeBackground"
| "dockTabBorderColor"
| "dockTabActiveBackground"
| "logsBackground"
| "logsForeground"
| "logRowHoverBackground"
| "dialogTextColor"
| "dialogBackground"
| "dialogHeaderBackground"
| "dialogFooterBackground"
| "drawerTogglerBackground"
| "drawerTitleText"
| "drawerSubtitleBackground"
| "drawerItemNameColor"
| "drawerItemValueColor"
| "clusterMenuBackground"
| "clusterMenuBorderColor"
| "clusterMenuCellBackground"
| "clusterSettingsBackground"
| "addClusterIconColor"
| "boxShadow"
| "iconActiveColor"
| "iconActiveBackground"
| "filterAreaBackground"
| "chartLiveBarBackground"
| "chartStripesColor"
| "chartCapacityColor"
| "pieChartDefaultColor"
| "inputOptionHoverColor"
| "inputControlBackground"
| "inputControlBorder"
| "inputControlHoverBorder"
| "lineProgressBackground"
| "radioActiveBackground"
| "menuActiveBackground"
| "menuSelectedOptionBgc"
| "canvasBackground"
| "scrollBarColor"
| "settingsBackground"
| "settingsColor"
| "navSelectedBackground"
| "navHoverColor"
| "hrColor"
| "tooltipBackground";

View File

@ -3,15 +3,11 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import { camelCase } from "lodash";
import { computed } from "mobx"; import { computed } from "mobx";
import terminalThemePreferenceInjectable from "../../common/user-store/terminal-theme.injectable"; import terminalThemePreferenceInjectable from "../../common/user-store/terminal-theme.injectable";
import { object } from "../utils";
import activeThemeInjectable from "./active.injectable"; import activeThemeInjectable from "./active.injectable";
import lensThemesInjectable from "./themes.injectable"; import lensThemesInjectable from "./themes.injectable";
const terminalColorPrefix = "terminal";
const xtermColorThemeInjectable = getInjectable({ const xtermColorThemeInjectable = getInjectable({
id: "terminal-colors", id: "terminal-colors",
instantiate: (di) => { instantiate: (di) => {
@ -29,14 +25,7 @@ const xtermColorThemeInjectable = getInjectable({
return themes.get(themePref.themeId) ?? activeTheme.get(); return themes.get(themePref.themeId) ?? activeTheme.get();
}); });
return computed(() => object.fromEntries( return computed(() => terminalTheme.get().terminalColors);
object.entries(terminalTheme.get().colors)
.filter(([name]) => name.startsWith(terminalColorPrefix))
.map(([name, color]) => [
camelCase(name.replace(terminalColorPrefix, "")),
color,
]),
));
}, },
}); });