Skip to content

Commit 423f765

Browse files
committed
clean up
1 parent f829532 commit 423f765

File tree

14 files changed

+94
-113
lines changed

14 files changed

+94
-113
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@import "~@zesty-io/core/colors.less";
2+
3+
.EditorActions {
4+
flex: 1;
5+
display: flex;
6+
padding: 0 4px;
7+
justify-content: flex-end;
8+
9+
.HideSmall {
10+
display: none;
11+
@media only screen and (min-width: 1500px) {
12+
display: block;
13+
}
14+
}
15+
}

Diff for: src/apps/code-editor/src/app/components/FileActions/components/EditorActions/Publish/Publish.js

+23-26
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,33 @@ import LoadingButton from "@mui/lab/LoadingButton";
55

66
import { publishFile, fetchFiles } from "../../../../../../store/files";
77

8-
import { Tooltip } from "@mui/material";
8+
import styles from "../EditorActions.less";
99

1010
export const Publish = memo(function Publish(props) {
1111
const [publishing, setPublishing] = useState(false);
1212

1313
return (
14-
<Tooltip title={`Publish Version ${props.version}`}>
15-
<LoadingButton
16-
variant="contained"
17-
color="success"
18-
size="small"
19-
onClick={() => {
20-
setPublishing(true);
21-
props
22-
.dispatch(publishFile(props.fileZUID, props.status))
23-
.finally(() => {
24-
setPublishing(false);
25-
26-
props.dispatch(fetchFiles("views"));
27-
props.dispatch(fetchFiles("stylesheets"));
28-
props.dispatch(fetchFiles("scripts"));
29-
});
30-
}}
31-
loading={publishing}
32-
loadingPosition="start"
33-
startIcon={<UploadIcon fontSize="small" />}
34-
sx={{ px: 1 }}
35-
>
36-
Publish
37-
</LoadingButton>
38-
</Tooltip>
14+
<LoadingButton
15+
variant="contained"
16+
color="success"
17+
size="small"
18+
onClick={() => {
19+
setPublishing(true);
20+
props
21+
.dispatch(publishFile(props.fileZUID, props.status))
22+
.finally(() => {
23+
setPublishing(false);
24+
props.dispatch(fetchFiles("views"));
25+
props.dispatch(fetchFiles("stylesheets"));
26+
props.dispatch(fetchFiles("scripts"));
27+
});
28+
}}
29+
loading={publishing}
30+
loadingPosition="start"
31+
startIcon={<UploadIcon fontSize="small" />}
32+
>
33+
Publish
34+
<span className={styles.HideSmall}>&nbsp;Version {props.version}</span>
35+
</LoadingButton>
3936
);
4037
});

Diff for: src/apps/code-editor/src/app/components/FileActions/components/EditorActions/Save/Save.js

+15-15
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import SaveIcon from "@mui/icons-material/Save";
66
import LoadingButton from "@mui/lab/LoadingButton";
77

88
import { saveFile } from "../../../../../../store/files";
9-
import { Tooltip } from "@mui/material";
9+
10+
import styles from "../EditorActions.less";
1011

