Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/@modal/(...)preview/[id]/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function Modal({ children }: { children: React.ReactNode }) {
<DialogContent
showCloseButton={false}
onInteractOutside={(event: any) => event.preventDefault()}
className="h-full w-full rounded-none max-w-full sm:rounded-md sm:shadow-xl"
className="inset-0 top-0 left-0 h-dvh w-full max-h-none max-w-none translate-x-0 translate-y-0 gap-0 overflow-hidden rounded-none p-0 ring-0 shadow-none sm:max-w-none sm:rounded-none"
>
{children}
</DialogContent>
Expand Down
50 changes: 32 additions & 18 deletions app/admin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,25 +248,34 @@ export default async function Admin() {
<SectionHeading
title={t('Dashboard.recentUploads')}
action={
<Button asChild variant="outline" className="rounded-full">
<Link href="/admin/list">
{t('Dashboard.openImageManagement')}
<ArrowRight />
</Link>
</Button>
<Button
render={
<Link href="/admin/list">
{t('Dashboard.openImageManagement')}
<ArrowRight />
</Link>
}
nativeButton={false}
variant="outline"
className="rounded-full"
/>
}
/>

{dashboard.recentUploads.length === 0 ? (
<div className="mt-6 rounded-[1.35rem] border border-dashed border-border/80 bg-background/60 px-5 py-10 text-center">
<p className="text-sm text-muted-foreground">{t('Dashboard.recentUploadsEmpty')}</p>
<div className="mt-5">
<Button asChild className="rounded-full">
<Link href="/admin/upload">
{t('Link.upload')}
<ArrowRight />
</Link>
</Button>
<Button
render={
<Link href="/admin/upload">
{t('Link.upload')}
<ArrowRight />
</Link>
}
nativeButton={false}
className="rounded-full"
/>
</div>
</div>
) : (
Expand Down Expand Up @@ -386,12 +395,17 @@ export default async function Admin() {
<SectionHeading
title={t('Dashboard.albumBreakdown')}
action={
<Button asChild variant="ghost" className="rounded-full">
<Link href="/admin/album">
{t('Link.album')}
<ArrowRight />
</Link>
</Button>
<Button
render={
<Link href="/admin/album">
{t('Link.album')}
<ArrowRight />
</Link>
}
nativeButton={false}
variant="ghost"
className="rounded-full"
/>
}
/>

Expand Down
14 changes: 8 additions & 6 deletions app/admin/settings/authenticator/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,13 @@ export default function Authenticator() {
</AlertDescription>
</Alert>
<Dialog>
<DialogTrigger asChild>
<Button className="cursor-pointer w-36" variant="destructive">
{t('Button.removeTwoFactor')}
</Button>
</DialogTrigger>
<DialogTrigger
render={
<Button className="cursor-pointer w-36" variant="destructive">
{t('Button.removeTwoFactor')}
</Button>
}
/>
<DialogContent className="sm:max-w-[425px]">
<DialogHeader>
<DialogTitle>{t('Tips.confirmRemoveTwoFactor')}</DialogTitle>
Expand Down Expand Up @@ -219,4 +221,4 @@ export default function Authenticator() {
}
</div>
)
}
}
22 changes: 12 additions & 10 deletions app/admin/settings/passkey/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,17 @@ export default function PasskeySettings() {
</div>

<Dialog>
<DialogTrigger asChild>
<Button
variant="outline"
size="sm"
className="text-red-600 hover:text-red-700"
>
<TrashIcon className="h-4 w-4" />
</Button>
</DialogTrigger>
<DialogTrigger
render={
<Button
variant="outline"
size="sm"
className="text-red-600 hover:text-red-700"
>
<TrashIcon className="h-4 w-4" />
</Button>
}
/>
<DialogContent className="sm:max-w-[425px]">
<DialogHeader>
<DialogTitle>{t('deletePasskey')}</DialogTitle>
Expand Down Expand Up @@ -229,4 +231,4 @@ export default function PasskeySettings() {
)}
</div>
)
}
}
12 changes: 4 additions & 8 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Metadata } from 'next/types'
import { Source_Serif_4, Source_Sans_3 } from 'next/font/google'
import { Source_Serif_4, Source_Sans_3, Inter } from 'next/font/google'

