diff --git a/src/main/splash.ts b/src/main/splash.ts index f736789..e65d2c1 100644 --- a/src/main/splash.ts +++ b/src/main/splash.ts @@ -12,7 +12,7 @@ import { ICON_PATH, VIEW_DIR } from "shared/paths"; import { Settings } from "./settings"; export function patchVencordView(view: BrowserWindow) { - const { splashBackground, splashColor, splashTheming } = Settings.store; + const { splashBackground, splashColor, splashTheming, splashPositive, splashDanger } = Settings.store; if (splashTheming) { if (splashColor) { @@ -25,6 +25,13 @@ export function patchVencordView(view: BrowserWindow) { if (splashBackground) { view.webContents.insertCSS(`body { --bg: ${splashBackground} !important }`); } + + if (splashPositive) { + view.webContents.insertCSS(`body { --button-positive-background: ${splashPositive} !important }`); + } + if (splashDanger) { + view.webContents.insertCSS(`body { --button-danger-background: ${splashDanger} !important }`); + } } } diff --git a/src/renderer/themedSplash.ts b/src/renderer/themedSplash.ts index 13490c4..b073517 100644 --- a/src/renderer/themedSplash.ts +++ b/src/renderer/themedSplash.ts @@ -27,6 +27,8 @@ const updateSplashColors = () => { const color = bodyStyles.get("--text-normal"); const backgroundColor = bodyStyles.get("--background-primary"); + const positive = bodyStyles.get("--button-positive-background"); + const danger = bodyStyles.get("--button-danger-background"); if (isValidColor(color)) { Settings.store.splashColor = resolveColor(color[0]); @@ -35,6 +37,14 @@ const updateSplashColors = () => { if (isValidColor(backgroundColor)) { Settings.store.splashBackground = resolveColor(backgroundColor[0]); } + + if (isValidColor(positive)) { + Settings.store.splashPositive = resolveColor(positive[0]); + } + + if (isValidColor(danger)) { + Settings.store.splashDanger = resolveColor(danger[0]); + } }; if (document.readyState === "complete") { diff --git a/src/shared/settings.d.ts b/src/shared/settings.d.ts index 6ecfe6f..41859d0 100644 --- a/src/shared/settings.d.ts +++ b/src/shared/settings.d.ts @@ -28,6 +28,9 @@ export interface Settings { firstLaunch?: boolean; splashTheming?: boolean; + splashColor?: string; splashBackground?: string; + splashPositive?: string; + splashDanger?: string; } diff --git a/static/views/updater.html b/static/views/updater.html index 7eaba43..e7f404d 100644 --- a/static/views/updater.html +++ b/static/views/updater.html @@ -25,7 +25,7 @@ button { cursor: pointer; padding: 0.5em; - color: var(--fg); + color: var(--bg); border: none; border-radius: 3px; font-weight: bold; @@ -38,11 +38,11 @@ } .green { - background-color: #248046; + background-color: var(--button-positive-background, #248046); } .red { - background-color: #ed4245; + background-color: var(--button-danger-background, #ed4245); }