1112
export function Save(props) {
1213
const [saving, setSaving] = useState(false);
@@ -26,19 +27,18 @@ export function Save(props) {
2627
const metaShortcut = useMetaKey("s", onSave);
2728

2829
return (
29-
<Tooltip title={metaShortcut}>
30-
<LoadingButton
31-
variant="contained"
32-
color="primary"
33-
size="small"
34-
onClick={onSave}
35-
loadingPosition="start"
36-
startIcon={<SaveIcon fontSize="small" />}
37-
sx={{ px: 1 }}
38-
loading={saving}
39-
>
40-
Save
41-
</LoadingButton>
42-
</Tooltip>
30+
<LoadingButton
31+
variant="contained"
32+
color="primary"
33+
size="small"
34+
onClick={onSave}
35+
loadingPosition="start"
36+
startIcon={<SaveIcon fontSize="small" />}
37+
sx={{ mx: 0.5 }}
38+
loading={saving}
39+
>
40+
Save&nbsp;
41+
<span className={styles.HideSmall}>{metaShortcut}</span>
42+
</LoadingButton>
4343
);
4444
}

Diff for: src/apps/code-editor/src/app/components/FileList/FileList.less

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
background: @nav-background-color;
55
margin: 0;
66
padding: 0;
7-
height: calc(100vh - 40px);
7+
88
.NavActions {
9-
padding: 12px 8px 12px 8px;
9+
padding: 8px;
1010
background-color: #1d2939;
1111
display: flex;
1212
flex-direction: column;

Diff for: src/apps/code-editor/src/app/components/FileList/components/CreateFile/CreateFile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export const CreateFile = memo(function CreateFile(props) {
116116
size="small"
117117
title="Create File"
118118
startIcon={<AddIcon />}
119-
sx={{ justifyContent: "flex-start" }}
119+
sx={{ justifyContent: "flex-start", my: 0.5 }}
120120
>
121121
<span>Create File</span>
122122
</Button>

Diff for: src/apps/code-editor/src/app/views/CodeEditor/CodeEditor.less

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
}
1212

1313
.Nav {
14-
// background-color: @nav-background-color;
15-
14+
background-color: @nav-background-color;
1615
word-break: break-word;
1716
}
1817
.FileEditor {

Diff for: src/apps/content-editor/src/app/components/HideContentItemDialog.tsx

+10-16
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
Typography,
88
Stack,
99
SvgIcon,
10-
Avatar,
1110
} from "@mui/material";
1211
import { VisibilityOffRounded, VisibilityRounded } from "@mui/icons-material";
1312

@@ -31,25 +30,20 @@ export const HideContentItemDialog: FC<Readonly<Props>> = ({
3130
<Dialog open onClose={onClose} fullWidth maxWidth={"xs"}>
3231
<DialogContent sx={{ mt: 2.5 }}>
3332
<Stack>
34-
<Avatar
35-
sizes="extraLarge"
33+
<SvgIcon
34+
component={isHide ? VisibilityOffRounded : VisibilityRounded}
35+
color="primary"
3636
sx={{
37+
padding: "8px",
38+
borderRadius: "20px",
3739
backgroundColor: "deepOrange.50",
40+
display: "block",
3841
mb: 1.5,
42+
width: "40px",
43+
height: "40px",
3944
}}
40-
>
41-
<SvgIcon
42-
component={isHide ? VisibilityOffRounded : VisibilityRounded}
43-
color="primary"
44-
// sx={{
45-
// padding: "8px",
46-
// borderRadius: "20px",
47-
// backgroundColor: "deepOrange.50",
48-
// display: "block",
49-
// mb: 1.5,
50-
// }}
51-
/>
52-
</Avatar>
45+
/>
46+
5347
<Typography variant="h5" fontWeight={600} mb={1}>
5448
{isHide ? `Hide ${item.label}?` : `Unhide ${item.label}?`}
5549
</Typography>

Diff for: src/apps/seo/src/views/RedirectsManager/RedirectsTable/RedirectTable.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export default function RedirectTable(props) {
181181
columns={columns}
182182
rows={rows}
183183
rowHeight={60}
184-
// initialState={{ pinnedColumns: { right: ["actions"] } }}
184+
initialState={{ pinnedColumns: { right: ["actions"] } }}
185185
hideFooter
186186
/>
187187
</div>

Diff for: src/apps/settings/src/app/views/Instance/SettingsStyles.less

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
@import "~@zesty-io/core/typography.less";
33

44
.Settings {
5-
box-sizing: content-box;
65
.saveButton {
76
max-width: 160px;
87
align-self: flex-end;

Diff for: src/shell/components/AppSidebar/index.tsx

+15-38
Original file line numberDiff line numberDiff line change
@@ -55,48 +55,25 @@ interface Props {
5555

5656
const darkTheme = {
5757
backgroundColor: "grey.900",
58-
color: "grey.400",
59-
"& .app-sidebar-header-container": {
60-
"& svg": { color: "grey.400" },
61-
"& .MuiTextField-root": {
62-
"& input, input::placeholder, fieldset": {
63-
color: "grey.300",
64-
border: "none",
65-
},
66-
},
67-
"& .app-sidebar-header": {
68-
"& .MuiTypography-root, & .MuiSvgIcon-root": {
69-
color: "common.white",
70-
},
71-
},
72-
},
73-
"& .nav-tree-container": {
74-
"& .navtree-header": {
75-
"& .MuiTypography-root, & .MuiSvgIcon-root": {
76-
color: "grey.400",
77-
},
78-
"& .MuiIconButton-root:hover": {
79-
backgroundColor: "grey.800",
80-
},
81-
},
82-
"& .MuiTreeItem-iconContainer svg, & .MuiTreeItem-label svg": {
83-
color: "grey.400",
84-
},
85-
"& .MuiTreeItem-label": {
58+
"& .MuiTreeItem-label,\
59+
& .app-sidebar-header-container input,\
60+
& .app-sidebar-header-container input::placeholder,\
61+
& .app-sidebar-header-container fieldset":
62+
{
8663
color: "grey.300",
64+
border: "none",
8765
},
88-
"& .MuiTreeItem-content.Mui-selected .MuiTreeItem-label .treeActions": {
89-
"& .MuiSvgIcon-root": {
90-
color: "grey.400",
91-
},
92-
'& [variant="contained"] .MuiSvgIcon-root': {
93-
color: "common.white",
94-
},
66+
"& .MuiAccordion-root .MuiTypography-root,\
67+
& .navtree-header .MuiTypography-root,\
68+
& .MuiSvgIcon-root":
69+
{
70+
color: "grey.400",
9571
},
96-
"& .MuiTreeItem-content:hover": {
97-
backgroundColor: "rgba(255, 93, 10, 0.06)",
72+
"& .app-sidebar-header .MuiTypography-root, \
73+
& .app-sidebar-header .MuiSvgIcon-root":
74+
{
75+
color: "common.white",
9876
},
99-
},
10077
};
10178

10279
export const AppSideBar = forwardRef<any, PropsWithChildren<Props>>(

Diff for: src/shell/components/CreateContentItemDialog.tsx

+8-8
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,18 @@ export const CreateContentItemDialog = ({
7878
maxWidth={"xs"}
7979
>
8080
<DialogTitle component={Box}>
81-
<Avatar
82-
sizes="extraLarge"
81+
<EditRoundedIcon
82+
color="primary"
8383
sx={{
84-
// padding: "8px",
85-
// borderRadius: "20px",
84+
padding: "8px",
85+
borderRadius: "20px",
8686
backgroundColor: "deepOrange.50",
87-
// display: "block",
87+
display: "block",
8888
mb: 1.5,
89+
width: "40px",
90+
height: "40px",
8991
}}
90-
>
91-
<EditRoundedIcon color="primary" />
92-
</Avatar>
92+
/>
9393
<Typography variant="h5" fontWeight={700} mb={1}>
9494
Create Content Item
9595
</Typography>

Diff for: src/shell/components/NavTree/components/NavTreeItem.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export const NavTreeItem: FC<Props> = React.memo(
117117

118118
".MuiTreeItem-label .treeActions [data-cy='tree-item-hide'] svg": {
119119
// Makes sure that the hide icon color does not change when tree item is selected
120-
color: "action.active",
120+
color: "grey.400",
121121
},
122122

123123
".MuiTreeItem-label .treeActions [data-cy='tree-item-add-new-content'] svg":

Diff for: src/shell/components/NavTree/index.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { NavTreeItem } from "./components/NavTreeItem";
66
import { ContentNavItem } from "../../services/types";
77
import ArrowDropDownRoundedIcon from "@mui/icons-material/ArrowDropDownRounded";
88
import ArrowRightRoundedIcon from "@mui/icons-material/ArrowRightRounded";
9-
import { Box } from "@mui/material";
109

1110
export type TreeItem = {
1211
icon: any;
@@ -49,7 +48,7 @@ export const NavTree: FC<Readonly<Props>> = ({
4948

5049
return (
5150
<>
52-
<Box className="navtree-header">{HeaderComponent}</Box>
51+
{HeaderComponent}
5352
{error ? (
5453
ErrorComponent
5554
) : (

Diff for: src/shell/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ const appTheme = createTheme(theme, {
6464
action: {
6565
disabled: "rgba(112, 112, 112, 0.5)",
6666
disabledBackground: "rgba(112, 112, 112, 0.2)",
67+
hover: "rgba(255, 93, 10, 0.06)",
6768
},
6869
},
6970
components: {

0 commit comments

Comments
 (0)