import { ThemeProvider } from '~/app/providers/next-ui-providers'
import { ToasterProviders } from '~/app/providers/toaster-providers'
Expand All @@ -13,6 +13,7 @@
import { getLocale, getMessages } from 'next-intl/server'
import { ConfigStoreProvider } from '~/app/providers/config-store-providers'
import Script from 'next/script'
import { cn } from "~/lib/utils";

Check failure on line 16 in app/layout.tsx

View workflow job for this annotation

GitHub Actions / Next Lint

Extra semicolon

Check failure on line 16 in app/layout.tsx

View workflow job for this annotation

GitHub Actions / Next Lint

Strings must use singlequote

Check failure on line 16 in app/layout.tsx

View workflow job for this annotation

GitHub Actions / Next Lint

Extra semicolon

Check failure on line 16 in app/layout.tsx

View workflow job for this annotation

GitHub Actions / Next Lint

Strings must use singlequote

const sourceSerif4 = Source_Serif_4({
subsets: ['latin'],
Expand All @@ -21,12 +22,7 @@
weight: ['400', '600', '700'],
})

const sourceSans3 = Source_Sans_3({
subsets: ['latin'],
variable: '--font-sans',
display: 'swap',
weight: ['400', '500', '600'],
})
const inter = Inter({subsets:['latin'],variable:'--font-sans'})

