Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Minor changes

dominik-zeglen929bf016bcee
diff --git a/saleor/static/dashboard-next/AppRoot.tsx b/saleor/static/dashboard-next/AppRoot.tsx
index e603aef453..a750bd31fa 100644
--- a/saleor/static/dashboard-next/AppRoot.tsx
+++ b/saleor/static/dashboard-next/AppRoot.tsx
@@ -29,6 +29,7 @@ import Home from "./icons/Home";
import Shop from "./icons/Shop";
const drawerWidth = 256;
+const navigationBarHeight = 64;
const menuStructure = [
{
@@ -94,8 +95,8 @@ const decorate = withStyles(
drawerDesktop: {
backgroundColor: "transparent",
borderRight: "0 none",
- height: `calc(100vh - ${64 + theme.spacing.unit * 2}px)`,
- marginTop: 64 + theme.spacing.unit * 2,
+ height: `calc(100vh - ${navigationBarHeight + theme.spacing.unit * 2}px)`,
+ marginTop: navigationBarHeight + theme.spacing.unit * 2,
position: "relative" as "relative",
width: drawerWidth
},
diff --git a/saleor/static/dashboard-next/configuration/ConfigurationPage.tsx b/saleor/static/dashboard-next/configuration/ConfigurationPage.tsx
index 7a38f52b2c..5f4963e412 100644
--- a/saleor/static/dashboard-next/configuration/ConfigurationPage.tsx
+++ b/saleor/static/dashboard-next/configuration/ConfigurationPage.tsx
@@ -13,7 +13,7 @@ interface ConfigurationPageProps {
menu: Array<{
description: string;
disabled: boolean;
- icon: () => React.Component<IconProps>;
+ icon: React.ReactElement<IconProps>;
title: string;
url: string;
}>;
@@ -23,7 +23,7 @@ interface ConfigurationPageProps {
const decorate = withStyles(theme => ({
card: {
"&:hover": {
- boxShadow: "0 12px 12px rgba(0, 0, 0, 0.1)"
+ boxShadow: theme.shadows[12]
},
cursor: "pointer" as "pointer",
marginBottom: theme.spacing.unit * 3,
@@ -46,8 +46,7 @@ const decorate = withStyles(theme => ({
},
icon: {
color: theme.palette.primary.main,
- height: 48,
- width: 48
+ fontSize: 48
},
root: {
display: "grid" as "grid",
@@ -65,29 +64,25 @@ export const ConfigurationPage = decorate<ConfigurationPageProps>(
<Container width="md">
<PageHeader title={i18n.t("Configure")} />
<div className={classes.root}>
- {menu.map(menuItem => {
- const Icon = menuItem.icon;
- return (
- <Card
- className={
- menuItem.disabled ? classes.cardDisabled : classes.card
- }
- onClick={() => onSectionClick(menuItem.url)}
- >
- <CardContent className={classes.cardContent}>
- <Icon className={classes.icon} />
- <div>
- <Typography className={classes.sectionTitle} color="primary">
- {menuItem.title}
- </Typography>
- <Typography className={classes.sectionDescription}>
- {menuItem.description}
- </Typography>
- </div>
- </CardContent>
- </Card>
- );
- })}
+ {menu.map((menuItem, menuItemIndex) => (
+ <Card
+ className={menuItem.disabled ? classes.cardDisabled : classes.card}
+ onClick={() => onSectionClick(menuItem.url)}
+ key={menuItemIndex}
+ >
+ <CardContent className={classes.cardContent}>
+ <div className={classes.icon}>{menuItem.icon}</div>
+ <div>
+ <Typography className={classes.sectionTitle} color="primary">
+ {menuItem.title}
+ </Typography>
+ <Typography className={classes.sectionDescription}>
+ {menuItem.description}
+ </Typography>
+ </div>
+ </CardContent>
+ </Card>
+ ))}
</div>
</Container>
)
diff --git a/saleor/static/dashboard-next/configuration/index.tsx b/saleor/static/dashboard-next/configuration/index.tsx
index 0689766cba..30d2907ea1 100644
--- a/saleor/static/dashboard-next/configuration/index.tsx
+++ b/saleor/static/dashboard-next/configuration/index.tsx
@@ -10,64 +10,65 @@ import Monetization from "../icons/Monetization";
import Navigation from "../icons/Navigation";
import Pages from "../icons/Pages";
import StoreMall from "../icons/StoreMall";
+import { pageListUrl } from "../pages";
import ConfigurationPage from "./ConfigurationPage";
export const configurationMenu = [
{
description: i18n.t("Define types of products you sell"),
disabled: true,
- icon: Folder,
+ icon: <Folder fontSize="inherit" />,
title: i18n.t("Product Types"),
- url: "/product/"
+ url: undefined
},
{
description: i18n.t("Define attributes of products yousell"),
disabled: true,
- icon: Ballot,
+ icon: <Ballot fontSize="inherit" />,
title: i18n.t("Attributes"),
- url: "/attributes/"
+ url: undefined
},
{
description: i18n.t("Manage your employees and their permissions"),
disabled: true,
- icon: AccountCircle,
+ icon: <AccountCircle fontSize="inherit" />,
title: i18n.t("Staff Members"),
- url: "/staff/"
+ url: undefined
},
{
description: i18n.t("Manage how you ship out orders."),
disabled: true,
- icon: LocalShipping,
+ icon: <LocalShipping fontSize="inherit" />,
title: i18n.t("Shipping Methods"),
- url: "/shipping/"
+ url: undefined
},
{
description: i18n.t("Manage how your store charges tax"),
disabled: true,
- icon: Monetization,
+ icon: <Monetization fontSize="inherit" />,
title: i18n.t("Taxes"),
- url: "/taxes/"
+ url: undefined
},
{
description: i18n.t("Define how users can navigate through your store"),
disabled: true,
- icon: Navigation,
+ icon: <Navigation fontSize="inherit" />,
title: i18n.t("Navigation"),
- url: "/navigation/"
+ url: undefined
},
{
description: i18n.t("View and update your site settings"),
disabled: true,
- icon: StoreMall,
+ icon: <StoreMall fontSize="inherit" />,
title: i18n.t("Site Settings"),
- url: "/settings/"
+ url: undefined
},
{
description: i18n.t("Manage and add additional pages"),
disabled: false,
- icon: Pages,
+ icon: <Pages fontSize="inherit" />,
title: i18n.t("Pages"),
- url: "/pages/"
+ url: pageListUrl
}
];
diff --git a/saleor/static/dashboard-next/icons/AccountCircle.tsx b/saleor/static/dashboard-next/icons/AccountCircle.tsx
index 330b37c547..49eae5c1ef 100644
--- a/saleor/static/dashboard-next/icons/AccountCircle.tsx
+++ b/saleor/static/dashboard-next/icons/AccountCircle.tsx
@@ -3,13 +3,13 @@ import * as React from "react";
export const AccountCircle = createSvgIcon(
<>
- <rect width="24" height="24" fill-opacity="0" />
- <rect width="20" height="20" fill-opacity="0" transform="translate(2 2)" />
+ <rect width="24" height="24" fillOpacity="0" />
+ <rect width="20" height="20" fillOpacity="0" transform="translate(2 2)" />
<rect
width="20"
height="20"
fill="black"
- fill-opacity="0"
+ fillOpacity="0"
transform="translate(2 2)"
/>
<path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM7.07 18.28C7.5 17.38 10.12 16.5 12 16.5C13.88 16.5 16.51 17.38 16.93 18.28C15.57 19.36 13.86 20 12 20C10.14 20 8.43 19.36 7.07 18.28ZM18.36 16.83C16.93 15.09 13.46 14.5 12 14.5C10.54 14.5 7.07 15.09 5.64 16.83C4.62 15.49 4 13.82 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 13.82 19.38 15.49 18.36 16.83Z" />
diff --git a/saleor/static/dashboard-next/icons/Ballot.tsx b/saleor/static/dashboard-next/icons/Ballot.tsx
index 35c125a3b7..d5dfb8afe6 100644
--- a/saleor/static/dashboard-next/icons/Ballot.tsx
+++ b/saleor/static/dashboard-next/icons/Ballot.tsx
@@ -3,9 +3,9 @@ import * as React from "react";
export const Ballot = createSvgIcon(
<>
- <rect width="24" height="24" fill="black" fill-opacity="0" />
- <rect width="18" height="18" fill-opacity="0" transform="translate(3 3)" />
- <rect width="18" fill="black" fill-opacity="0" transform="translate(3 3)" />
+ <rect width="24" height="24" fill="black" fillOpacity="0" />
+ <rect width="18" height="18" fillOpacity="0" transform="translate(3 3)" />
+ <rect width="18" fill="black" fillOpacity="0" transform="translate(3 3)" />
<path d="M18 7.5H13V9.5H18V7.5Z" />
<path d="M18 14.5H13V16.5H18V14.5Z" />
<path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19Z" />
diff --git a/saleor/static/dashboard-next/icons/Folder.tsx b/saleor/static/dashboard-next/icons/Folder.tsx
index 110cae6463..f9e6bdb5de 100644
--- a/saleor/static/dashboard-next/icons/Folder.tsx
+++ b/saleor/static/dashboard-next/icons/Folder.tsx
@@ -3,8 +3,8 @@ import * as React from "react";
export const Folder = createSvgIcon(
<>
- <rect width="24" height="24" fill-opacity="0" />
- <rect width="20" height="16" fill-opacity="0" transform="translate(2 4)" />
+ <rect width="24" height="24" fillOpacity="0" />
+ <rect width="20" height="16" fillOpacity="0" transform="translate(2 4)" />
<path d="M9.17 6L11.17 8H20V18H4V6H9.17ZM10 4H4C2.9 4 2.01 4.9 2.01 6L2 18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V8C22 6.9 21.1 6 20 6H12L10 4Z" />
</>
);
diff --git a/saleor/static/dashboard-next/icons/LocalShipping.tsx b/saleor/static/dashboard-next/icons/LocalShipping.tsx
index 9a89e0559e..b0440c68eb 100644
--- a/saleor/static/dashboard-next/icons/LocalShipping.tsx
+++ b/saleor/static/dashboard-next/icons/LocalShipping.tsx
@@ -3,8 +3,8 @@ import * as React from "react";
export const LocalShipping = createSvgIcon(
<>
- <rect width="24" height="24" fill-opacity="0" />
- <rect width="22" height="16" fill-opacity="0" transform="translate(1 4)" />
+ <rect width="24" height="24" fillOpacity="0" />
+ <rect width="22" height="16" fillOpacity="0" transform="translate(1 4)" />
<path d="M20 8H17V4H3C1.9 4 1 4.9 1 6V17H3C3 18.66 4.34 20 6 20C7.66 20 9 18.66 9 17H15C15 18.66 16.34 20 18 20C19.66 20 21 18.66 21 17H23V12L20 8ZM19.5 9.5L21.46 12H17V9.5H19.5ZM6 18C5.45 18 5 17.55 5 17C5 16.45 5.45 16 6 16C6.55 16 7 16.45 7 17C7 17.55 6.55 18 6 18ZM8.22 15C7.67 14.39 6.89 14 6 14C5.11 14 4.33 14.39 3.78 15H3V6H15V15H8.22ZM18 18C17.45 18 17 17.55 17 17C17 16.45 17.45 16 18 16C18.55 16 19 16.45 19 17C19 17.55 18.55 18 18 18Z" />
</>
);
diff --git a/saleor/static/dashboard-next/icons/Monetization.tsx b/saleor/static/dashboard-next/icons/Monetization.tsx
index f848366ec4..1dd34af670 100644
--- a/saleor/static/dashboard-next/icons/Monetization.tsx
+++ b/saleor/static/dashboard-next/icons/Monetization.tsx
@@ -3,9 +3,9 @@ import * as React from "react";
export const Monetization = createSvgIcon(
<>
- <rect width="24" height="24" fill="black" fill-opacity="0" />
- <rect width="20" height="20" fill-opacity="0" transform="translate(2 2)" />
- <rect width="20" height="20" fill-opacity="0" transform="translate(2 2)" />
+ <rect width="24" height="24" fill="black" fillOpacity="0" />
+ <rect width="20" height="20" fillOpacity="0" transform="translate(2 2)" />
+ <rect width="20" height="20" fillOpacity="0" transform="translate(2 2)" />
<path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20Z" />
<path d="M12.31 11.14C10.54 10.69 9.97004 10.2 9.97004 9.47C9.97004 8.63 10.76 8.04 12.07 8.04C13.45 8.04 13.97 8.7 14.01 9.68H15.72C15.67 8.34 14.85 7.11 13.23 6.71V5H10.9V6.69C9.39004 7.01 8.18004 7.99 8.18004 9.5C8.18004 11.29 9.67004 12.19 11.84 12.71C13.79 13.17 14.18 13.86 14.18 14.58C14.18 15.11 13.79 15.97 12.08 15.97C10.48 15.97 9.85004 15.25 9.76004 14.33H8.04004C8.14004 16.03 9.40004 16.99 10.9 17.3V19H13.24V17.33C14.76 17.04 15.96 16.17 15.97 14.56C15.96 12.36 14.07 11.6 12.31 11.14Z" />
</>
diff --git a/saleor/static/dashboard-next/icons/Navigation.tsx b/saleor/static/dashboard-next/icons/Navigation.tsx
index 3d4d5fb86c..f925a3dd20 100644
--- a/saleor/static/dashboard-next/icons/Navigation.tsx
+++ b/saleor/static/dashboard-next/icons/Navigation.tsx
@@ -3,13 +3,8 @@ import * as React from "react";
export const Navigation = createSvgIcon(
<>
- <rect width="24" height="24" fill-opacity="0" />
- <rect
- width="15"
- height="19"
- fill-opacity="0"
- transform="translate(4.5 2)"
- />
+ <rect width="24" height="24" fillOpacity="0" />
+ <rect width="15" height="19" fillOpacity="0" transform="translate(4.5 2)" />
<path d="M12 7.27L16.28 17.7L12.81 16.17L12 15.81L11.19 16.17L7.72 17.7L12 7.27ZM12 2L4.5 20.29L5.21 21L12 18L18.79 21L19.5 20.29L12 2Z" />
</>
);
diff --git a/saleor/static/dashboard-next/icons/NoPhoto.tsx b/saleor/static/dashboard-next/icons/NoPhoto.tsx
index 5d0b3ef39c..60f61c2abd 100644
--- a/saleor/static/dashboard-next/icons/NoPhoto.tsx
+++ b/saleor/static/dashboard-next/icons/NoPhoto.tsx
@@ -2,7 +2,7 @@ import createSvgIcon from "@material-ui/icons/utils/createSvgIcon";
import * as React from "react";
export const NoPhoto = createSvgIcon(
- <g style={{fillRule: 'evenodd'}}>
+ <g style={{ fillRule: "evenodd" }}>
<path d="M 22.418358,23.933955 23.941248,22.416861 1.505286,0.06622212 -0.01756434,1.5833815 2.3945365,3.98626 c -0.00402,0.054209 -0.00609,0.1089561 -0.00609,0.1641949 l 0,15.5654231 c 0,1.223034 1.0044565,2.223746 2.232151,2.223746 l 15.6251379,0 c 0.05533,0 0.110242,-0.0021 0.164611,-0.0061 l 2.008007,2.000405 z m -4.234188,-4.218065 -2.232782,-2.224284 -10.2147024,0 3.3482328,-4.291641 2.3883966,2.879541 1.336535,-1.717557 -8.1892465,-8.1579753 0,13.5119163 13.5635665,0 z m 4.293682,-15.5654234 0,13.8585934 -2.232111,-2.223614 0,-11.6349794 -11.6793779,0 -2.232218,-2.2237479 13.9115959,0 c 1.227708,0 2.232111,1.0007001 2.232111,2.2237479 z" />
</g>
);
diff --git a/saleor/static/dashboard-next/icons/Pages.tsx b/saleor/static/dashboard-next/icons/Pages.tsx
index 6c2b25450b..ecf4ea9091 100644
--- a/saleor/static/dashboard-next/icons/Pages.tsx
+++ b/saleor/static/dashboard-next/icons/Pages.tsx
@@ -3,8 +3,8 @@ import * as React from "react";
export const Pages = createSvgIcon(
<>
- <rect width="24" height="24" fill-opacity="0" />
- <rect width="18" height="18" fill-opacity="0" transform="translate(3 3)" />
+ <rect width="24" height="24" fillOpacity="0" />
+ <rect width="18" height="18" fillOpacity="0" transform="translate(3 3)" />
<path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V12V5C21 3.9 20.1 3 19 3ZM13 5H19V11H16L17 7L13 8V5ZM5 5H11V8L7 7L8 11H5V5ZM11 19H5V13H8L7 17L11 16V19ZM19 19H13V16L17 17L16 13H19V19ZM14.63 14.63L12 13.72L9.37 14.63L10.28 12L9.37 9.37L12 10.28L14.63 9.37L13.72 12L14.63 14.63Z" />
</>
);
diff --git a/saleor/static/dashboard-next/icons/StoreMall.tsx b/saleor/static/dashboard-next/icons/StoreMall.tsx
index 2c7ca12491..bec5a200ce 100644
--- a/saleor/static/dashboard-next/icons/StoreMall.tsx
+++ b/saleor/static/dashboard-next/icons/StoreMall.tsx
@@ -3,8 +3,8 @@ import * as React from "react";
export const StoreMall = createSvgIcon(
<>
- <rect width="24" height="24" fill-opacity="0" />
- <rect width="18" height="16" fill-opacity="0" transform="translate(3 4)" />
+ <rect width="24" height="24" fillOpacity="0" />
+ <rect width="18" height="16" fillOpacity="0" transform="translate(3 4)" />
<path d="M18.36 9L18.96 12H5.04L5.64 9H18.36ZM20 4H4V6H20V4ZM20 7H4L3 12V14H4V20H14V14H18V20H20V14H21V12L20 7ZM6 18V14H12V18H6Z" />
</>
);