Share Icon updated (#1008)

This commit is contained in:
Daniel Valdivia
2021-09-07 15:48:34 -07:00
committed by GitHub
parent 1d88bb491d
commit b13b6db6f7
9 changed files with 25 additions and 137 deletions

View File

@@ -14,25 +14,26 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import React from "react";
import SvgIcon from "@material-ui/core/SvgIcon";
import * as React from "react";
import { SvgIcon, SvgIconProps } from "@material-ui/core";
interface IShareIcon {
width?: number;
}
const ShareIcon = ({ width = 24 }: IShareIcon) => {
const ShareIcon = (props: SvgIconProps) => {
return (
<SvgIcon style={{ width: width, height: width }}>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 13">
<SvgIcon {...props}>
<svg
xmlns="http://www.w3.org/2000/svg"
width="1em"
height="1em"
viewBox="0 0 255.999 243.852"
>
<path
d="M11.05 8.617v2.429h-9.1v-9.1h2.429v-1.95H0v13h13V8.617z"
className="a"
></path>
data-name="Trazado 410"
d="M251.315 67.671L207.79 25.459c-14.279-13.851-35.342 7.862-21.063 21.716l12.959 12.567a156.689 156.689 0 00-82.95 23.182 156.774 156.774 0 00-71.051 97.677 15.547 15.547 0 0011.474 18.755 15.62 15.62 0 003.655.438 15.555 15.555 0 0015.1-11.909c14.6-60.586 70.74-100.461 130.9-96.758l-3.335 4.317-15.767 16.248c-13.849 14.285 7.867 35.345 21.719 21.063l42.214-43.518a15.131 15.131 0 00-.33-21.566z"
/>
<path
d="M3.854 9.256h1.95a4.945 4.945 0 013.6-4.74v1.3l.6-.487 2.474-2.012L9.4.817v1.7a6.9 6.9 0 00-5.546 6.739z"
className="a"
></path>
data-name="Trazado 411"
d="M229.501 148.665a14.352 14.352 0 00-14.348 14.351v52.134H28.703V28.703h126.71a14.352 14.352 0 0014.351-14.351A14.353 14.353 0 00155.413.001h-130.1A25.34 25.34 0 00.002 25.314v193.228a25.339 25.339 0 0025.311 25.311h193.23a25.339 25.339 0 0025.311-25.311v-55.526a14.353 14.353 0 00-14.353-14.351z"
/>
</svg>
</SvgIcon>
);

View File

@@ -18,14 +18,13 @@ import isString from "lodash/isString";
import { Link } from "react-router-dom";
import { createStyles, withStyles } from "@material-ui/core/styles";
import { IconButton } from "@material-ui/core";
import ShareIcon from "./TableActionIcons/ShareIcon";
import CloudIcon from "./TableActionIcons/CloudIcon";
import ConsoleIcon from "./TableActionIcons/ConsoleIcon";
import DisableIcon from "./TableActionIcons/DisableIcon";
import FormatDriveIcon from "./TableActionIcons/FormatDriveIcon";
import EditIcon from "../../../../icons/EditIcon";
import TrashIcon from "../../../../icons/TrashIcon";
import { IAMPoliciesIcon, PreviewIcon } from "../../../../icons";
import { IAMPoliciesIcon, PreviewIcon, ShareIcon } from "../../../../icons";
import DownloadIcon from "../../../../icons/DownloadIcon";
const styles = () =>
@@ -65,7 +64,7 @@ const defineIcon = (type: string, selected: boolean) => {
case "description":
return <IAMPoliciesIcon />;
case "share":
return <ShareIcon active={selected} />;
return <ShareIcon />;
case "cloud":
return <CloudIcon active={selected} />;
case "console":

View File

@@ -1,20 +0,0 @@
import React from "react";
import { IIcon, selected, unSelected } from "./common";
const DeleteIcon = ({ active = false }: IIcon) => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 10.402 13"
>
<path
fill={active ? selected : unSelected}
d="M6.761 1V0H3.64v1H.004v1h10.4V1zM.004 2.998l1.672 10h7.052l1.673-10zm3.412 8.243l-.552-6.478h.653l.553 6.472zm3.569 0h-.653l.551-6.472h.654z"
/>
</svg>
);
};
export default DeleteIcon;

View File

@@ -1,24 +0,0 @@
import React from "react";
import { IIcon, selected, unSelected } from "./common";
const DeleteIcon = ({ active = false }: IIcon) => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 13 12.996"
>
<path
fill={active ? selected : unSelected}
d="M11.05 9.096v1.95h-9.1v-1.95H0v3.9h13v-3.9z"
></path>
<path
fill={active ? selected : unSelected}
d="M6.5 9.75L9 6.672H7.475V0h-1.95v6.672H4z"
></path>
</svg>
);
};
export default DeleteIcon;

