Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui changes for dark mode #1459

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/admin-ui/src/components/multiClient.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@

// Button feel
&:hover:not(.selected) {
border-color: rgb(218, 218, 218);
background-color: rgb(218, 218, 218);
border-color: var(--color-light-card-hover);
background-color: var(--color-light-card-hover);
cursor: pointer;
}
&.selected {
Expand Down
1 change: 0 additions & 1 deletion packages/admin-ui/src/components/sidebar/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
color: black;
font-weight: 800;
text-decoration: none;
background-color: #e6eceb80;
}
&.selectable:hover svg,
&.selectable.active svg {
Expand Down
1 change: 1 addition & 0 deletions packages/admin-ui/src/dappnode_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
// LIGHT mode
--color-light-background-sidebar-topbar: white; // Used by sidebar and topbar
--color-light-background-main: #f7f9f9; // Used by main
--color-light-card-hover: #dadada; // Used by cards

// DARK mode
--color-dark-background-sidebar: #212121; // Used by sidebar
Expand Down
1 change: 0 additions & 1 deletion packages/admin-ui/src/dappnode_styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ p.no-p-style:last-child {
.input-append-button {
display: flex !important;
font-size: 20px !important;
border-color: #ced4da !important;
svg {
opacity: 0.7;
}
Expand Down
86 changes: 83 additions & 3 deletions packages/admin-ui/src/light_dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,24 @@
#light {
#main {
background-color: var(--color-light-background-main);

// BUTTONS
.input-append-button {
border-color: #ced4da !important;
}

.eth-multi-client,
.ipfs-multi-client {
&:hover:not(.selected) {
border-color: rgb(218, 218, 218);
background-color: rgb(218, 218, 218);
border-color: var(--color-light-card-hover);
background-color: var(--color-light-card-hover);
}
}

// ACTIVITY LOGS
.list-group-item-action {
&:hover:not(.selected) {
background-color: var(--color-dark-card-hover) !important;
}
}
}
Expand Down Expand Up @@ -114,6 +126,31 @@
color: var(--color-dark-quaternarytext);
}

.alert-success {
background-color: rgba(0, 110, 0, 0.4);
border-color: var(--color-dark-secondarytext);
color: var(--color-dark-quaternarytext);
}

.alert-danger {
background-color: rgba(160, 0, 0, 0.4);
border-color: var(--color-dark-secondarytext);
color: var(--color-dark-quaternarytext);
}

.alert-warning {
background-color: rgba(164, 140, 0, 0.4);
border-color: var(--color-dark-secondarytext);
color: var(--color-dark-quaternarytext);
}

// ERROR-VIEW
.error-view {
pre {
color: var(--color-dark-secondarytext);
}
}

// INPUTS
input[type="text"],
input[type="number"],
Expand All @@ -125,7 +162,7 @@
color: white;
border: none;
&::placeholder {
color: rgba(255, 255, 255, 0.85);
color: rgba(160, 160, 160, 0.85);
}
}
a.btn-outline-secondary,
Expand All @@ -134,6 +171,35 @@
color: white;
}

.custom-file-label:after {
background-color: transparent;
}

.input-append-button {
background-color: rgba(96,95,95,.839);
border: 1px solid #3a3a3a!important;
}

.form-control {
border: 1px solid #3a3a3a;
}

.switch {
input + label {
&::before {
background-color: #5a5a5a;
}
&::after {
background-color: var(--color-dark-card);
}
}
input:checked + label {
&::before {
background-color: var(--dappnode-color);
}
}
}

.input-group-text {
background-color: #4b4a4a;
border: none;
Expand All @@ -150,12 +216,26 @@
}
.eth-multi-client,
.ipfs-multi-client {
border-bottom: 6px solid var(--color-dark-card);
&.selected {
border-color: var(--dappnode-color);
.title {
color: var(--dappnode-color);
}
}
&:hover:not(.selected) {
border-color: var(--color-dark-card-hover);
background-color: var(--color-dark-card-hover);
}
}

