feat: support static server

This commit is contained in:
2025-06-18 02:19:42 +08:00
parent 35312ea1ff
commit 6726cafff4
26 changed files with 321 additions and 230 deletions

View File

@@ -4,7 +4,7 @@ import {
SidebarMenuItem,
} from '@/components/ui/sidebar';
import { Image } from '@/components/ui/image';
import { Img } from '@/components/ui/img';
export function AppIcon() {
return (
@@ -16,7 +16,7 @@ export function AppIcon() {
>
<div className="flex size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground">
<div className="relative size-8">
<Image
<Img
src="/assets/favicon.png"
alt="App Logo"
className="object-cover"

View File

@@ -1,9 +0,0 @@
import type { ComponentProps } from 'react';
export type ImageProps = Omit<ComponentProps<'img'>, 'alt'> &
Required<Pick<ComponentProps<'img'>, 'alt'>>;
export const Image = (props: ImageProps) => {
// biome-ignore lint/nursery/noImgElement: <explanation>
return <img {...props} alt={props.alt} />;
};

View File

@@ -0,0 +1,9 @@
import type { ComponentProps } from "react";
export type ImgProps = Omit<ComponentProps<"img">, "alt"> &
Required<Pick<ComponentProps<"img">, "alt">>;
export const Img = (props: ImgProps) => {
// biome-ignore lint/nursery/noImgElement: <explanation>
return <img {...props} alt={props.alt} />;
};