Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Remove custom styles from notifications #100

Merged
merged 3 commits into from
Jan 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 1 addition & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,7 @@ LABEL org.opencontainers.image.title="Volumes Backup & Share" \
]" \
com.docker.desktop.extension.icon="https://raw.githubusercontent.com/docker/volumes-backup-extension/main/icon.svg" \
com.docker.extension.changelog="<ul>\
<li>Improved volume list performance.</li> \
<li>Added support to import backups from any .tar.gz.</li> \
<li>Changed the clone operation to copy the volume labels as well.</li> \
<li>Fixed a bug where the clone operation will not validate whether the destination volume already existed.</li> \
<li>Added error tracking to detect issues before users report them.</li> \
<li>Fixed new vulnerabilities detected in the Dockerfile.</li> \
<li>Fixed an issue with notifications and the new Design System.</li> \
</ul>" \
com.docker.extension.categories="volumes"

Expand Down
1 change: 1 addition & 0 deletions ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ export function App() {
return;
}
calculateVolumeSize(recalculateVolumeSize);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [recalculateVolumeSize]);

const handleTransferDialogClose = () => {
Expand Down
23 changes: 4 additions & 19 deletions ui/src/NotificationContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const NotificationProvider: FC = ({ children }) => {
{actions.map((action) => (
<Button
key={action.name}
variant="text"
onClick={() => {
if (action.onClick) action.onClick();
setOpen(false);
Expand All @@ -85,32 +86,16 @@ export const NotificationProvider: FC = ({ children }) => {
message={values.message}
action={buildActions(values.actions || [DEFAULT_ACTION])}
sx={{
"& .MuiButton-root": {
color: useLightTheme
? (theme) => theme.palette.docker.blue[500]
: "white",
"&:hover": {
backgroundColor: (theme) => {
if (values.type === "error") {
return useLightTheme
? theme.palette.docker.red[200]
: theme.palette.docker.red[100];
}

return useLightTheme
? "white"
: theme.palette.docker.grey[200];
},
},
},
backgroundColor: (theme) => {
if (values.type === "error") {
return useLightTheme
? theme.palette.docker.red[100] // red-100 should be "#FDEAEA" but it's not 🤷‍♂️
: theme.palette.docker.red[200];
}

return useLightTheme ? "white" : theme.palette.docker.grey[200];
return useLightTheme
? theme.palette.common.white
: theme.palette.docker.grey[200];
},
color: (theme) => theme.palette.text.primary,
borderRadius: "4px !important",
Expand Down