diff --git a/src/assets/hamburger-menu.svg b/src/assets/hamburger-menu.svg new file mode 100644 index 00000000..a03e4ea2 --- /dev/null +++ b/src/assets/hamburger-menu.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/images.ts b/src/images.ts index 653a120c..736e82de 100644 --- a/src/images.ts +++ b/src/images.ts @@ -49,6 +49,7 @@ import "./assets/eye-stroke.svg"; import "./assets/eye.svg"; import "./assets/favicon.ico"; import "./assets/form-field-error-icon.svg"; +import "./assets/hamburger-menu.svg"; import "./assets/help-icon.png"; import "./assets/left-arrow-dark.svg"; import "./assets/loader.svg"; diff --git a/src/ui/components/dialog/dialog.scss b/src/ui/components/dialog/dialog.scss index a1f9566c..041624e9 100644 --- a/src/ui/components/dialog/dialog.scss +++ b/src/ui/components/dialog/dialog.scss @@ -103,3 +103,11 @@ justify-content: space-evenly; } } + +@media (max-width: 485px) { + .dialog-container { + width: 95%; + padding-left: 14px; + padding-right: 14px; + } +} diff --git a/src/ui/components/header/header.scss b/src/ui/components/header/header.scss index c43cde0d..a7042180 100644 --- a/src/ui/components/header/header.scss +++ b/src/ui/components/header/header.scss @@ -13,7 +13,7 @@ * under the License. */ -.st-header { +.st-header-desktop { position: fixed; width: 100%; z-index: 100; @@ -26,3 +26,97 @@ background: #fff; box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.16); } + +.st-header-mobile { + display: none; + + .overlay { + background: rgba(0, 0, 0, 0.4); + position: fixed; + inset: 0; + height: 100vh; + + z-index: 9999; + + margin-top: 70px; + } + + svg { + cursor: pointer; + } + + .close-btn { + background: rgba(95, 95, 95, 0.08); + border-radius: 50%; + border: none; + + height: 40px; + width: 40px; + } + + .menu-container { + width: 95%; + + height: fit-content; + + border-radius: 12px; + background: #fff; + box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.16); + + position: fixed; + inset: 0; + margin: auto; + margin-top: 80px; + z-index: 9999; + + padding: 36px 40px; + + .divider { + background: #aaa; + height: 1px; + width: 100%; + margin: 40px auto; + } + + button { + width: 100%; + justify-content: center; + } + } + + .menu-content { + display: flex; + flex-direction: column; + height: 100%; + width: 100%; + + .sidebar-list { + margin-top: 0; + + & > li { + margin-left: 0; + margin-right: 0; + } + } + } +} + +@media (max-width: 1024px) { + .st-header-desktop { + display: none; + } + + .st-header-mobile { + position: fixed; + width: 100%; + z-index: 9999; + background: var(--color-white); + + display: flex; + justify-content: start; + align-items: center; + gap: 14px; + + padding: 14px 12px; + } +} diff --git a/src/ui/components/header/index.tsx b/src/ui/components/header/index.tsx index aa5c40ff..afc7012c 100644 --- a/src/ui/components/header/index.tsx +++ b/src/ui/components/header/index.tsx @@ -16,19 +16,70 @@ import { getImageUrl } from "../../../utils"; import SignOutBtn from "../auth/SignOutBtn"; +import { ReactComponent as CloseIcon } from "../../../assets/close.svg"; +import { ReactComponent as HamburgerMenuIcon } from "../../../assets/hamburger-menu.svg"; + +import { useState } from "react"; +import "../sidebar"; +import { SideBarContent } from "../sidebar"; import "./header.scss"; export const LOGO_LIGHT = getImageUrl("ST_icon_light_theme.svg"); export default function Header() { + const [isMenuOpen, setIsMenuOpen] = useState(false); + + function closeMenu() { + setIsMenuOpen(false); + } + + function openMenu() { + setIsMenuOpen(true); + } + return ( -
- Supertokens - -
+ <> +
+ Supertokens + +
+
+ {isMenuOpen ? ( + + ) : ( + + )} + Supertokens + {isMenuOpen ? ( + <> +
+ +
+
+
+ +
+
+
+ +
+ + ) : null} +
+ ); } diff --git a/src/ui/components/sidebar/index.tsx b/src/ui/components/sidebar/index.tsx index c97e6df3..a94fa53e 100644 --- a/src/ui/components/sidebar/index.tsx +++ b/src/ui/components/sidebar/index.tsx @@ -20,24 +20,29 @@ const sidebarItems = [ }, ]; -export default function SideBar() { +export function SideBarContent() { const location = useLocation(); + return ( + + ); +} +export default function SideBar() { return ( ); } diff --git a/src/ui/components/sidebar/sidebar.scss b/src/ui/components/sidebar/sidebar.scss index ee59921d..60d74664 100644 --- a/src/ui/components/sidebar/sidebar.scss +++ b/src/ui/components/sidebar/sidebar.scss @@ -6,50 +6,56 @@ border-right: 1px solid var(--light-borders-border-base, #e5e7eb); background-color: var(--color-window-bg); z-index: 10; +} - ul { - margin-top: 50px; - list-style-type: none; - } +.sidebar-list { + margin-top: 50px; + list-style-type: none; +} - ul > li { - margin: 14px 16px; +.sidebar-list > li { + margin: 14px 16px; - & .active { - border-radius: 6px; - border: 1px solid rgba(255, 153, 51, 0.15); - background: rgba(255, 153, 51, 0.1); + & .active { + border-radius: 6px; + border: 1px solid rgba(255, 153, 51, 0.15); + background: rgba(255, 153, 51, 0.1); - color: #f93; - font-weight: 500; + color: #f93; + font-weight: 500; - & > svg { - stroke: var(--color-primary); - } + & > svg { + stroke: var(--color-primary); } } +} - ul > li > a { - display: block; - padding: 6px 8px; - border-radius: 6px; +.sidebar-list > li > a { + display: block; + padding: 6px 8px; + border-radius: 6px; - color: var(--light-foregrounds-fg-subtle, #4b5563); - font-size: 13px; - font-style: normal; - font-weight: 400; - line-height: 20px; + color: var(--light-foregrounds-fg-subtle, #4b5563); + font-size: 13px; + font-style: normal; + font-weight: 400; + line-height: 20px; - border: 1px solid transparent; + border: 1px solid transparent; - text-decoration: none; + text-decoration: none; - display: flex; - justify-content: flex-start; - gap: 12px; + display: flex; + justify-content: flex-start; + gap: 12px; - &:hover:not(.active) { - background: #eee; - } + &:hover:not(.active) { + background: #eee; + } +} + +@media (max-width: 1024px) { + .sidebar { + display: none; } } diff --git a/src/ui/components/table/table.scss b/src/ui/components/table/table.scss index e2af8046..26f5280e 100644 --- a/src/ui/components/table/table.scss +++ b/src/ui/components/table/table.scss @@ -93,6 +93,10 @@ font-weight: 500; text-transform: uppercase; padding: 18px 14px 18px 36px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 126px; } &:last-child { diff --git a/src/ui/components/userDetail/loginMethods/loginMethods.scss b/src/ui/components/userDetail/loginMethods/loginMethods.scss index b652dfc6..30f83b27 100644 --- a/src/ui/components/userDetail/loginMethods/loginMethods.scss +++ b/src/ui/components/userDetail/loginMethods/loginMethods.scss @@ -103,6 +103,21 @@ } } +@media (max-width: 480px) { + .method { + .method-header { + padding: 16px 8px; + } + .method-body { + padding: 18px 8px; + } + + .left { + flex-direction: column; + } + } +} + .send-mail-icon { cursor: pointer; & > :first-child { diff --git a/src/ui/components/userDetail/userDetail.scss b/src/ui/components/userDetail/userDetail.scss index 1df3004e..b7878ab3 100644 --- a/src/ui/components/userDetail/userDetail.scss +++ b/src/ui/components/userDetail/userDetail.scss @@ -293,3 +293,9 @@ $container-width: 829; .pill { margin-top: 4px; } + +@media (max-width: 425px) { + .user-detail { + padding: 72px 12px 48px; + } +} diff --git a/src/ui/components/userDetail/userRoles/userRolesList.scss b/src/ui/components/userDetail/userRoles/userRolesList.scss index fc8693b0..f3823610 100644 --- a/src/ui/components/userDetail/userRoles/userRolesList.scss +++ b/src/ui/components/userDetail/userRoles/userRolesList.scss @@ -1,6 +1,6 @@ .user-roles-list-wrapper { & > ul { - padding: 4px 0 24px 0; + padding: 0px 24px 24px 24px; border-bottom: 1px solid var(--color-border); li { diff --git a/src/ui/components/userroles/components/SelectPermissions.tsx b/src/ui/components/userroles/components/SelectPermissions.tsx index ede46cef..3854bba6 100644 --- a/src/ui/components/userroles/components/SelectPermissions.tsx +++ b/src/ui/components/userroles/components/SelectPermissions.tsx @@ -90,8 +90,8 @@ export default function SelectPermissions({ {permissions.length < 1 ? (
-

This Role don't have any permissions associated.

-

Please add permissions to this role.

+

No Permissions associated with this Role!

+

Added Permissions for role will appear here.

) : null} diff --git a/src/ui/components/userroles/components/dialogs/AssignRoles.tsx b/src/ui/components/userroles/components/dialogs/AssignRoles.tsx index 95fb21d7..c076813a 100644 --- a/src/ui/components/userroles/components/dialogs/AssignRoles.tsx +++ b/src/ui/components/userroles/components/dialogs/AssignRoles.tsx @@ -196,6 +196,7 @@ export default function AssignRolesDialog({ Go Back