feat: refresh Raven branding

This commit is contained in:
Esdras Renan 2025-10-17 15:29:08 -03:00
parent 6e2bbb3494
commit c00b4300c1
31 changed files with 128 additions and 138 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 567 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1,020 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 73 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 567 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 KiB

BIN
public/logo-raven.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 73 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 567 KiB

Before After
Before After

View file

@ -5,7 +5,6 @@ import Image from "next/image"
import Link from "next/link" import Link from "next/link"
import { useRouter, useSearchParams } from "next/navigation" import { useRouter, useSearchParams } from "next/navigation"
import dynamic from "next/dynamic" import dynamic from "next/dynamic"
import { GalleryVerticalEnd } from "lucide-react"
import { LoginForm } from "@/components/login-form" import { LoginForm } from "@/components/login-form"
import { useSession } from "@/lib/auth-client" import { useSession } from "@/lib/auth-client"
@ -57,9 +56,14 @@ export function LoginPageClient() {
<div className="flex flex-col gap-6 p-6 md:p-10"> <div className="flex flex-col gap-6 p-6 md:p-10">
<div className="flex flex-col items-center gap-1.5 text-center"> <div className="flex flex-col items-center gap-1.5 text-center">
<Link href="/" className="flex items-center gap-2 text-xl font-semibold text-neutral-900"> <Link href="/" className="flex items-center gap-2 text-xl font-semibold text-neutral-900">
<div className="bg-primary text-primary-foreground flex size-6 items-center justify-center rounded-md"> <Image
<GalleryVerticalEnd className="size-4" /> src="/logo-raven.png"
</div> alt="Logotipo Raven"
width={40}
height={40}
className="h-10 w-auto"
priority
/>
Raven Raven
</Link> </Link>
</div> </div>
@ -70,11 +74,11 @@ export function LoginPageClient() {
</div> </div>
<div className="flex justify-center"> <div className="flex justify-center">
<Image <Image
src="/raven.png" src="/logo-raven.png"
alt="Logotipo Rever Tecnologia" alt="Logotipo Raven"
width={110} width={160}
height={110} height={160}
className="h-[3.45rem] w-auto" className="h-16 w-auto"
priority priority
/> />
</div> </div>

View file

@ -25,7 +25,7 @@ import { usePathname } from "next/navigation"
import Link from "next/link" import Link from "next/link"
import { SearchForm } from "@/components/search-form" import { SearchForm } from "@/components/search-form"
import { VersionSwitcher } from "@/components/version-switcher" import { SidebarBrand } from "@/components/sidebar-brand"
import { import {
Sidebar, Sidebar,
SidebarContent, SidebarContent,
@ -63,9 +63,7 @@ type NavigationGroup = {
items: NavigationItem[] items: NavigationItem[]
} }
const navigation: { versions: string[]; navMain: NavigationGroup[] } = { const navigation: NavigationGroup[] = [
versions: ["Rever Tecnologia"],
navMain: [
{ {
title: "Operação", title: "Operação",
items: [ items: [
@ -112,8 +110,7 @@ const navigation: { versions: string[]; navMain: NavigationGroup[] } = {
], ],
}, },
// Removido grupo "Conta" (Configurações) para evitar redundância com o menu do usuário no rodapé // Removido grupo "Conta" (Configurações) para evitar redundância com o menu do usuário no rodapé
], ]
}
export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) { export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
const pathname = usePathname() const pathname = usePathname()
@ -130,7 +127,7 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
) )
const initialExpanded = React.useMemo(() => { const initialExpanded = React.useMemo(() => {
const open = new Set<string>() const open = new Set<string>()
navigation.navMain.forEach((group) => { navigation.forEach((group) => {
group.items.forEach((item) => { group.items.forEach((item) => {
if (!item.children || item.children.length === 0) return if (!item.children || item.children.length === 0) return
const shouldOpen = item.children.some((child) => { const shouldOpen = item.children.some((child) => {
@ -213,15 +210,16 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
return ( return (
<Sidebar {...props}> <Sidebar {...props}>
<SidebarHeader className="gap-3"> <SidebarHeader className="gap-3">
<VersionSwitcher <SidebarBrand
label="Raven" logoSrc="/logo-raven.png"
versions={[...navigation.versions]} logoAlt="Logotipo Raven"
defaultVersion={navigation.versions[0]} title="Raven"
subtitle="Por Rever Tecnologia"
/> />
<SearchForm placeholder="Buscar tickets" /> <SearchForm placeholder="Buscar tickets" />
</SidebarHeader> </SidebarHeader>
<SidebarContent> <SidebarContent>
{navigation.navMain.map((group) => { {navigation.map((group) => {
if (!canAccess(group.requiredRole)) return null if (!canAccess(group.requiredRole)) return null
const visibleItems = group.items.filter((item) => canAccess(item.requiredRole)) const visibleItems = group.items.filter((item) => canAccess(item.requiredRole))
if (visibleItems.length === 0) return null if (visibleItems.length === 0) return null

View file

@ -1,9 +1,10 @@
"use client" "use client"
import { type ReactNode, useMemo, useState } from "react" import { type ReactNode, useMemo, useState } from "react"
import Image from "next/image"
import Link from "next/link" import Link from "next/link"
import { usePathname, useRouter } from "next/navigation" import { usePathname, useRouter } from "next/navigation"
import { GalleryVerticalEnd, LogOut, PlusCircle } from "lucide-react" import { LogOut, PlusCircle } from "lucide-react"
import { toast } from "sonner" import { toast } from "sonner"
import { Button } from "@/components/ui/button" import { Button } from "@/components/ui/button"
@ -76,9 +77,16 @@ export function PortalShell({ children }: PortalShellProps) {
<header className="border-b border-slate-200 bg-white/90 backdrop-blur"> <header className="border-b border-slate-200 bg-white/90 backdrop-blur">
<div className="mx-auto flex w-full max-w-6xl flex-wrap items-center justify-between gap-4 px-6 py-4"> <div className="mx-auto flex w-full max-w-6xl flex-wrap items-center justify-between gap-4 px-6 py-4">
<div className="flex items-center gap-3"> <div className="flex items-center gap-3">
<span className="flex size-9 items-center justify-center rounded-xl bg-neutral-900 text-white shadow-sm"> <div className="flex h-12 w-12 items-center justify-center">
<GalleryVerticalEnd className="size-4" /> <Image
</span> src="/logo-raven.png"
alt="Logotipo Raven"
width={48}
height={48}
className="h-12 w-12 object-contain"
priority
/>
</div>
<div className="flex flex-col"> <div className="flex flex-col">
<span className="text-sm text-neutral-500"> <span className="text-sm text-neutral-500">
Portal do Cliente Portal do Cliente

View file

@ -0,0 +1,47 @@
"use client"
import Image from "next/image"
import {
SidebarMenu,
SidebarMenuButton,
SidebarMenuItem,
} from "@/components/ui/sidebar"
interface SidebarBrandProps {
logoSrc: string
logoAlt: string
title: string
subtitle: string
}
export function SidebarBrand({ logoSrc, logoAlt, title, subtitle }: SidebarBrandProps) {
return (
<SidebarMenu>
<SidebarMenuItem>
<SidebarMenuButton
asChild
size="lg"
className="cursor-default select-none hover:bg-transparent hover:text-inherit active:bg-transparent active:text-inherit focus-visible:ring-0"
>
<div className="flex items-center gap-3">
<div className="flex h-10 w-10 items-center justify-center rounded-lg">
<Image
src={logoSrc}
alt={logoAlt}
width={40}
height={40}
className="h-10 w-10 object-contain"
priority
/>
</div>
<div className="flex flex-col gap-0.5 leading-none">
<span className="font-medium">{title}</span>
<span className="text-xs text-muted-foreground">{subtitle}</span>
</div>
</div>
</SidebarMenuButton>
</SidebarMenuItem>
</SidebarMenu>
)
}

View file

@ -1,67 +0,0 @@
"use client"
import * as React from "react"
import { Check, ChevronsUpDown, GalleryVerticalEnd } from "lucide-react"
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu"
import {
SidebarMenu,
SidebarMenuButton,
SidebarMenuItem,
} from "@/components/ui/sidebar"
type VersionSwitcherProps = {
versions: string[]
defaultVersion: string
label?: string
}
export function VersionSwitcher({
versions,
defaultVersion,
label = "Documentation",
}: VersionSwitcherProps) {
const [selectedVersion, setSelectedVersion] = React.useState(defaultVersion)
return (
<SidebarMenu>
<SidebarMenuItem>
<DropdownMenu>
<DropdownMenuTrigger asChild>
<SidebarMenuButton
size="lg"
className="data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground"
>
<div className="bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg">
<GalleryVerticalEnd className="size-4" />
</div>
<div className="flex flex-col gap-0.5 leading-none">
<span className="font-medium">{label}</span>
<span className="text-xs text-muted-foreground">{selectedVersion}</span>
</div>
<ChevronsUpDown className="ml-auto" />
</SidebarMenuButton>
</DropdownMenuTrigger>
<DropdownMenuContent
className="w-(--radix-dropdown-menu-trigger-width)"
align="start"
>
{versions.map((version) => (
<DropdownMenuItem
key={version}
onSelect={() => setSelectedVersion(version)}
>
{version} {version === selectedVersion && <Check className="ml-auto" />}
</DropdownMenuItem>
))}
</DropdownMenuContent>
</DropdownMenu>
</SidebarMenuItem>
</SidebarMenu>
)
}