Skip to content

Commit

Permalink
Fix autodetect, dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
vietredweb committed Apr 10, 2024
1 parent e220562 commit 8adb3a7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
7 changes: 3 additions & 4 deletions src/Components/Terms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,11 @@ const TermsComponent = ({ children, level, handleLevel, isCustom = false }: any)
<Fragment key={key}>
<div
className={`rounded-top d-flex align-items-center justify-content-between p-2 p-lg-3 fw-medium flex-wrap ${
isCustom ? 'py-2 py-lg-3 px-4' : 'p-2 p-lg-3 border-bottom bg-white'
isCustom
? 'py-2 py-lg-3 px-4 header-consent-bg'
: 'p-2 p-lg-3 border-bottom bg-white'
}`}
style={{
...(isCustom && {
backgroundColor: '#F8F9FD',
}),
...(isCustom && {
borderBottom: '1px solid #DEDEDE',
}),
Expand Down
10 changes: 5 additions & 5 deletions src/Hooks/useConsentStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ const useConsentStatus = (endpoint?: string, props?: WalletConnectionProps) => {
const revokeTier = !consent?.consent_uuid
? ''
: consent?.web3id && consent?.address
? '4'
: consent?.address && !consent?.web3id
? '3'
: '2';
? '4'
: consent?.address && !consent?.web3id
? '3'
: '2';
revokeTier ? handleRevoke(true, revokeTier) : setShow(true);
}
}
Expand Down Expand Up @@ -139,7 +139,7 @@ const useConsentStatus = (endpoint?: string, props?: WalletConnectionProps) => {
}
};
initConnector();
}, []);
}, [window['concordium']]);

useEffect(() => {
if (activeConnector) {
Expand Down
9 changes: 9 additions & 0 deletions src/styles/color-mode.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,14 @@
color: $white;
}
}
.header-consent-bg {
background-color: var(--#{$prefix}light-bg-subtle);
}
.toast.custom .consent_info_tab .nav-item button.active {
color: $white;
}
.item_compliant {
background-color: #101529;
}
}
}
3 changes: 3 additions & 0 deletions src/styles/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,9 @@ $dark: #222328;
opacity: 0;
}
}
.header-consent-bg {
background-color: #f8f9fd;
}
}
body.modal-open,
body.modal-sso-open {
Expand Down

0 comments on commit 8adb3a7

Please sign in to comment.