diff --git a/.eslintrc b/.eslintrc index b1c4b5d3fe..9342ca8be8 100644 --- a/.eslintrc +++ b/.eslintrc @@ -27,7 +27,8 @@ "@typescript-eslint/no-explicit-any": 0, "@typescript-eslint/ban-ts-comment": 0, "import/no-named-as-default": 0, - "@typescript-eslint/switch-exhaustiveness-check": "error" + "@typescript-eslint/switch-exhaustiveness-check": "error", + "import/no-unresolved": 0 }, "ignorePatterns": "rpc", "parserOptions": { diff --git a/ui/App.tsx b/ui/App.tsx index e744b49f08..b7aa50018d 100644 --- a/ui/App.tsx +++ b/ui/App.tsx @@ -96,15 +96,6 @@ const navItems: NavItem[] = [ link: { value: V2Routes.Notifications }, icon: IconType.NotificationsIcon, }, - { - label: "Docs", - link: { - value: "docs", - href: "https://docs.gitops.weave.works/", - newTab: true, - }, - icon: IconType.DocsIcon, - }, ]; const App = () => { diff --git a/ui/components/Icon.tsx b/ui/components/Icon.tsx index 45b0e75579..bd5dde562b 100644 --- a/ui/components/Icon.tsx +++ b/ui/components/Icon.tsx @@ -13,6 +13,7 @@ import ErrorIcon from "@material-ui/icons/Error"; import LogoutIcon from "@material-ui/icons/ExitToApp"; import FileCopyIcon from "@material-ui/icons/FileCopyOutlined"; import FilterIcon from "@material-ui/icons/FilterList"; +import FindInPage from "@material-ui/icons/FindInPage"; import HourglassFullIcon from "@material-ui/icons/HourglassFull"; import InfoIcon from "@material-ui/icons/Info"; import KeyboardArrowDownIcon from "@material-ui/icons/KeyboardArrowDown"; @@ -116,6 +117,7 @@ export enum IconType { EditIcon, VerifiedUser, Policy, + FindInPage, } type Props = { @@ -298,6 +300,9 @@ function getIcon(i: IconType) { case IconType.EditIcon: return EditIcon; + case IconType.FindInPage: + return FindInPage; + default: break; } diff --git a/ui/components/InfoList.tsx b/ui/components/InfoList.tsx index d27a14a6e0..e108e1aa4c 100644 --- a/ui/components/InfoList.tsx +++ b/ui/components/InfoList.tsx @@ -9,8 +9,8 @@ const InfoList = styled( ({ items }: { className?: string; items: InfoField[] }) => { return ( - {items.map(([k, v]) => ( - + {items.map(([k, v], index) => ( + ))} ); diff --git a/ui/components/UserSettings.tsx b/ui/components/UserSettings.tsx index c6e9aa6a48..7ef4b1c0c2 100644 --- a/ui/components/UserSettings.tsx +++ b/ui/components/UserSettings.tsx @@ -11,7 +11,9 @@ import styled from "styled-components"; import { Auth } from "../contexts/AuthContext"; import { V2Routes } from "../lib/types"; import DarkModeSwitch from "./DarkModeSwitch"; +import Flex from "./Flex"; import Icon, { IconType } from "./Icon"; +import Link from "./Link"; const SettingsMenu = styled(Menu)` .MuiPaper-root { @@ -32,10 +34,9 @@ const SettingsMenu = styled(Menu)` } `; -const PersonButton = styled(IconButton)<{ open: boolean }>` - height: 40px; - width: 40px; +const PersonButton = styled(IconButton)<{ open?: boolean }>` &.MuiIconButton-root { + padding: ${(props) => props.theme.spacing.xs}; background-color: ${(props) => props.theme.colors.neutralGray}; color: ${(props) => props.theme.colors.neutral30}; :hover { @@ -64,8 +65,13 @@ function UserSettings({ className, darkModeEnabled = true }: Props) { }; return ( -
+ + + + + + -
+ ); } diff --git a/ui/components/__tests__/__snapshots__/Page.test.tsx.snap b/ui/components/__tests__/__snapshots__/Page.test.tsx.snap index b543878867..7b297872a7 100644 --- a/ui/components/__tests__/__snapshots__/Page.test.tsx.snap +++ b/ui/components/__tests__/__snapshots__/Page.test.tsx.snap @@ -54,7 +54,22 @@ exports[`Page snapshots default 1`] = ` align-items: center; } -.c12 { +.c8 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + gap: 8px; +} + +.c14 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -73,7 +88,7 @@ exports[`Page snapshots default 1`] = ` justify-content: space-between; } -.c15 { +.c17 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -102,58 +117,63 @@ exports[`Page snapshots default 1`] = ` color: #1a1a1a; } -.c10 svg { +.c12 svg { height: 24px; width: 24px; } -.c10 svg path.path-fill, -.c10 svg line.path-fill, -.c10 svg polygon.path-fill, -.c10 svg rect.path-fill, -.c10 svg circle.path-fill, -.c10 svg polyline.path-fill { +.c12 svg path.path-fill, +.c12 svg line.path-fill, +.c12 svg polygon.path-fill, +.c12 svg rect.path-fill, +.c12 svg circle.path-fill, +.c12 svg polyline.path-fill { fill: !important; -webkit-transition: fill 200ms cubic-bezier(0.4,0,0.2,1) 0ms; transition: fill 200ms cubic-bezier(0.4,0,0.2,1) 0ms; } -.c10 svg path.stroke-fill, -.c10 svg line.stroke-fill, -.c10 svg polygon.stroke-fill, -.c10 svg rect.stroke-fill, -.c10 svg circle.stroke-fill, -.c10 svg polyline.stroke-fill { +.c12 svg path.stroke-fill, +.c12 svg line.stroke-fill, +.c12 svg polygon.stroke-fill, +.c12 svg rect.stroke-fill, +.c12 svg circle.stroke-fill, +.c12 svg polyline.stroke-fill { stroke: !important; -webkit-transition: stroke 200ms cubic-bezier(0.4,0,0.2,1) 0ms; transition: stroke 200ms cubic-bezier(0.4,0,0.2,1) 0ms; } -.c10 svg rect.rect-height { +.c12 svg rect.rect-height { height: 24px; width: 24px; } -.c10.downward { +.c12.downward { -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } -.c10.upward { +.c12.upward { -webkit-transform: initial; -ms-transform: initial; transform: initial; } -.c10 .c5 { +.c12 .c5 { margin-left: 4px; } -.c10 img { +.c12 img { width: 24px; } +.c11 { + -webkit-text-decoration: none; + text-decoration: none; +} + .c7 { max-width: 400px; white-space: nowrap; @@ -161,31 +181,27 @@ exports[`Page snapshots default 1`] = ` text-overflow: ellipsis; } -.c8 .MuiSwitch-thumb { +.c9 .MuiSwitch-thumb { color: #fff; background-image: url(); } -.c8 .MuiSwitch-track { +.c9 .MuiSwitch-track { background-color: #00b3ec; } -.c9 { - height: 40px; - width: 40px; -} - -.c9.MuiIconButton-root { +.c10.MuiIconButton-root { + padding: 8px; background-color: #F6F7F9; color: #737373; } -.c9.MuiIconButton-root:hover { +.c10.MuiIconButton-root:hover { background-color: #fff; color: #009CCC; } -.c11 { +.c13 { height: 100%; width: calc(100% - 48px); padding: 0 24px; @@ -204,7 +220,7 @@ exports[`Page snapshots default 1`] = ` overflow: hidden; } -.c13 { +.c15 { background-color: #fff; border-radius: 10px; box-sizing: border-box; @@ -212,7 +228,7 @@ exports[`Page snapshots default 1`] = ` min-height: 100%; } -.c16 { +.c18 { width: calc(100% - 48px); padding: 24px; height: 100%; @@ -227,7 +243,7 @@ exports[`Page snapshots default 1`] = ` padding: 0 32px; } -.c14 .MuiAlert-root { +.c16 .MuiAlert-root { width: 100%; } @@ -262,10 +278,10 @@ exports[`Page snapshots default 1`] = `
+ + +
+ + + +
+
+ +