feat: add custom app logo in layout

This commit is contained in:
thibaud-leclere 2026-04-14 15:17:16 +02:00
parent 10e72ca288
commit 724b35d452
4 changed files with 18 additions and 3 deletions

BIN
src/assets/app-logo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 KiB

View file

@ -1,5 +1,6 @@
import { getCurrentWindow } from "@tauri-apps/api/window"; import { getCurrentWindow } from "@tauri-apps/api/window";
import { Outlet } from "react-router-dom"; import { Outlet } from "react-router-dom";
import appLogo from "../../assets/app-logo.jpg";
import NotificationCenter from "./NotificationCenter"; import NotificationCenter from "./NotificationCenter";
import Sidebar from "./Sidebar"; import Sidebar from "./Sidebar";
import WindowControls from "./WindowControls"; import WindowControls from "./WindowControls";
@ -26,9 +27,14 @@ export default function AppLayout() {
void startDragging(); void startDragging();
} }
}} }}
className="min-w-0 flex-1 select-none text-sm font-semibold text-gray-700" className="min-w-0 flex flex-1 items-center gap-2 select-none text-sm font-semibold text-gray-700"
> >
Orchai <img
src={appLogo}
alt="Orchai logo"
className="h-6 w-6 rounded-full object-cover ring-1 ring-gray-300"
/>
<span>Orchai</span>
</div> </div>
<NotificationCenter /> <NotificationCenter />
<WindowControls /> <WindowControls />

View file

@ -1,5 +1,6 @@
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { Link, useParams } from "react-router-dom"; import { Link, useParams } from "react-router-dom";
import appLogo from "../../assets/app-logo.jpg";
import { listProjects } from "../../lib/api"; import { listProjects } from "../../lib/api";
import type { Project } from "../../lib/types"; import type { Project } from "../../lib/types";
@ -23,7 +24,14 @@ export default function Sidebar() {
return ( return (
<aside className="w-64 bg-gray-900 text-gray-100 flex flex-col h-screen"> <aside className="w-64 bg-gray-900 text-gray-100 flex flex-col h-screen">
<div className="p-4 border-b border-gray-700"> <div className="p-4 border-b border-gray-700">
<h1 className="text-lg font-bold">Orchai</h1> <div className="flex items-center gap-3">
<img
src={appLogo}
alt="Orchai logo"
className="h-9 w-9 rounded-full object-cover ring-1 ring-gray-600"
/>
<h1 className="text-lg font-bold">Orchai</h1>
</div>
</div> </div>
<nav className="flex-1 overflow-y-auto p-2"> <nav className="flex-1 overflow-y-auto p-2">

1
src/vite-env.d.ts vendored Normal file
View file

@ -0,0 +1 @@
/// <reference types="vite/client" />