View File

@@ -1,24 +0,0 @@
import React from "react";
import { IIcon, selected, unSelected } from "./common";
import { SvgIcon } from "@material-ui/core";
const PencilIcon = ({ active = false }: IIcon) => {
return (
<SvgIcon>
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 13.833 13.833"
>
<path
fill={active ? selected : unSelected}
d="M2.934,16H0V13.066L10.607,2.459a1,1,0,0,1,1.414,0l1.52,1.52a1,1,0,0,1,0,1.414Z"
transform="translate(0 -2.167)"
/>
</svg>
</SvgIcon>
);
};
export default PencilIcon;

View File

@@ -1,26 +0,0 @@
import React from "react";
import { IIcon, selected, unSelected } from "./common";
const ShareIcon = ({ active = false }: IIcon) => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 13 13"
>
<path
fill={active ? selected : unSelected}
d="M11.05 8.617v2.429h-9.1v-9.1h2.429v-1.95H0v13h13V8.617z"
className="a"
></path>
<path
fill={active ? selected : unSelected}
d="M3.854 9.256h1.95a4.945 4.945 0 013.6-4.74v1.3l.6-.487 2.474-2.012L9.4.817v1.7a6.9 6.9 0 00-5.546 6.739z"
className="a"
></path>
</svg>
);
};
export default ShareIcon;

View File

@@ -1,21 +0,0 @@
import React from "react";
import { IIcon, selected, unSelected } from "./common";
const ViewIcon = ({ active = false }: IIcon) => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 16 11.856"
>
<path
fill={active ? selected : unSelected}
d="M-54,8l1.764,2.614A7.52,7.52,0,0,0-46,13.928h0a7.52,7.52,0,0,0,6.234-3.314L-38,8l-1.764-2.614A7.52,7.52,0,0,0-46,2.072h0a7.52,7.52,0,0,0-6.234,3.314Zm10.286,0A2.285,2.285,0,0,1-46,10.286,2.285,2.285,0,0,1-48.286,8,2.285,2.285,0,0,1-46,5.714,2.285,2.285,0,0,1-43.714,8Zm1.3,0A3.59,3.59,0,0,1-46,11.59,3.59,3.59,0,0,1-49.59,8,3.59,3.59,0,0,1-46,4.41,3.59,3.59,0,0,1-42.41,8Z"
transform="translate(54 -2.072)"
/>
</svg>
);
};
export default ViewIcon;

View File

@@ -94,8 +94,7 @@ const DriveInfoCard = ({ classes, drive }: ICardProps) => {
return classes.redState;
case "ok":
return classes.greenState;
default:
return classes.greyState;
deefault: return classes.greyState;
}
};

View File

@@ -189,7 +189,7 @@ const UserDetails = ({ classes, match }: IUserDetailsProps) => {
}
setCurrentPolicies(currentPolicies);
setEnabled(res.status === "enabled");
setHasPolicy(res.hasPolicy)
setHasPolicy(res.hasPolicy);
setLoading(false);
})
.catch((err: ErrorResponseHandler) => {
@@ -384,7 +384,11 @@ const UserDetails = ({ classes, match }: IUserDetailsProps) => {
/>
</TabPanel>
<TabPanel index={1} value={curTab}>
<UserServiceAccountsPanel user={userName} classes={classes} hasPolicy={hasPolicy} />
<UserServiceAccountsPanel
user={userName}
classes={classes}
hasPolicy={hasPolicy}
/>
</TabPanel>
<TabPanel index={2} value={curTab}>
<div className={classes.actionsTray}>