Logos as React Components (#935)
* Select policies while creating new user Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> * Fix add user error Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> * Fix tests Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> * Logo as React Components Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
42
portal-ui/src/icons/ConsoleLogo.tsx
Normal file
42
portal-ui/src/icons/ConsoleLogo.tsx
Normal file
@@ -0,0 +1,42 @@
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2021 MinIO, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// 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";
|
||||
|
||||
interface IConsoleLogo {
|
||||
width?: number;
|
||||
}
|
||||
|
||||
const ConsoleLogo = ({ width = 120 }: IConsoleLogo) => {
|
||||
return (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={width}
|
||||
viewBox="0 0 121.755 29.822"
|
||||
>
|
||||
<defs>
|
||||
<style>{".prefix__a{fill:#fff}"}</style>
|
||||
</defs>
|
||||
<path
|
||||
className="prefix__a"
|
||||
d="M15.647 15.935l-1.772 1.194a6.088 6.088 0 00-5.135-2.652 6.348 6.348 0 00-6.522 6.654 6.348 6.348 0 006.522 6.654 6.031 6.031 0 005.124-2.64l1.735 1.266a8.126 8.126 0 01-6.859 3.411A8.422 8.422 0 010 21.131a8.422 8.422 0 018.74-8.691 7.963 7.963 0 016.907 3.495zM35.641 21.131a8.422 8.422 0 01-8.74 8.691 8.422 8.422 0 01-8.739-8.691 8.421 8.421 0 018.739-8.691 8.422 8.422 0 018.74 8.691zm-15.261 0a6.347 6.347 0 006.521 6.654 6.347 6.347 0 006.521-6.654 6.347 6.347 0 00-6.521-6.654 6.347 6.347 0 00-6.521 6.654zM53.729 29.581h-1.917l-10.2-13.26-.012 13.248h-2.122V12.681h1.917l10.21 13.26V12.693h2.122zM69.551 16.02a8.835 8.835 0 00-5-1.555c-2.471 0-4.231 1.109-4.231 2.929 0 1.531 1.29 2.315 3.821 2.628l1.484.181c2.856.35 5.3 1.507 5.3 4.484 0 3.364-3.05 5.123-6.7 5.123a10.935 10.935 0 01-6.654-2.194l1.157-1.687a9.018 9.018 0 005.5 1.868c2.519 0 4.5-1.025 4.5-2.929 0-1.567-1.41-2.314-4.038-2.64l-1.567-.193c-2.784-.337-5-1.627-5-4.508 0-3.255 2.893-5.075 6.449-5.075a10.336 10.336 0 016.076 1.844zM91.268 21.131a8.422 8.422 0 01-8.74 8.691 8.422 8.422 0 01-8.739-8.691 8.421 8.421 0 018.739-8.691 8.422 8.422 0 018.74 8.691zm-15.261 0a6.348 6.348 0 006.521 6.654 6.347 6.347 0 006.521-6.654 6.347 6.347 0 00-6.521-6.654 6.348 6.348 0 00-6.521 6.654zM106.897 29.569h-11.79V12.693h2.122v14.863h9.668zM121.76 29.569h-11.982V12.693h11.862v1.988h-9.74v5.389h9.427v2H111.9v5.509h9.86zM14.9.167h2.576v7.547H14.9zM11.801.238l-5.23 3.194a.229.229 0 01-.242 0L1.099.238a.726.726 0 00-.374-.1H.719a.717.717 0 00-.717.717v6.864h2.574V4.462a.258.258 0 01.392-.22l2.931 1.793a.919.919 0 00.944.009L9.935 4.23a.258.258 0 01.388.222v3.267h2.575V.855a.717.717 0 00-.717-.717h-.006a.723.723 0 00-.374.1zM30.348.165h-2.613v3.463a.258.258 0 01-.379.228L20.585.249a.723.723 0 00-.337-.084.717.717 0 00-.717.717v6.832h2.592V4.306a.258.258 0 01.379-.227l6.8 3.606a.714.714 0 00.336.083.716.716 0 00.717-.717V.165zM32.439 7.712V.165h1.2v7.547zM40.536 7.878c-3.189 0-5.451-1.513-5.451-3.939S37.361 0 40.536 0s5.466 1.513 5.466 3.939-2.236 3.939-5.466 3.939zm0-6.87c-2.371 0-4.2 1.036-4.2 2.931s1.826 2.93 4.2 2.93 4.212-1.022 4.212-2.93-1.84-2.931-4.212-2.931z"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
|
||||
export default ConsoleLogo;
|
||||
45
portal-ui/src/icons/OperatorLogo.tsx
Normal file
45
portal-ui/src/icons/OperatorLogo.tsx
Normal file
@@ -0,0 +1,45 @@
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2021 MinIO, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// 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";
|
||||
|
||||
interface IOperatorLogo {
|
||||
width?: number;
|
||||
}
|
||||
|
||||
const OperatorLogo = ({ width = 120 }: IOperatorLogo) => {
|
||||
return (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 606.583 134.691"
|
||||
width={width}
|
||||
>
|
||||
<defs>
|
||||
<style>{".prefix__cls-1{fill:#fff}"}</style>
|
||||
</defs>
|
||||
<g id="prefix__Layer_2" data-name="Layer 2">
|
||||
<g id="prefix__Layer_1-2" data-name="Layer 1">
|
||||
<path
|
||||
className="prefix__cls-1"
|
||||
d="M79.695 95.063c0 23.03-16.763 39.628-39.848 39.628C16.763 134.69 0 118.092 0 95.063s16.763-39.628 39.847-39.628c23.085 0 39.848 16.599 39.848 39.628zm-69.582 0c0 18.083 12.806 30.339 29.734 30.339 16.929 0 29.735-12.256 29.735-30.34 0-18.081-12.806-30.338-29.735-30.338-16.928 0-29.734 12.257-29.734 30.339zM106.895 102.758v30.779H97.22V56.589h29.24c17.368 0 27.206 8.685 27.206 23.084 0 14.4-9.838 23.085-27.206 23.085zm0-37.045v27.921h19.346c11.377 0 17.368-4.617 17.368-13.96 0-9.344-5.99-13.96-17.368-13.96zM224.784 133.537h-54.632V56.589h54.082v9.07h-44.409v24.567h42.98v9.124h-42.98v25.118h44.96zM275.07 56.59c17.368 0 26.931 7.804 26.931 21.82 0 13.355-10.387 21.93-26.876 21.93h-.604l27.096 33.197h-11.982l-26.437-33.198h-9.013v33.198h-9.674V56.589zm-20.885 9.069v25.886h20.665c11.322 0 17.093-4.506 17.093-13.135 0-8.52-5.935-12.751-17.093-12.751zM384.716 133.537h-10.388l-8.464-20.996h-37.32l-8.409 20.996h-10.058l31.274-76.948h12.036zm-52.49-30.174h29.955l-14.95-37.21zM445.114 65.768h-26.217v67.769h-9.673V65.768h-26.272v-9.179h62.162zM531.566 95.063c0 23.03-16.763 39.628-39.847 39.628s-39.848-16.599-39.848-39.628 16.764-39.628 39.848-39.628 39.847 16.599 39.847 39.628zm-69.582 0c0 18.083 12.807 30.339 29.735 30.339 16.928 0 29.735-12.256 29.735-30.34 0-18.081-12.807-30.338-29.735-30.338-16.928 0-29.735 12.257-29.735 30.339zM579.652 56.59c17.368 0 26.931 7.804 26.931 21.82 0 13.355-10.388 21.93-26.876 21.93h-.605l27.096 33.197h-11.981l-26.437-33.198h-9.014v33.198h-9.673V56.589zm-20.886 9.069v25.886h20.666c11.322 0 17.093-4.506 17.093-13.135 0-8.52-5.936-12.751-17.093-12.751zM72.292.762h11.75v34.419h-11.75zM58.159 1.087l-23.85 14.566a1.06 1.06 0 01-1.106 0L9.352 1.087a3.272 3.272 0 00-1.705-.48h-.03a3.27 3.27 0 00-3.27 3.27v31.304H16.09V20.327a1.175 1.175 0 011.787-1.002l13.366 8.177a4.188 4.188 0 004.304.04l14.104-8.273a1.174 1.174 0 011.769 1.013v14.9h11.742V3.876a3.27 3.27 0 00-3.27-3.27h-.03a3.266 3.266 0 00-1.703.48zM142.742.753h-11.916v15.794a1.175 1.175 0 01-1.727 1.037L98.22 1.137A3.268 3.268 0 0096.68.753h-.02a3.27 3.27 0 00-3.27 3.27v31.158h11.82V19.64a1.174 1.174 0 011.725-1.038l31.004 16.445a3.27 3.27 0 001.533.381 3.27 3.27 0 003.27-3.27V.753zM152.279 35.173V.753h5.463v34.42zM189.208 35.926c-14.545 0-24.863-6.9-24.863-17.963C164.345 6.962 174.725 0 189.208 0c14.482 0 24.924 6.899 24.924 17.963s-10.194 17.963-24.924 17.963zm0-31.327c-10.815 0-19.145 4.724-19.145 13.364 0 8.702 8.33 13.363 19.145 13.363s19.206-4.662 19.206-13.363c0-8.64-8.392-13.364-19.206-13.364z"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
|
||||
export default OperatorLogo;
|
||||
@@ -1 +1,27 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="121.755" height="29.822" viewBox="0 0 121.755 29.822"><defs><style>.a{fill:#fff;}</style></defs><g transform="translate(3016.56 -1037.757)"><path class="a" d="M-3000.913,1053.692l-1.772,1.194a6.088,6.088,0,0,0-5.135-2.652,6.348,6.348,0,0,0-6.522,6.654,6.348,6.348,0,0,0,6.522,6.654,6.031,6.031,0,0,0,5.124-2.64l1.735,1.266a8.126,8.126,0,0,1-6.859,3.411,8.422,8.422,0,0,1-8.74-8.691,8.422,8.422,0,0,1,8.74-8.691A7.963,7.963,0,0,1-3000.913,1053.692Z"/><path class="a" d="M-2980.919,1058.888a8.422,8.422,0,0,1-8.74,8.691,8.422,8.422,0,0,1-8.739-8.691,8.421,8.421,0,0,1,8.739-8.691A8.422,8.422,0,0,1-2980.919,1058.888Zm-15.261,0a6.347,6.347,0,0,0,6.521,6.654,6.347,6.347,0,0,0,6.521-6.654,6.347,6.347,0,0,0-6.521-6.654A6.347,6.347,0,0,0-2996.18,1058.888Z"/><path class="a" d="M-2962.831,1067.338h-1.917l-10.2-13.26-.012,13.248h-2.122v-16.888h1.917l10.21,13.26V1050.45h2.122Z"/><path class="a" d="M-2947.009,1053.777a8.835,8.835,0,0,0-5-1.555c-2.471,0-4.231,1.109-4.231,2.929,0,1.531,1.29,2.315,3.821,2.628l1.484.181c2.856.35,5.3,1.507,5.3,4.484,0,3.364-3.05,5.123-6.7,5.123a10.935,10.935,0,0,1-6.654-2.194l1.157-1.687a9.018,9.018,0,0,0,5.5,1.868c2.519,0,4.5-1.025,4.5-2.929,0-1.567-1.41-2.314-4.038-2.64l-1.567-.193c-2.784-.337-5-1.627-5-4.508,0-3.255,2.893-5.075,6.449-5.075a10.336,10.336,0,0,1,6.076,1.844Z"/><path class="a" d="M-2925.292,1058.888a8.422,8.422,0,0,1-8.74,8.691,8.422,8.422,0,0,1-8.739-8.691,8.421,8.421,0,0,1,8.739-8.691A8.422,8.422,0,0,1-2925.292,1058.888Zm-15.261,0a6.348,6.348,0,0,0,6.521,6.654,6.347,6.347,0,0,0,6.521-6.654,6.347,6.347,0,0,0-6.521-6.654A6.348,6.348,0,0,0-2940.553,1058.888Z"/><path class="a" d="M-2909.663,1067.326h-11.79V1050.45h2.122v14.863h9.668Z"/><path class="a" d="M-2894.8,1067.326h-11.982V1050.45h11.862v1.988h-9.74v5.389h9.427v2h-9.427v5.509h9.86Z"/><rect class="a" width="2.576" height="7.547" transform="translate(-3001.66 1037.924)"/><path class="a" d="M-3004.759,1037.995l-5.23,3.194a.229.229,0,0,1-.242,0l-5.23-3.194a.726.726,0,0,0-.374-.1h-.006a.717.717,0,0,0-.717.717v6.864h2.574v-3.257a.258.258,0,0,1,.392-.22l2.931,1.793a.919.919,0,0,0,.944.009l3.092-1.814a.258.258,0,0,1,.388.222v3.267h2.575v-6.864a.717.717,0,0,0-.717-.717h-.006A.723.723,0,0,0-3004.759,1037.995Z"/><path class="a" d="M-2986.212,1037.922h-2.613v3.463a.258.258,0,0,1-.379.228l-6.771-3.607a.723.723,0,0,0-.337-.084h0a.717.717,0,0,0-.717.717v6.832h2.592v-3.408a.258.258,0,0,1,.379-.227l6.8,3.606a.714.714,0,0,0,.336.083h0a.716.716,0,0,0,.717-.717v-6.886Z"/><path class="a" d="M-2984.121,1045.469v-7.547h1.2v7.547Z"/><path class="a" d="M-2976.024,1045.635c-3.189,0-5.451-1.513-5.451-3.939s2.276-3.939,5.451-3.939,5.466,1.513,5.466,3.939S-2972.794,1045.635-2976.024,1045.635Zm0-6.87c-2.371,0-4.2,1.036-4.2,2.931s1.826,2.93,4.2,2.93,4.212-1.022,4.212-2.93S-2973.652,1038.765-2976.024,1038.765Z"/></g></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="121.755" height="29.822" viewBox="0 0 121.755 29.822">
|
||||
<defs>
|
||||
<style>.a{fill:#fff;}</style>
|
||||
</defs>
|
||||
<g transform="translate(3016.56 -1037.757)">
|
||||
<path class="a"
|
||||
d="M-3000.913,1053.692l-1.772,1.194a6.088,6.088,0,0,0-5.135-2.652,6.348,6.348,0,0,0-6.522,6.654,6.348,6.348,0,0,0,6.522,6.654,6.031,6.031,0,0,0,5.124-2.64l1.735,1.266a8.126,8.126,0,0,1-6.859,3.411,8.422,8.422,0,0,1-8.74-8.691,8.422,8.422,0,0,1,8.74-8.691A7.963,7.963,0,0,1-3000.913,1053.692Z"/>
|
||||
<path class="a"
|
||||
d="M-2980.919,1058.888a8.422,8.422,0,0,1-8.74,8.691,8.422,8.422,0,0,1-8.739-8.691,8.421,8.421,0,0,1,8.739-8.691A8.422,8.422,0,0,1-2980.919,1058.888Zm-15.261,0a6.347,6.347,0,0,0,6.521,6.654,6.347,6.347,0,0,0,6.521-6.654,6.347,6.347,0,0,0-6.521-6.654A6.347,6.347,0,0,0-2996.18,1058.888Z"/>
|
||||
<path class="a"
|
||||
d="M-2962.831,1067.338h-1.917l-10.2-13.26-.012,13.248h-2.122v-16.888h1.917l10.21,13.26V1050.45h2.122Z"/>
|
||||
<path class="a"
|
||||
d="M-2947.009,1053.777a8.835,8.835,0,0,0-5-1.555c-2.471,0-4.231,1.109-4.231,2.929,0,1.531,1.29,2.315,3.821,2.628l1.484.181c2.856.35,5.3,1.507,5.3,4.484,0,3.364-3.05,5.123-6.7,5.123a10.935,10.935,0,0,1-6.654-2.194l1.157-1.687a9.018,9.018,0,0,0,5.5,1.868c2.519,0,4.5-1.025,4.5-2.929,0-1.567-1.41-2.314-4.038-2.64l-1.567-.193c-2.784-.337-5-1.627-5-4.508,0-3.255,2.893-5.075,6.449-5.075a10.336,10.336,0,0,1,6.076,1.844Z"/>
|
||||
<path class="a"
|
||||
d="M-2925.292,1058.888a8.422,8.422,0,0,1-8.74,8.691,8.422,8.422,0,0,1-8.739-8.691,8.421,8.421,0,0,1,8.739-8.691A8.422,8.422,0,0,1-2925.292,1058.888Zm-15.261,0a6.348,6.348,0,0,0,6.521,6.654,6.347,6.347,0,0,0,6.521-6.654,6.347,6.347,0,0,0-6.521-6.654A6.348,6.348,0,0,0-2940.553,1058.888Z"/>
|
||||
<path class="a" d="M-2909.663,1067.326h-11.79V1050.45h2.122v14.863h9.668Z"/>
|
||||
<path class="a" d="M-2894.8,1067.326h-11.982V1050.45h11.862v1.988h-9.74v5.389h9.427v2h-9.427v5.509h9.86Z"/>
|
||||
<rect class="a" width="2.576" height="7.547" transform="translate(-3001.66 1037.924)"/>
|
||||
<path class="a"
|
||||
d="M-3004.759,1037.995l-5.23,3.194a.229.229,0,0,1-.242,0l-5.23-3.194a.726.726,0,0,0-.374-.1h-.006a.717.717,0,0,0-.717.717v6.864h2.574v-3.257a.258.258,0,0,1,.392-.22l2.931,1.793a.919.919,0,0,0,.944.009l3.092-1.814a.258.258,0,0,1,.388.222v3.267h2.575v-6.864a.717.717,0,0,0-.717-.717h-.006A.723.723,0,0,0-3004.759,1037.995Z"/>
|
||||
<path class="a"
|
||||
d="M-2986.212,1037.922h-2.613v3.463a.258.258,0,0,1-.379.228l-6.771-3.607a.723.723,0,0,0-.337-.084h0a.717.717,0,0,0-.717.717v6.832h2.592v-3.408a.258.258,0,0,1,.379-.227l6.8,3.606a.714.714,0,0,0,.336.083h0a.716.716,0,0,0,.717-.717v-6.886Z"/>
|
||||
<path class="a" d="M-2984.121,1045.469v-7.547h1.2v7.547Z"/>
|
||||
<path class="a"
|
||||
d="M-2976.024,1045.635c-3.189,0-5.451-1.513-5.451-3.939s2.276-3.939,5.451-3.939,5.466,1.513,5.466,3.939S-2972.794,1045.635-2976.024,1045.635Zm0-6.87c-2.371,0-4.2,1.036-4.2,2.931s1.826,2.93,4.2,2.93,4.212-1.022,4.212-2.93S-2973.652,1038.765-2976.024,1038.765Z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.0 KiB |
@@ -50,9 +50,9 @@ import LogoutIcon from "../../../icons/LogoutIcon";
|
||||
import ConsoleIcon from "../../../icons/ConsoleIcon";
|
||||
import HealIcon from "../../../icons/HealIcon";
|
||||
import WatchIcon from "../../../icons/WatchIcon";
|
||||
import OperatorLogo from "../../../icons/OperatorLogo";
|
||||
import ConsoleLogo from "../../../icons/ConsoleLogo";
|
||||
import history from "../../../history";
|
||||
import logo from "../../../icons/minio_console_logo.svg";
|
||||
import operator_logo from "../../../icons/minio_operator_logo.svg";
|
||||
import api from "../../../common/api";
|
||||
|
||||
const styles = (theme: Theme) =>
|
||||
@@ -403,7 +403,7 @@ const Menu = ({
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className={classes.logo}>
|
||||
<img src={operatorMode ? operator_logo : logo} alt="logo" />
|
||||
{operatorMode ? <OperatorLogo /> : <ConsoleLogo />}
|
||||
</div>
|
||||
<List className={classes.menuList}>
|
||||
{menuGroups.map((groupMember, index) => {
|
||||
|
||||
Reference in New Issue
Block a user