mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-04 08:26:10 +00:00
improvement: update styling/consistency for navbar
This commit is contained in:
@@ -151,7 +151,7 @@ export default function NavHeader({
|
|||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<span
|
<span
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
"text-sm font-semibold transition-all",
|
"text-sm transition-all",
|
||||||
isHoveringCopyButton ? "text-bunker-200" : "text-bunker-300"
|
isHoveringCopyButton ? "text-bunker-200" : "text-bunker-300"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
@@ -198,7 +198,7 @@ export default function NavHeader({
|
|||||||
}}
|
}}
|
||||||
search={(query) => ({ ...query, secretPath: newSecretPath })}
|
search={(query) => ({ ...query, secretPath: newSecretPath })}
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
"text-sm font-semibold transition-all hover:text-primary",
|
"text-sm transition-all hover:text-primary",
|
||||||
isHoveringCopyButton ? "text-primary" : "text-primary/80"
|
isHoveringCopyButton ? "text-primary" : "text-primary/80"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export const SecretDashboardPathBreadcrumb = ({
|
|||||||
<div className="group flex items-center space-x-2">
|
<div className="group flex items-center space-x-2">
|
||||||
<span
|
<span
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
"text-sm font-semibold transition-all",
|
"text-sm transition-all",
|
||||||
isCopying ? "text-bunker-200" : "text-bunker-300"
|
isCopying ? "text-bunker-200" : "text-bunker-300"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
@@ -77,7 +77,7 @@ export const SecretDashboardPathBreadcrumb = ({
|
|||||||
}}
|
}}
|
||||||
search={(query) => ({ ...query, secretPath: newSecretPath })}
|
search={(query) => ({ ...query, secretPath: newSecretPath })}
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
"text-sm font-semibold transition-all hover:text-primary",
|
"text-sm transition-all hover:text-primary",
|
||||||
isCopying && "text-primary"
|
isCopying && "text-primary"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* eslint-disable react/prop-types */
|
/* eslint-disable react/prop-types */
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { faEllipsis, faSort } from "@fortawesome/free-solid-svg-icons";
|
import { faCaretDown, faEllipsis } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { Link, ReactNode } from "@tanstack/react-router";
|
import { Link, ReactNode } from "@tanstack/react-router";
|
||||||
import { LinkComponentProps } from "node_modules/@tanstack/react-router/dist/esm/link";
|
import { LinkComponentProps } from "node_modules/@tanstack/react-router/dist/esm/link";
|
||||||
@@ -27,7 +27,7 @@ const BreadcrumbList = React.forwardRef<HTMLOListElement, React.ComponentPropsWi
|
|||||||
<ol
|
<ol
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
"flex flex-wrap items-center gap-1.5 break-words text-sm text-bunker-100 sm:gap-2.5",
|
"flex flex-wrap items-center break-words text-sm text-bunker-100",
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
@@ -56,7 +56,7 @@ const BreadcrumbLink = React.forwardRef<
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={twMerge("transition-colors hover:text-primary-400", className)}
|
className={twMerge("transition-colors hover:text-primary", className)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
@@ -79,7 +79,7 @@ BreadcrumbPage.displayName = "BreadcrumbPage";
|
|||||||
|
|
||||||
const BreadcrumbSeparator = ({ children, className, ...props }: React.ComponentProps<"li">) => (
|
const BreadcrumbSeparator = ({ children, className, ...props }: React.ComponentProps<"li">) => (
|
||||||
<li role="presentation" aria-hidden="true" className={twMerge("", className)} {...props}>
|
<li role="presentation" aria-hidden="true" className={twMerge("", className)} {...props}>
|
||||||
{children ?? <p className="px-2 text-lg text-mineshaft-400/70">/</p>}
|
{children ?? <p className="px-3 text-lg text-mineshaft-400/70">/</p>}
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
||||||
@@ -134,12 +134,17 @@ const BreadcrumbContainer = ({ breadcrumbs }: { breadcrumbs: TBreadcrumbFormat[]
|
|||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger>
|
<DropdownMenuTrigger>
|
||||||
<BreadcrumbItem>
|
<BreadcrumbItem>
|
||||||
<BreadcrumbSegment className="rounded-md px-2 py-1 py-2 hover:bg-mineshaft-600">
|
<BreadcrumbSegment className="rounded-md py-1 py-2">
|
||||||
{el.label} <FontAwesomeIcon icon={faSort} size="sm" />
|
{el.label}{" "}
|
||||||
|
<FontAwesomeIcon
|
||||||
|
icon={faCaretDown}
|
||||||
|
size="sm"
|
||||||
|
className="ml-2 text-bunker-300"
|
||||||
|
/>
|
||||||
</BreadcrumbSegment>
|
</BreadcrumbSegment>
|
||||||
</BreadcrumbItem>
|
</BreadcrumbItem>
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
<DropdownMenuContent side="right" align="start">
|
<DropdownMenuContent side="bottom" sideOffset={8} align="start">
|
||||||
{el?.dropdownTitle && <DropdownMenuLabel>{el.dropdownTitle}</DropdownMenuLabel>}
|
{el?.dropdownTitle && <DropdownMenuLabel>{el.dropdownTitle}</DropdownMenuLabel>}
|
||||||
{el.links.map((i, dropIndex) => (
|
{el.links.map((i, dropIndex) => (
|
||||||
<Link
|
<Link
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ import { faCircleQuestion, faUserCircle } from "@fortawesome/free-regular-svg-ic
|
|||||||
import {
|
import {
|
||||||
faArrowUpRightFromSquare,
|
faArrowUpRightFromSquare,
|
||||||
faBook,
|
faBook,
|
||||||
|
faBuilding,
|
||||||
|
faCaretDown,
|
||||||
faCheck,
|
faCheck,
|
||||||
faCubes,
|
|
||||||
faEnvelope,
|
faEnvelope,
|
||||||
faInfo,
|
faInfo,
|
||||||
faInfoCircle,
|
faInfoCircle,
|
||||||
faSignOut,
|
faSignOut,
|
||||||
faSort,
|
|
||||||
faUser,
|
faUser,
|
||||||
faUsers
|
faUsers
|
||||||
} from "@fortawesome/free-solid-svg-icons";
|
} from "@fortawesome/free-solid-svg-icons";
|
||||||
@@ -186,16 +186,16 @@ export const Navbar = () => {
|
|||||||
<img alt="infisical logo" src="/images/logotransparent.png" className="h-4" />
|
<img alt="infisical logo" src="/images/logotransparent.png" className="h-4" />
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
<p className="pl-1 pr-3 text-lg text-mineshaft-400/70">/</p>
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<p className="pl-2 pr-3 text-lg text-mineshaft-400/70">/</p>
|
|
||||||
<DropdownMenu modal={false}>
|
<DropdownMenu modal={false}>
|
||||||
<Link to="/organization/projects">
|
<Link to="/organization/projects">
|
||||||
<div className="flex cursor-pointer items-center gap-2 text-sm text-white transition-all duration-100 hover:text-primary-400">
|
<div className="group flex cursor-pointer items-center gap-2 text-sm text-white transition-all duration-100 hover:text-primary">
|
||||||
<div>
|
<div>
|
||||||
<FontAwesomeIcon icon={faCubes} className="pr-1 text-xs" />
|
<FontAwesomeIcon icon={faBuilding} className="text-xs text-bunker-300" />
|
||||||
</div>
|
</div>
|
||||||
<div className="max-w-32 overflow-hidden text-ellipsis">{currentOrg?.name}</div>
|
<div className="max-w-32 overflow-hidden text-ellipsis">{currentOrg?.name}</div>
|
||||||
<div className="mr-2 rounded border border-mineshaft-500 px-1 text-xs text-bunker-300">
|
<div className="mr-1 rounded border border-mineshaft-500 px-1 text-xs text-bunker-300 !no-underline">
|
||||||
{getPlan(subscription)}
|
{getPlan(subscription)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -206,9 +206,9 @@ export const Navbar = () => {
|
|||||||
variant="plain"
|
variant="plain"
|
||||||
colorSchema="secondary"
|
colorSchema="secondary"
|
||||||
ariaLabel="switch-org"
|
ariaLabel="switch-org"
|
||||||
className="rounded-md px-2 py-2 hover:bg-mineshaft-600"
|
className="px-2 py-1"
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon icon={faSort} className="text-xs text-bunker-300" />
|
<FontAwesomeIcon icon={faCaretDown} className="text-xs text-bunker-300" />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</div>
|
</div>
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
@@ -265,13 +265,11 @@ export const Navbar = () => {
|
|||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
<p className="px-2 text-lg text-mineshaft-400/70">/</p>
|
|
||||||
</div>
|
|
||||||
<div className="pl-2">
|
|
||||||
{breadcrumbs ? (
|
|
||||||
<BreadcrumbContainer breadcrumbs={breadcrumbs as TBreadcrumbFormat[]} />
|
|
||||||
) : null}
|
|
||||||
</div>
|
</div>
|
||||||
|
<p className="pl-1 pr-3 text-lg text-mineshaft-400/70">/</p>
|
||||||
|
{breadcrumbs ? (
|
||||||
|
<BreadcrumbContainer breadcrumbs={breadcrumbs as TBreadcrumbFormat[]} />
|
||||||
|
) : null}
|
||||||
<div className="flex-grow" />
|
<div className="flex-grow" />
|
||||||
<DropdownMenu modal={false}>
|
<DropdownMenu modal={false}>
|
||||||
<DropdownMenuTrigger>
|
<DropdownMenuTrigger>
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import { useMemo, useState } from "react";
|
import { useMemo, useState } from "react";
|
||||||
import { faStar } from "@fortawesome/free-regular-svg-icons";
|
import { faStar } from "@fortawesome/free-regular-svg-icons";
|
||||||
import {
|
import {
|
||||||
|
faCaretDown,
|
||||||
faCheck,
|
faCheck,
|
||||||
faCube,
|
|
||||||
faMagnifyingGlass,
|
faMagnifyingGlass,
|
||||||
faPlus,
|
faPlus,
|
||||||
faSort,
|
faStar as faSolidStar,
|
||||||
faStar as faSolidStar
|
faTable
|
||||||
} from "@fortawesome/free-solid-svg-icons";
|
} from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { Link, linkOptions } from "@tanstack/react-router";
|
import { Link, linkOptions } from "@tanstack/react-router";
|
||||||
@@ -99,7 +99,7 @@ export const ProjectSelect = () => {
|
|||||||
}, [workspaces, projectFavorites, currentWorkspace]);
|
}, [workspaces, projectFavorites, currentWorkspace]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex w-full items-center gap-2">
|
<div className="-mr-2 flex w-full items-center gap-1">
|
||||||
<DropdownMenu modal={false}>
|
<DropdownMenu modal={false}>
|
||||||
<Link
|
<Link
|
||||||
to={getProjectHomePage(
|
to={getProjectHomePage(
|
||||||
@@ -109,9 +109,9 @@ export const ProjectSelect = () => {
|
|||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="flex cursor-pointer items-center gap-2 text-sm text-white duration-100 hover:text-primary-400">
|
<div className="flex cursor-pointer items-center gap-2 text-sm text-white duration-100 hover:text-primary">
|
||||||
<div>
|
<div>
|
||||||
<FontAwesomeIcon icon={faCube} className="text-xs" />
|
<FontAwesomeIcon icon={faTable} className="text-xs text-bunker-300" />
|
||||||
</div>
|
</div>
|
||||||
<Tooltip content={currentWorkspace.name} className="max-w-96">
|
<Tooltip content={currentWorkspace.name} className="max-w-96">
|
||||||
<div className="max-w-32 overflow-hidden text-ellipsis whitespace-nowrap">
|
<div className="max-w-32 overflow-hidden text-ellipsis whitespace-nowrap">
|
||||||
@@ -125,10 +125,10 @@ export const ProjectSelect = () => {
|
|||||||
<IconButton
|
<IconButton
|
||||||
variant="plain"
|
variant="plain"
|
||||||
colorSchema="secondary"
|
colorSchema="secondary"
|
||||||
ariaLabel="switch-org"
|
ariaLabel="switch-project"
|
||||||
className="px-2 py-1"
|
className="px-2 py-1"
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon icon={faSort} className="text-xs text-bunker-300" />
|
<FontAwesomeIcon icon={faCaretDown} className="text-xs text-bunker-300" />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</div>
|
</div>
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
|
|||||||
Reference in New Issue
Block a user