update appheader

This commit is contained in:
Ren Amamiya 2023-05-06 07:25:06 +07:00
parent b377846073
commit 65aebcc3a3
7 changed files with 13 additions and 13 deletions

View File

@ -28,7 +28,7 @@ fn main() {
let main_window = app.get_window("main").unwrap(); let main_window = app.get_window("main").unwrap();
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
main_window.position_traffic_lights(8.0, 20.0); // set inset for traffic lights (macos) main_window.position_traffic_lights(8.0, 16.0); // set inset for traffic lights (macos)
Ok(()) Ok(())
}) })
@ -37,7 +37,7 @@ fn main() {
let apply_offset = || { let apply_offset = || {
let win = e.window(); let win = e.window();
// keep inset for traffic lights when window resize (macos) // keep inset for traffic lights when window resize (macos)
win.position_traffic_lights(8.0, 20.0); win.position_traffic_lights(8.0, 16.0);
}; };
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
match e.event() { match e.event() {

View File

@ -8,7 +8,7 @@ export function LayoutChannel({ children }: { children: React.ReactNode }) {
<div className="flex h-screen w-full flex-col"> <div className="flex h-screen w-full flex-col">
<div <div
data-tauri-drag-region data-tauri-drag-region
className="relative h-11 shrink-0 border-b border-zinc-100 bg-white dark:border-zinc-900 dark:bg-black" className="relative h-9 shrink-0 border-b border-zinc-100 bg-white dark:border-zinc-900 dark:bg-black"
> >
<AppHeader /> <AppHeader />
</div> </div>

View File

@ -8,7 +8,7 @@ export function LayoutChat({ children }: { children: React.ReactNode }) {
<div className="flex h-screen w-full flex-col"> <div className="flex h-screen w-full flex-col">
<div <div
data-tauri-drag-region data-tauri-drag-region
className="relative h-11 shrink-0 border-b border-zinc-100 bg-white dark:border-zinc-900 dark:bg-black" className="relative h-9 shrink-0 border-b border-zinc-100 bg-white dark:border-zinc-900 dark:bg-black"
> >
<AppHeader /> <AppHeader />
</div> </div>

View File

@ -8,7 +8,7 @@ export function LayoutNewsfeed({ children }: { children: React.ReactNode }) {
<div className="flex h-screen w-full flex-col"> <div className="flex h-screen w-full flex-col">
<div <div
data-tauri-drag-region data-tauri-drag-region
className="relative h-11 shrink-0 border-b border-zinc-100 bg-white dark:border-zinc-900 dark:bg-black" className="relative h-9 shrink-0 border-b border-zinc-100 bg-white dark:border-zinc-900 dark:bg-black"
> >
<AppHeader /> <AppHeader />
</div> </div>

View File

@ -8,7 +8,7 @@ export function LayoutNewsfeed({ children }: { children: React.ReactNode }) {
<div className="flex h-screen w-full flex-col"> <div className="flex h-screen w-full flex-col">
<div <div
data-tauri-drag-region data-tauri-drag-region
className="relative h-11 shrink-0 border-b border-zinc-100 bg-white dark:border-zinc-900 dark:bg-black" className="relative h-9 shrink-0 border-b border-zinc-100 bg-white dark:border-zinc-900 dark:bg-black"
> >
<AppHeader /> <AppHeader />
</div> </div>

View File

@ -8,7 +8,7 @@ export function LayoutNewsfeed({ children }: { children: React.ReactNode }) {
<div className="flex h-screen w-full flex-col"> <div className="flex h-screen w-full flex-col">
<div <div
data-tauri-drag-region data-tauri-drag-region
className="relative h-11 shrink-0 border-b border-zinc-100 bg-white dark:border-zinc-900 dark:bg-black" className="relative h-9 shrink-0 border-b border-zinc-100 bg-white dark:border-zinc-900 dark:bg-black"
> >
<AppHeader /> <AppHeader />
</div> </div>

View File

@ -29,21 +29,21 @@ export default function AppHeader() {
<div className={`flex h-full items-center gap-2 ${platform === 'darwin' ? 'pl-[68px]' : ''}`}> <div className={`flex h-full items-center gap-2 ${platform === 'darwin' ? 'pl-[68px]' : ''}`}>
<button <button
onClick={() => goBack()} onClick={() => goBack()}
className="group inline-flex h-6 w-6 items-center justify-center rounded-md hover:bg-zinc-900" className="group inline-flex h-5 w-5 items-center justify-center rounded-md hover:bg-zinc-900"
> >
<ArrowLeftIcon width={16} height={16} className="text-zinc-500 group-hover:text-zinc-300" /> <ArrowLeftIcon width={14} height={14} className="text-zinc-500 group-hover:text-zinc-300" />
</button> </button>
<button <button
onClick={() => goForward()} onClick={() => goForward()}
className="group inline-flex h-6 w-6 items-center justify-center rounded-md hover:bg-zinc-900" className="group inline-flex h-5 w-5 items-center justify-center rounded-md hover:bg-zinc-900"
> >
<ArrowRightIcon width={16} height={16} className="text-zinc-500 group-hover:text-zinc-300" /> <ArrowRightIcon width={14} height={14} className="text-zinc-500 group-hover:text-zinc-300" />
</button> </button>
<button <button
onClick={() => reload()} onClick={() => reload()}
className="group inline-flex h-6 w-6 items-center justify-center rounded-md hover:bg-zinc-900" className="group inline-flex h-5 w-5 items-center justify-center rounded-md hover:bg-zinc-900"
> >
<RefreshIcon width={16} height={16} className="text-zinc-500 group-hover:text-zinc-300" /> <RefreshIcon width={14} height={14} className="text-zinc-500 group-hover:text-zinc-300" />
</button> </button>
</div> </div>
<div data-tauri-drag-region className="flex h-full w-full items-center justify-between"> <div data-tauri-drag-region className="flex h-full w-full items-center justify-between">