// TABLES
.table-bordered td,
.table-bordered th {
border: 1px solid #4b4a4a;
}


// ACTIVITY LOGS
.list-group-item-action {
&:hover:not(.selected) {
Expand Down
9 changes: 4 additions & 5 deletions packages/admin-ui/src/pages/stakers/components/columns.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,20 @@
.execution-client,
.mev-boost,
.remote-signer {
border: 2px solid rgba(40, 40, 40, 0.5);
border-bottom: 6px solid rgba(40, 40, 40, 0.75);
border-bottom: 6px solid var(--color-dark-card);
.title {
color: var(--color-dark-maintext) !important;
}
&.isSelected {
.title {
color: var(--dappnode-color) !important;
}
border: 2px solid rgba(40, 40, 40, 0.5) !important;
border-bottom: 6px solid var(--dappnode-color) !important;
}
&:hover:not(.isSelected) {
cursor: pointer;
background-color: rgb(85, 85, 85);
border-color: rgb(85, 85, 85);
}
}
}
Expand Down Expand Up @@ -62,8 +61,8 @@
// Button feel
&:hover:not(.isSelected) {
cursor: pointer;
border-color: rgb(218, 218, 218);
background-color: rgb(218, 218, 218);
border-color: var(--color-light-card-hover);
background-color: var(--color-light-card-hover);
}
&.isSelected {
border-color: var(--dappnode-color);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,19 @@ export default function ConsensusClient<T extends Network>({
</div>
)}
{consensusClient.useCheckpointSync !== undefined && (
<Switch
checked={useCheckpointSync}
onToggle={() => {
setNewConsClient({
...consensusClient,
useCheckpointSync: !useCheckpointSync
});
setUseCheckpointSync(!useCheckpointSync);
}}
label={"Use checksync"}
/>
<div>
<Switch
checked={useCheckpointSync}
onToggle={() => {
setNewConsClient({
...consensusClient,
useCheckpointSync: !useCheckpointSync
});
setUseCheckpointSync(!useCheckpointSync);
}}
label={"Use checksync"}
/>
</div>
)}
</>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { parseStaticDate } from "utils/dates";
import { stringifyObjSafe } from "utils/objects";
import { stringSplit } from "utils/strings";
import newTabProps from "utils/newTabProps";
import { ThemeContext } from "App";
// Own module
import "./activity.scss";

Expand Down Expand Up @@ -85,6 +86,8 @@ function ActivityItem({ log }: { log: UserActionLog }) {
const date = parseStaticDate(log.timestamp);
const eventShort = stringSplit(log.event, ".")[0];

const { theme } = React.useContext(ThemeContext);

// Force a re-render every 15 seconds for the timeFrom to show up correctly
const [, setClock] = useState(0);
useEffect(() => {
Expand Down Expand Up @@ -118,7 +121,7 @@ function ActivityItem({ log }: { log: UserActionLog }) {
) : null}
{/* Count badge */}
{log.count ? (
<span className={badgeClass + "light"}>{log.count}</span>
<span className={badgeClass + theme}>{log.count}</span>
) : null}
{/* Call name */}
<span className={"text-" + type}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
/* Spacing */
padding: 0.5rem;
/* Box styling */
border: solid 1px #d3d3d396;
border-radius: 5px;
background-color: #f5f5f552;
/* Text styling */
display: block;
white-space: pre;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
overflow: auto;
padding: 1.25rem;
border-radius: 0.25rem;
background-color: #f7f9f9;
}

.show-local-credentials {
Expand Down
2 changes: 0 additions & 2 deletions packages/admin-ui/src/pages/wifi/components/wifiLocal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
/* Spacing */
padding: 0.5rem;
/* Box styling */
border: solid 1px #d3d3d396;
border-radius: 5px;
background-color: #f5f5f552;
/* Text styling */
display: block;
white-space: pre;
Expand Down