type ConfigItem = {
id: string;
Expand Down Expand Up @@ -101,7 +97,7 @@
const umamiAnalytics = data?.find((item: ConfigItem) => item.config_key === 'umami_analytics')?.config_value

return (
<html className={`overflow-y-auto scrollbar-hide ${sourceSerif4.variable} ${sourceSans3.variable}`} lang={locale} suppressHydrationWarning>
<html className={cn("overflow-y-auto", "scrollbar-hide", sourceSerif4.variable, "font-sans", inter.variable)} lang={locale} suppressHydrationWarning>

Check failure on line 100 in app/layout.tsx

View workflow job for this annotation

GitHub Actions / Next Lint

Strings must use singlequote

Check failure on line 100 in app/layout.tsx

View workflow job for this annotation

GitHub Actions / Next Lint

Strings must use singlequote

Check failure on line 100 in app/layout.tsx

View workflow job for this annotation

GitHub Actions / Next Lint

Strings must use singlequote

Check failure on line 100 in app/layout.tsx

View workflow job for this annotation

GitHub Actions / Next Lint

Strings must use singlequote

Check failure on line 100 in app/layout.tsx

View workflow job for this annotation

GitHub Actions / Next Lint

Strings must use singlequote

Check failure on line 100 in app/layout.tsx

View workflow job for this annotation

GitHub Actions / Next Lint

Strings must use singlequote
<head>
<link rel="manifest" href="/manifest.json" />
<meta name="theme-color" content="#2d2518" />
Expand Down
12 changes: 8 additions & 4 deletions components.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"style": "base-mira",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "",
"css": "style/globals.css",
"baseColor": "zinc",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"iconLibrary": "hugeicons",
"rtl": false,
"aliases": {
"components": "~/components",
"utils": "~/lib/utils",
"ui": "~/components/ui",
"lib": "~/lib",
"hooks": "~/hooks"
},
"iconLibrary": "lucide"
}
"menuColor": "default",
"menuAccent": "subtle",
"registries": {}
}
4 changes: 1 addition & 3 deletions components/admin/album/album-add-sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ export default function AlbumAddSheet(props : Readonly<HandleProps>) {
<SheetContent side="left" className="w-full overflow-y-auto scrollbar-hide" onInteractOutside={(event: any) => event.preventDefault()}>
<SheetHeader>
<SheetTitle>{t('Album.addAlbum')}</SheetTitle>
<SheetDescription asChild>
<div className="text-muted-foreground space-y-2 text-sm">
<SheetDescription render={<div className="space-y-2 text-sm" />}>
<label
htmlFor="name"
className="block overflow-hidden rounded-md border border-input px-3 py-2 shadow-sm focus-within:border-primary focus-within:ring-1 focus-within:ring-primary"
Expand Down Expand Up @@ -219,7 +218,6 @@ export default function AlbumAddSheet(props : Readonly<HandleProps>) {
{loading && <ReloadIcon className="mr-2 h-4 w-4 animate-spin"/>}
{t('Album.submit')}
</Button>
</div>
</SheetDescription>
</SheetHeader>
</SheetContent>
Expand Down
30 changes: 16 additions & 14 deletions components/admin/album/album-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,20 +133,22 @@ export default function AlbumList(props : Readonly<HandleProps>) {
}}>
<AnimatedIconTrigger>
{({ iconRef, triggerProps }) => (
<DialogTrigger asChild>
<Button
variant="outline"
size="icon"
aria-label={t('Album.deleteAlbum')}
{...mergeAnimatedTriggerProps({
onClick: () => {
setAlbum(album)
},
}, triggerProps)}
>
<DeleteIcon ref={iconRef} />
</Button>
</DialogTrigger>
<DialogTrigger
render={
<Button
variant="outline"
size="icon"
aria-label={t('Album.deleteAlbum')}
{...mergeAnimatedTriggerProps({
onClick: () => {
setAlbum(album)
},
}, triggerProps)}
>
<DeleteIcon ref={iconRef} />
</Button>
}
/>
)}
</AnimatedIconTrigger>
<DialogContent className="sm:max-w-[425px]">
Expand Down
20 changes: 11 additions & 9 deletions components/admin/list/image-batch-delete-sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,17 @@ export default function ImageBatchDeleteSheet(props : Readonly<ImageServerHandle
))
}
<Dialog>
<DialogTrigger asChild>
<Button
className="cursor-pointer"
disabled={data.length === 0}
aria-label={t('Button.delete')}
>
{t('Button.delete')}
</Button>
</DialogTrigger>
<DialogTrigger
render={
<Button
className="cursor-pointer"
disabled={data.length === 0}
aria-label={t('Button.delete')}
>
{t('Button.delete')}
</Button>
}
/>
<DialogContent className="sm:max-w-[425px]">
<DialogHeader>
<DialogTitle>{t('List.confirmDelete')}</DialogTitle>
Expand Down
52 changes: 28 additions & 24 deletions components/admin/list/list-props.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -300,16 +300,18 @@ export default function ListProps(props : Readonly<ImageServerHandleProps>) {
<Popover>
<AnimatedIconTrigger>
{({ iconRef, triggerProps }) => (
<PopoverTrigger asChild>
<Button
className="flex sm:hidden cursor-pointer"
variant="outline"
size="icon"
{...mergeAnimatedTriggerProps({}, triggerProps)}
>
<CircleChevronDownIcon ref={iconRef} />
</Button>
</PopoverTrigger>
<PopoverTrigger
render={
<Button
className="flex sm:hidden cursor-pointer"
variant="outline"
size="icon"
{...mergeAnimatedTriggerProps({}, triggerProps)}
>
<CircleChevronDownIcon ref={iconRef} />
</Button>
}
/>
)}
</AnimatedIconTrigger>
<PopoverContent className="w-80">
Expand Down Expand Up @@ -424,20 +426,22 @@ export default function ListProps(props : Readonly<ImageServerHandleProps>) {
</div>
<div className="space-x-1">
<AlertDialog>
<AlertDialogTrigger asChild>
<Button
variant="outline"
size="icon"
className="cursor-pointer"
onClick={() => {
setImage(image)
setImageAlbum(image.album_value)
}}
aria-label={t('List.bindAlbum')}
>
<Replace size={20} />
</Button>
</AlertDialogTrigger>
<AlertDialogTrigger
render={
<Button
variant="outline"
size="icon"
className="cursor-pointer"
onClick={() => {
setImage(image)
setImageAlbum(image.album_value)
}}
aria-label={t('List.bindAlbum')}
>
<Replace size={20} />
</Button>
}
/>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>{t('List.bindAlbum')}</AlertDialogTitle>
Expand Down
8 changes: 5 additions & 3 deletions components/album/floating-filter-ball.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,11 @@ export default function FloatingFilterBall({

return (
<Popover open={isOpen} onOpenChange={setIsOpen}>
<PopoverTrigger asChild onClick={handleClick}>
{BallButton}
</PopoverTrigger>
<PopoverTrigger
render={BallButton}
nativeButton={false}
onClick={handleClick}
/>
<PopoverContent
className="w-72"
side="left"
Expand Down
Loading
Loading