From dd108d73e2e4482685d57905ab2aa71ab2b4bb6b Mon Sep 17 00:00:00 2001 From: MathieuG-P Date: Sat, 15 Oct 2022 13:14:15 +0200 Subject: [PATCH 1/3] add text color for dark and light theme --- src/renderer/components/modal/modal.component.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/components/modal/modal.component.tsx b/src/renderer/components/modal/modal.component.tsx index 60d8f80d..ce667e9b 100644 --- a/src/renderer/components/modal/modal.component.tsx +++ b/src/renderer/components/modal/modal.component.tsx @@ -23,7 +23,7 @@ export function Modal() {
modalSevice.resolve({exitCode: ModalExitCode.NO_CHOICE})} className="absolute top-0 bottom-0 right-0 left-0 bg-black" initial={{opacity: 0}} animate={{opacity: modalType && .60}} exit={{opacity: 0}} transition={{duration: .2}}/> -
+
{modalType === ModalType.STEAM_LOGIN && } {modalType === ModalType.GUARD_CODE && } From 11b89eab9f59bbf160a448ae21ebbacd2c9c17da Mon Sep 17 00:00:00 2001 From: MathieuG-P Date: Sat, 15 Oct 2022 13:14:29 +0200 Subject: [PATCH 2/3] avoid text color override --- src/renderer/components/shared/bsm-button.component.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/renderer/components/shared/bsm-button.component.tsx b/src/renderer/components/shared/bsm-button.component.tsx index 539984a3..c71278ea 100644 --- a/src/renderer/components/shared/bsm-button.component.tsx +++ b/src/renderer/components/shared/bsm-button.component.tsx @@ -31,9 +31,12 @@ export function BsmButton({className, style, imgClassName, iconClassName, icon, const t = useTranslation(); const secondColor = useThemeColor("second-color"); - const primaryColor = typeColor === "primary" ? useThemeColor("first-color") : null; + const primaryColor = typeColor === "primary" && useThemeColor("first-color"); - const textColor = !primaryColor ? null : getCorrectTextColor(primaryColor); + const textColor = (() => { + if(primaryColor){ return getCorrectTextColor(primaryColor); } + return typeColor ? "white" : undefined; + })(); const renderTypeColor = (() => { if(typeColor === "primary"){ return ""; } @@ -49,7 +52,7 @@ export function BsmButton({className, style, imgClassName, iconClassName, icon,
{ image && } { icon && } - {text && (type === "submit" ? : {t(text)})} + {text && (type === "submit" ? : {t(text)})} { withBar && (
From 69ea65f758ffb2bf06d5f9bc74e8b88b05ead8c9 Mon Sep 17 00:00:00 2001 From: MathieuG-P Date: Sat, 15 Oct 2022 13:15:30 +0200 Subject: [PATCH 3/3] little shorthand --- .../modal/modal-types/edit-version-modal.component.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/components/modal/modal-types/edit-version-modal.component.tsx b/src/renderer/components/modal/modal-types/edit-version-modal.component.tsx index 41f68313..2e4de25e 100644 --- a/src/renderer/components/modal/modal-types/edit-version-modal.component.tsx +++ b/src/renderer/components/modal/modal-types/edit-version-modal.component.tsx @@ -31,7 +31,7 @@ export function EditVersionModal({resolver, clone = false}: {resolver: (x: Modal return (
{e.preventDefault(); rename();}}>

{t(!clone ? "modals.edit-version.title" : "modals.clone-version.title")}

- + { clone && (

{t("modals.clone-version.description")}

)}