feat(webui): integrate i18n into folder-tree component and add missing translation keys

This commit is contained in:
yiling
2026-06-27 14:30:22 +08:00
parent 1b60c8df83
commit e8058a2292
30 changed files with 675 additions and 81 deletions
+2 -1
View File
@@ -18,6 +18,7 @@ import {
} from '@/ui/components/ui/icons' } from '@/ui/components/ui/icons'
import { usePermissions } from '@/ui/hooks/use-permissions' import { usePermissions } from '@/ui/hooks/use-permissions'
import { cn } from '@/ui/lib/utils' import { cn } from '@/ui/lib/utils'
import { m } from '@/ui/paraglide/messages.js'
import type { AncestorFolder } from '@shumai/dtos' import type { AncestorFolder } from '@shumai/dtos'
import { Link, useNavigate } from '@tanstack/react-router' import { Link, useNavigate } from '@tanstack/react-router'
import { Check, ChevronDown, FileIcon, History, LayoutGrid, List } from 'lucide-react' import { Check, ChevronDown, FileIcon, History, LayoutGrid, List } from 'lucide-react'
@@ -97,7 +98,7 @@ export function BreadcrumbNav({
})), })),
] ]
: [ : [
{ name: 'All Projects', path: `/teams/${teamId}`, isMuted: true }, { name: m.all_projects(), path: `/teams/${teamId}`, isMuted: true },
{ name: projectName, path: `/projects/${projectId}` }, { name: projectName, path: `/projects/${projectId}` },
...ancestorFolders ...ancestorFolders
.slice() .slice()
+78 -77
View File
@@ -61,6 +61,7 @@ import { useEffect, useMemo, useState } from 'react'
import { useInView } from 'react-intersection-observer' import { useInView } from 'react-intersection-observer'
import { toast } from 'sonner' import { toast } from 'sonner'
import type { DragState } from './dnd-types' import type { DragState } from './dnd-types'
import { m } from '@/ui/paraglide/messages.js'
interface FolderTreeProps { interface FolderTreeProps {
teamId: string teamId: string
@@ -111,7 +112,7 @@ export function FolderTree({
param: { projectId }, param: { projectId },
query: { first: '20', after: pageParam as string }, query: { first: '20', after: pageParam as string },
}) })
if (!res.ok) throw new Error('Failed to fetch share links') if (!res.ok) throw new Error(m.failed_fetch_share_links())
return (await res.json()) as unknown as { return (await res.json()) as unknown as {
data: ShareLinkInfo[] data: ShareLinkInfo[]
pageInfo: { cursor?: string; total?: number } pageInfo: { cursor?: string; total?: number }
@@ -134,7 +135,7 @@ export function FolderTree({
param: { projectId }, param: { projectId },
query: { first: '20', after: pageParam as string }, query: { first: '20', after: pageParam as string },
}) })
if (!res.ok) throw new Error('Failed to fetch collections') if (!res.ok) throw new Error(m.failed_fetch_collections())
return (await res.json()) as unknown as { return (await res.json()) as unknown as {
data: CollectionInfo[] data: CollectionInfo[]
pageInfo: { cursor?: string; total?: number } pageInfo: { cursor?: string; total?: number }
@@ -174,7 +175,7 @@ export function FolderTree({
const res = await client.api.projects[':projectId'].collections.$post({ const res = await client.api.projects[':projectId'].collections.$post({
param: { projectId }, param: { projectId },
json: { json: {
name: 'Untitled Collection', name: m.untitled_collection(),
filter: { filter: {
sourceFolderId: rootFolderId, sourceFolderId: rootFolderId,
searchFilter: { searchFilter: {
@@ -184,12 +185,12 @@ export function FolderTree({
}, },
}, },
}) })
if (!res.ok) throw new Error('Failed to create collection') if (!res.ok) throw new Error(m.failed_create_collection())
return await res.json() return await res.json()
}, },
onSuccess: (data) => { onSuccess: (data) => {
queryClient.invalidateQueries({ queryKey: ['collections', projectId] }) queryClient.invalidateQueries({ queryKey: ['collections', projectId] })
toast.success('Collection created') toast.success(m.collection_created())
navigate({ navigate({
to: '/projects/$projectId/collections/$collectionId', to: '/projects/$projectId/collections/$collectionId',
params: { projectId, collectionId: data.id }, params: { projectId, collectionId: data.id },
@@ -212,12 +213,12 @@ export function FolderTree({
}), }),
}, },
}) })
if (!res.ok) throw new Error('Failed to create share link') if (!res.ok) throw new Error(m.failed_create_share_link())
return await res.json() return await res.json()
}, },
onSuccess: (data) => { onSuccess: (data) => {
queryClient.invalidateQueries({ queryKey: ['shares', projectId] }) queryClient.invalidateQueries({ queryKey: ['shares', projectId] })
toast.success('Share link created') toast.success(m.share_link_created())
navigate({ navigate({
to: '/projects/$projectId/shares/$shareId', to: '/projects/$projectId/shares/$shareId',
params: { projectId, shareId: data.id }, params: { projectId, shareId: data.id },
@@ -256,13 +257,13 @@ export function FolderTree({
param: { folderId: id }, param: { folderId: id },
json: { name }, json: { name },
}) })
if (!res.ok) throw new Error('Failed to rename folder') if (!res.ok) throw new Error(m.failed_rename_folder())
return await res.json() return await res.json()
}, },
onSuccess: () => { onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ['search', teamId] }) queryClient.invalidateQueries({ queryKey: ['search', teamId] })
queryClient.invalidateQueries({ queryKey: ['folders'] }) queryClient.invalidateQueries({ queryKey: ['folders'] })
toast.success('Folder renamed') toast.success(m.folder_renamed())
setIsRenameOpen(false) setIsRenameOpen(false)
}, },
onError: (err) => { onError: (err) => {
@@ -275,13 +276,13 @@ export function FolderTree({
const res = await client.api.folders.$delete({ const res = await client.api.folders.$delete({
json: { ids: [id] }, json: { ids: [id] },
}) })
if (!res.ok) throw new Error('Failed to delete folder') if (!res.ok) throw new Error(m.failed_delete_folder())
return id return id
}, },
onSuccess: (deletedId) => { onSuccess: (deletedId) => {
queryClient.invalidateQueries({ queryKey: ['search', teamId] }) queryClient.invalidateQueries({ queryKey: ['search', teamId] })
queryClient.invalidateQueries({ queryKey: ['folders'] }) queryClient.invalidateQueries({ queryKey: ['folders'] })
toast.success('Folder deleted') toast.success(m.folder_deleted())
setIsDeleteOpen(false) setIsDeleteOpen(false)
if (folderParams?.folderId === deletedId) { if (folderParams?.folderId === deletedId) {
navigate({ navigate({
@@ -309,11 +310,11 @@ export function FolderTree({
const res = await client.api.files['download-links'].$post({ const res = await client.api.files['download-links'].$post({
json: { ids: [folderId] }, json: { ids: [folderId] },
}) })
if (!res.ok) throw new Error('Failed to prepare download links') if (!res.ok) throw new Error(m.failed_to_prepare_download_links())
const data = await res.json() const data = await res.json()
setResolvedFiles(data.files) setResolvedFiles(data.files)
} catch (error) { } catch (error) {
toast.error('Failed to prepare download links') toast.error(m.failed_to_prepare_download_links())
setIsDownloadOpen(false) setIsDownloadOpen(false)
console.error(error) console.error(error)
} finally { } finally {
@@ -327,12 +328,9 @@ export function FolderTree({
if (files.length === 0) return if (files.length === 0) return
toast.info( toast.info(m.starting_download_files({ count: files.length }), {
`Starting download of ${files.length} files. Please allow multiple downloads if prompted by your browser.`, duration: 5000,
{ })
duration: 5000,
},
)
const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)) const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))
@@ -355,7 +353,7 @@ export function FolderTree({
runQueue().catch((err) => { runQueue().catch((err) => {
console.error('Background downloads failed:', err) console.error('Background downloads failed:', err)
toast.error('Some downloads could not be started') toast.error(m.some_downloads_failed())
}) })
} }
@@ -365,12 +363,12 @@ export function FolderTree({
param: { collectionId: id }, param: { collectionId: id },
json: { name }, json: { name },
}) })
if (!res.ok) throw new Error('Failed to rename collection') if (!res.ok) throw new Error(m.failed_rename_collection())
return await res.json() return await res.json()
}, },
onSuccess: () => { onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ['collections', projectId] }) queryClient.invalidateQueries({ queryKey: ['collections', projectId] })
toast.success('Collection renamed') toast.success(m.collection_renamed())
setIsRenameOpen(false) setIsRenameOpen(false)
}, },
onError: (err) => { onError: (err) => {
@@ -383,12 +381,12 @@ export function FolderTree({
const res = await client.api.collections[':collectionId'].$delete({ const res = await client.api.collections[':collectionId'].$delete({
param: { collectionId: id }, param: { collectionId: id },
}) })
if (!res.ok) throw new Error('Failed to delete collection') if (!res.ok) throw new Error(m.failed_delete_collection())
return await res.json() return await res.json()
}, },
onSuccess: (_, deletedId) => { onSuccess: (_, deletedId) => {
queryClient.invalidateQueries({ queryKey: ['collections', projectId] }) queryClient.invalidateQueries({ queryKey: ['collections', projectId] })
toast.success('Collection deleted') toast.success(m.collection_deleted())
setIsDeleteOpen(false) setIsDeleteOpen(false)
if (params?.collectionId === deletedId) { if (params?.collectionId === deletedId) {
navigate({ navigate({
@@ -408,12 +406,12 @@ export function FolderTree({
param: { shareId: id }, param: { shareId: id },
json: { name }, json: { name },
}) })
if (!res.ok) throw new Error('Failed to rename share link') if (!res.ok) throw new Error(m.failed_rename_share_link())
return await res.json() return await res.json()
}, },
onSuccess: () => { onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ['shares', projectId] }) queryClient.invalidateQueries({ queryKey: ['shares', projectId] })
toast.success('Share link renamed') toast.success(m.share_link_renamed())
setIsRenameOpen(false) setIsRenameOpen(false)
}, },
onError: (err) => { onError: (err) => {
@@ -426,12 +424,12 @@ export function FolderTree({
const res = await client.api.shares[':shareId'].$delete({ const res = await client.api.shares[':shareId'].$delete({
param: { shareId: id }, param: { shareId: id },
}) })
if (!res.ok) throw new Error('Failed to delete share link') if (!res.ok) throw new Error(m.failed_delete_share_link())
return id return id
}, },
onSuccess: (deletedId) => { onSuccess: (deletedId) => {
queryClient.invalidateQueries({ queryKey: ['shares', projectId] }) queryClient.invalidateQueries({ queryKey: ['shares', projectId] })
toast.success('Share link deleted') toast.success(m.share_link_deleted())
setIsDeleteOpen(false) setIsDeleteOpen(false)
if (shareParams?.shareId === deletedId) { if (shareParams?.shareId === deletedId) {
navigate({ navigate({
@@ -458,7 +456,9 @@ export function FolderTree({
className="flex-1 flex items-center gap-1.5 cursor-pointer select-none text-muted-foreground hover:text-foreground transition-colors" className="flex-1 flex items-center gap-1.5 cursor-pointer select-none text-muted-foreground hover:text-foreground transition-colors"
onClick={() => setIsAssetsExpanded(!isAssetsExpanded)} onClick={() => setIsAssetsExpanded(!isAssetsExpanded)}
> >
<h3 className="text-xs font-semibold uppercase tracking-wider">Assets</h3> <h3 className="text-xs font-semibold uppercase tracking-wider">
{m.folder_tree_assets()}
</h3>
{isAssetsExpanded ? ( {isAssetsExpanded ? (
<ChevronsDownUp className="h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200" /> <ChevronsDownUp className="h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200" />
) : ( ) : (
@@ -531,7 +531,9 @@ export function FolderTree({
<div className="flex h-4 w-4 items-center justify-center"> <div className="flex h-4 w-4 items-center justify-center">
<Trash2 className="h-4 w-4 text-sidebar-primary" /> <Trash2 className="h-4 w-4 text-sidebar-primary" />
</div> </div>
<span className="flex-1 truncate text-sidebar-foreground">Recently Deleted</span> <span className="flex-1 truncate text-sidebar-foreground">
{m.recently_deleted()}
</span>
</div> </div>
)} )}
</div> </div>
@@ -550,7 +552,7 @@ export function FolderTree({
className="flex-1 flex items-center gap-1.5 cursor-pointer select-none text-muted-foreground hover:text-foreground transition-colors" className="flex-1 flex items-center gap-1.5 cursor-pointer select-none text-muted-foreground hover:text-foreground transition-colors"
onClick={() => setIsCollectionsExpanded(!isCollectionsExpanded)} onClick={() => setIsCollectionsExpanded(!isCollectionsExpanded)}
> >
<h3 className="text-xs font-semibold uppercase tracking-wider">Collections</h3> <h3 className="text-xs font-semibold uppercase tracking-wider">{m.collections()}</h3>
{isCollectionsExpanded ? ( {isCollectionsExpanded ? (
<ChevronsDownUp className="h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200" /> <ChevronsDownUp className="h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200" />
) : ( ) : (
@@ -589,7 +591,9 @@ export function FolderTree({
<LayoutGrid className="h-4 w-4 text-sidebar-primary" /> <LayoutGrid className="h-4 w-4 text-sidebar-primary" />
</div> </div>
<span className="flex-1 truncate text-sidebar-foreground"> <span className="flex-1 truncate text-sidebar-foreground">
All Collections ({collectionsData?.pages[0]?.pageInfo?.total || 0}) {m.all_collections_count({
count: collectionsData?.pages[0]?.pageInfo?.total || 0,
})}
</span> </span>
</div> </div>
@@ -642,7 +646,7 @@ export function FolderTree({
setIsRenameOpen(true) setIsRenameOpen(true)
}} }}
> >
Rename {m.rename()}
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuItem <DropdownMenuItem
className="text-destructive focus:text-destructive focus:bg-destructive/10" className="text-destructive focus:text-destructive focus:bg-destructive/10"
@@ -652,7 +656,7 @@ export function FolderTree({
setIsDeleteOpen(true) setIsDeleteOpen(true)
}} }}
> >
Delete {m.delete()}
</DropdownMenuItem> </DropdownMenuItem>
</DropdownMenuContent> </DropdownMenuContent>
</DropdownMenu> </DropdownMenu>
@@ -684,7 +688,7 @@ export function FolderTree({
className="flex-1 flex items-center gap-1.5 cursor-pointer select-none text-muted-foreground hover:text-foreground transition-colors" className="flex-1 flex items-center gap-1.5 cursor-pointer select-none text-muted-foreground hover:text-foreground transition-colors"
onClick={() => setIsSharesExpanded(!isSharesExpanded)} onClick={() => setIsSharesExpanded(!isSharesExpanded)}
> >
<h3 className="text-xs font-semibold uppercase tracking-wider">Share Links</h3> <h3 className="text-xs font-semibold uppercase tracking-wider">{m.share_links()}</h3>
{isSharesExpanded ? ( {isSharesExpanded ? (
<ChevronsDownUp className="h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200" /> <ChevronsDownUp className="h-3.5 w-3.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200" />
) : ( ) : (
@@ -725,7 +729,9 @@ export function FolderTree({
<LayoutGrid className="h-4 w-4 text-sidebar-primary" /> <LayoutGrid className="h-4 w-4 text-sidebar-primary" />
</div> </div>
<span className="flex-1 truncate text-sidebar-foreground"> <span className="flex-1 truncate text-sidebar-foreground">
All Share Links ({shareLinksData?.pages[0]?.pageInfo?.total || 0}) {m.all_share_links_count({
count: shareLinksData?.pages[0]?.pageInfo?.total || 0,
})}
</span> </span>
</div> </div>
@@ -765,19 +771,18 @@ export function FolderTree({
<DialogContent onClick={(e) => e.stopPropagation()}> <DialogContent onClick={(e) => e.stopPropagation()}>
<DialogHeader> <DialogHeader>
<DialogTitle> <DialogTitle>
Rename{' '}
{renameType === 'collection' {renameType === 'collection'
? 'Collection' ? m.rename_collection()
: renameType === 'share' : renameType === 'share'
? 'Share Link' ? m.rename_share_link()
: 'Folder'} : m.rename_folder()}
</DialogTitle> </DialogTitle>
</DialogHeader> </DialogHeader>
<div className="py-4"> <div className="py-4">
<Input <Input
value={renameName} value={renameName}
onChange={(e) => setRenameName(e.target.value)} onChange={(e) => setRenameName(e.target.value)}
placeholder="Enter new name" placeholder={m.enter_new_name()}
onKeyDown={(e) => { onKeyDown={(e) => {
if (e.key === 'Enter' && renameName.trim()) { if (e.key === 'Enter' && renameName.trim()) {
if (renameType === 'collection') { if (renameType === 'collection') {
@@ -793,7 +798,7 @@ export function FolderTree({
</div> </div>
<DialogFooter> <DialogFooter>
<Button variant="ghost" onClick={() => setIsRenameOpen(false)}> <Button variant="ghost" onClick={() => setIsRenameOpen(false)}>
Cancel {m.cancel()}
</Button> </Button>
<Button <Button
disabled={!renameName.trim()} disabled={!renameName.trim()}
@@ -807,7 +812,7 @@ export function FolderTree({
} }
}} }}
> >
Rename {m.rename()}
</Button> </Button>
</DialogFooter> </DialogFooter>
</DialogContent> </DialogContent>
@@ -818,26 +823,25 @@ export function FolderTree({
<AlertDialogContent onClick={(e) => e.stopPropagation()}> <AlertDialogContent onClick={(e) => e.stopPropagation()}>
<AlertDialogHeader> <AlertDialogHeader>
<AlertDialogTitle> <AlertDialogTitle>
Delete{' '}
{deleteType === 'collection' {deleteType === 'collection'
? 'Collection' ? m.delete_collection_confirm()
: deleteType === 'share' : deleteType === 'share'
? 'Share Link' ? m.delete_share_link_confirm()
: 'Folder'} : m.delete_folder_confirm()}
?
</AlertDialogTitle> </AlertDialogTitle>
<AlertDialogDescription> <AlertDialogDescription>
Are you sure you want to delete this{' '} {m.delete_confirm_description({
{deleteType === 'collection' type:
? 'collection' deleteType === 'collection'
: deleteType === 'share' ? m.collection()
? 'share link' : deleteType === 'share'
: 'folder'} ? m.share_link()
? This action cannot be undone. : m.folder().toLowerCase(),
})}
</AlertDialogDescription> </AlertDialogDescription>
</AlertDialogHeader> </AlertDialogHeader>
<AlertDialogFooter> <AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel> <AlertDialogCancel>{m.cancel()}</AlertDialogCancel>
<AlertDialogAction <AlertDialogAction
className="bg-destructive text-destructive-foreground hover:bg-destructive/90" className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
onClick={() => { onClick={() => {
@@ -850,7 +854,7 @@ export function FolderTree({
} }
}} }}
> >
Delete {m.delete()}
</AlertDialogAction> </AlertDialogAction>
</AlertDialogFooter> </AlertDialogFooter>
</AlertDialogContent> </AlertDialogContent>
@@ -860,11 +864,11 @@ export function FolderTree({
<Dialog open={isDownloadOpen} onOpenChange={setIsDownloadOpen}> <Dialog open={isDownloadOpen} onOpenChange={setIsDownloadOpen}>
<DialogContent className="sm:max-w-md"> <DialogContent className="sm:max-w-md">
<DialogHeader> <DialogHeader>
<DialogTitle>{isLoadingLinks ? 'Preparing Download' : 'Confirm Download'}</DialogTitle> <DialogTitle>
{isLoadingLinks ? m.preparing_download() : m.confirm_download()}
</DialogTitle>
<DialogDescription> <DialogDescription>
{isLoadingLinks {isLoadingLinks ? m.resolving_files_wait() : m.folder_files_download_description()}
? 'Resolving all files and folders. Please wait...'
: 'Selected folder files will be prepared for download.'}
</DialogDescription> </DialogDescription>
</DialogHeader> </DialogHeader>
@@ -872,23 +876,20 @@ export function FolderTree({
<div className="space-y-4 py-6 flex flex-col items-center justify-center"> <div className="space-y-4 py-6 flex flex-col items-center justify-center">
<Loader2 className="h-8 w-8 animate-spin text-primary" /> <Loader2 className="h-8 w-8 animate-spin text-primary" />
<span className="text-sm font-medium text-muted-foreground mt-2"> <span className="text-sm font-medium text-muted-foreground mt-2">
Preparing download links... {m.preparing_download_links()}
</span> </span>
</div> </div>
) : ( ) : (
<div className="space-y-4 py-2"> <div className="space-y-4 py-2">
<div className="text-sm text-muted-foreground"> <div className="text-sm text-muted-foreground">
This download will include{' '} {m.download_includes_files({ count: resolvedFiles.length })}
<span className="font-semibold text-foreground">{resolvedFiles.length}</span>{' '}
file(s).
</div> </div>
<div className="flex items-start gap-3 p-3 text-sm rounded-lg bg-amber-50 dark:bg-amber-950/30 text-amber-800 dark:text-amber-300 border border-amber-200 dark:border-amber-900/30"> <div className="flex items-start gap-3 p-3 text-sm rounded-lg bg-amber-50 dark:bg-amber-950/30 text-amber-800 dark:text-amber-300 border border-amber-200 dark:border-amber-900/30">
<AlertTriangle className="h-5 w-5 shrink-0 mt-0.5" /> <AlertTriangle className="h-5 w-5 shrink-0 mt-0.5" />
<div> <div>
<p className="font-semibold">No Folder Structure</p> <p className="font-semibold">{m.no_folder_structure()}</p>
<p className="mt-0.5 text-xs text-amber-700/90 dark:text-amber-400/90"> <p className="mt-0.5 text-xs text-amber-700/90 dark:text-amber-400/90">
Folder hierarchy will be flattened. All nested files will be downloaded directly {m.folder_structure_warning()}
into your default download folder.
</p> </p>
</div> </div>
</div> </div>
@@ -899,7 +900,7 @@ export function FolderTree({
{!isLoadingLinks ? ( {!isLoadingLinks ? (
<> <>
<Button variant="outline" onClick={() => setIsDownloadOpen(false)}> <Button variant="outline" onClick={() => setIsDownloadOpen(false)}>
Cancel {m.cancel()}
</Button> </Button>
<Button <Button
onClick={startDownload} onClick={startDownload}
@@ -907,12 +908,12 @@ export function FolderTree({
disabled={resolvedFiles.length === 0} disabled={resolvedFiles.length === 0}
> >
<Download className="h-4 w-4" /> <Download className="h-4 w-4" />
Start Download {m.start_download()}
</Button> </Button>
</> </>
) : ( ) : (
<Button disabled variant="outline"> <Button disabled variant="outline">
Cancel {m.cancel()}
</Button> </Button>
)} )}
</DialogFooter> </DialogFooter>
@@ -997,7 +998,7 @@ function ShareLinkItem({
onRenameTrigger(link.id, link.name) onRenameTrigger(link.id, link.name)
}} }}
> >
Rename {m.rename()}
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuItem <DropdownMenuItem
className="text-destructive focus:text-destructive focus:bg-destructive/10" className="text-destructive focus:text-destructive focus:bg-destructive/10"
@@ -1005,7 +1006,7 @@ function ShareLinkItem({
onDeleteTrigger(link.id) onDeleteTrigger(link.id)
}} }}
> >
Delete {m.delete()}
</DropdownMenuItem> </DropdownMenuItem>
</DropdownMenuContent> </DropdownMenuContent>
</DropdownMenu> </DropdownMenu>
@@ -1093,7 +1094,7 @@ function FolderTreeItem({
first: '20', first: '20',
}, },
}) })
if (!res.ok) throw new Error('failed to fetch folder children') if (!res.ok) throw new Error(m.failed_to_fetch_folder_children())
return (await res.json()) as unknown as AssetInfoPaginatedList return (await res.json()) as unknown as AssetInfoPaginatedList
}, },
initialPageParam: '', initialPageParam: '',
@@ -1228,7 +1229,7 @@ function FolderTreeItem({
}} }}
> >
<Edit className="mr-2 h-4 w-4" /> <Edit className="mr-2 h-4 w-4" />
Rename {m.rename()}
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuItem <DropdownMenuItem
onClick={() => { onClick={() => {
@@ -1236,7 +1237,7 @@ function FolderTreeItem({
}} }}
> >
<Download className="mr-2 h-4 w-4" /> <Download className="mr-2 h-4 w-4" />
Download {m.download()}
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuSeparator /> <DropdownMenuSeparator />
<DropdownMenuItem <DropdownMenuItem
@@ -1246,7 +1247,7 @@ function FolderTreeItem({
}} }}
> >
<Trash2 className="mr-2 h-4 w-4" /> <Trash2 className="mr-2 h-4 w-4" />
Delete {m.delete()}
</DropdownMenuItem> </DropdownMenuItem>
</DropdownMenuContent> </DropdownMenuContent>
</DropdownMenu> </DropdownMenu>
+15 -1
View File
@@ -762,5 +762,19 @@
"click_toggle_time_frames": "Click to toggle Time/Frames", "click_toggle_time_frames": "Click to toggle Time/Frames",
"quality": "Quality", "quality": "Quality",
"media_not_available": "Media is not available.", "media_not_available": "Media is not available.",
"original": "Original" "original": "Original",
"collection": "collection",
"share_link": "share link",
"failed_fetch_share_links": "Failed to fetch share links",
"failed_fetch_collections": "Failed to fetch collections",
"failed_create_share_link": "Failed to create share link",
"failed_rename_folder": "Failed to rename folder",
"failed_delete_folder": "Failed to delete folder",
"failed_rename_collection": "Failed to rename collection",
"failed_delete_collection": "Failed to delete collection",
"failed_rename_share_link": "Failed to rename share link",
"failed_delete_share_link": "Failed to delete share link",
"failed_to_fetch_folder_children": "Failed to fetch folder children"
} }
+15 -1
View File
@@ -762,5 +762,19 @@
"click_toggle_time_frames": "点击切换时间/帧", "click_toggle_time_frames": "点击切换时间/帧",
"quality": "画质", "quality": "画质",
"media_not_available": "媒体不可用。", "media_not_available": "媒体不可用。",
"original": "原始" "original": "原始",
"collection": "收藏集",
"share_link": "分享链接",
"failed_fetch_share_links": "获取分享链接失败",
"failed_fetch_collections": "获取收藏集失败",
"failed_create_share_link": "创建分享链接失败",
"failed_rename_folder": "重命名文件夹失败",
"failed_delete_folder": "删除文件夹失败",
"failed_rename_collection": "重命名收藏集失败",
"failed_delete_collection": "删除收藏集失败",
"failed_rename_share_link": "重命名分享链接失败",
"failed_delete_share_link": "删除分享链接失败",
"failed_to_fetch_folder_children": "获取子文件夹失败"
} }
+12
View File
@@ -715,4 +715,16 @@ export * from "./click_toggle_time_frames.js";
export * from "./quality.js"; export * from "./quality.js";
export * from "./media_not_available.js"; export * from "./media_not_available.js";
export * from "./original.js"; export * from "./original.js";
export * from "./collection.js";
export * from "./share_link.js";
export * from "./failed_fetch_share_links.js";
export * from "./failed_fetch_collections.js";
export * from "./failed_create_share_link.js";
export * from "./failed_rename_folder.js";
export * from "./failed_delete_folder.js";
export * from "./failed_rename_collection.js";
export * from "./failed_delete_collection.js";
export * from "./failed_rename_share_link.js";
export * from "./failed_delete_share_link.js";
export * from "./failed_to_fetch_folder_children.js";
export type LocalizedString = import("../runtime.js").LocalizedString; export type LocalizedString = import("../runtime.js").LocalizedString;
+13 -1
View File
@@ -716,4 +716,16 @@ export * from './loop.js'
export * from './click_toggle_time_frames.js' export * from './click_toggle_time_frames.js'
export * from './quality.js' export * from './quality.js'
export * from './media_not_available.js' export * from './media_not_available.js'
export * from './original.js' export * from './original.js'
export * from './collection.js'
export * from './share_link.js'
export * from './failed_fetch_share_links.js'
export * from './failed_fetch_collections.js'
export * from './failed_create_share_link.js'
export * from './failed_rename_folder.js'
export * from './failed_delete_folder.js'
export * from './failed_rename_collection.js'
export * from './failed_delete_collection.js'
export * from './failed_rename_share_link.js'
export * from './failed_delete_share_link.js'
export * from './failed_to_fetch_folder_children.js'
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "collection" |
*
* @param {CollectionInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const collection: ((inputs?: CollectionInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<CollectionInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type CollectionInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} CollectionInputs */
const en_collection = /** @type {(inputs: CollectionInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`collection`)
};
const zh_collection = /** @type {(inputs: CollectionInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`收藏集`)
};
/**
* | output |
* | --- |
* | "collection" |
*
* @param {CollectionInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const collection = /** @type {((inputs?: CollectionInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<CollectionInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_collection(inputs)
return zh_collection(inputs)
});
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Failed to create share link" |
*
* @param {Failed_Create_Share_LinkInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_create_share_link: ((inputs?: Failed_Create_Share_LinkInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Failed_Create_Share_LinkInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Failed_Create_Share_LinkInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Failed_Create_Share_LinkInputs */
const en_failed_create_share_link = /** @type {(inputs: Failed_Create_Share_LinkInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Failed to create share link`)
};
const zh_failed_create_share_link = /** @type {(inputs: Failed_Create_Share_LinkInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`创建分享链接失败`)
};
/**
* | output |
* | --- |
* | "Failed to create share link" |
*
* @param {Failed_Create_Share_LinkInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_create_share_link = /** @type {((inputs?: Failed_Create_Share_LinkInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Failed_Create_Share_LinkInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_failed_create_share_link(inputs)
return zh_failed_create_share_link(inputs)
});
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Failed to delete collection" |
*
* @param {Failed_Delete_CollectionInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_delete_collection: ((inputs?: Failed_Delete_CollectionInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Failed_Delete_CollectionInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Failed_Delete_CollectionInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Failed_Delete_CollectionInputs */
const en_failed_delete_collection = /** @type {(inputs: Failed_Delete_CollectionInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Failed to delete collection`)
};
const zh_failed_delete_collection = /** @type {(inputs: Failed_Delete_CollectionInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`删除收藏集失败`)
};
/**
* | output |
* | --- |
* | "Failed to delete collection" |
*
* @param {Failed_Delete_CollectionInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_delete_collection = /** @type {((inputs?: Failed_Delete_CollectionInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Failed_Delete_CollectionInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_failed_delete_collection(inputs)
return zh_failed_delete_collection(inputs)
});
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Failed to delete folder" |
*
* @param {Failed_Delete_FolderInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_delete_folder: ((inputs?: Failed_Delete_FolderInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Failed_Delete_FolderInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Failed_Delete_FolderInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Failed_Delete_FolderInputs */
const en_failed_delete_folder = /** @type {(inputs: Failed_Delete_FolderInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Failed to delete folder`)
};
const zh_failed_delete_folder = /** @type {(inputs: Failed_Delete_FolderInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`删除文件夹失败`)
};
/**
* | output |
* | --- |
* | "Failed to delete folder" |
*
* @param {Failed_Delete_FolderInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_delete_folder = /** @type {((inputs?: Failed_Delete_FolderInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Failed_Delete_FolderInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_failed_delete_folder(inputs)
return zh_failed_delete_folder(inputs)
});
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Failed to delete share link" |
*
* @param {Failed_Delete_Share_LinkInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_delete_share_link: ((inputs?: Failed_Delete_Share_LinkInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Failed_Delete_Share_LinkInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Failed_Delete_Share_LinkInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Failed_Delete_Share_LinkInputs */
const en_failed_delete_share_link = /** @type {(inputs: Failed_Delete_Share_LinkInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Failed to delete share link`)
};
const zh_failed_delete_share_link = /** @type {(inputs: Failed_Delete_Share_LinkInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`删除分享链接失败`)
};
/**
* | output |
* | --- |
* | "Failed to delete share link" |
*
* @param {Failed_Delete_Share_LinkInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_delete_share_link = /** @type {((inputs?: Failed_Delete_Share_LinkInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Failed_Delete_Share_LinkInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_failed_delete_share_link(inputs)
return zh_failed_delete_share_link(inputs)
});
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Failed to fetch collections" |
*
* @param {Failed_Fetch_CollectionsInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_fetch_collections: ((inputs?: Failed_Fetch_CollectionsInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Failed_Fetch_CollectionsInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Failed_Fetch_CollectionsInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Failed_Fetch_CollectionsInputs */
const en_failed_fetch_collections = /** @type {(inputs: Failed_Fetch_CollectionsInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Failed to fetch collections`)
};
const zh_failed_fetch_collections = /** @type {(inputs: Failed_Fetch_CollectionsInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`获取收藏集失败`)
};
/**
* | output |
* | --- |
* | "Failed to fetch collections" |
*
* @param {Failed_Fetch_CollectionsInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_fetch_collections = /** @type {((inputs?: Failed_Fetch_CollectionsInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Failed_Fetch_CollectionsInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_failed_fetch_collections(inputs)
return zh_failed_fetch_collections(inputs)
});
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Failed to fetch share links" |
*
* @param {Failed_Fetch_Share_LinksInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_fetch_share_links: ((inputs?: Failed_Fetch_Share_LinksInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Failed_Fetch_Share_LinksInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Failed_Fetch_Share_LinksInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Failed_Fetch_Share_LinksInputs */
const en_failed_fetch_share_links = /** @type {(inputs: Failed_Fetch_Share_LinksInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Failed to fetch share links`)
};
const zh_failed_fetch_share_links = /** @type {(inputs: Failed_Fetch_Share_LinksInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`获取分享链接失败`)
};
/**
* | output |
* | --- |
* | "Failed to fetch share links" |
*
* @param {Failed_Fetch_Share_LinksInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_fetch_share_links = /** @type {((inputs?: Failed_Fetch_Share_LinksInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Failed_Fetch_Share_LinksInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_failed_fetch_share_links(inputs)
return zh_failed_fetch_share_links(inputs)
});
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Failed to rename collection" |
*
* @param {Failed_Rename_CollectionInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_rename_collection: ((inputs?: Failed_Rename_CollectionInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Failed_Rename_CollectionInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Failed_Rename_CollectionInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Failed_Rename_CollectionInputs */
const en_failed_rename_collection = /** @type {(inputs: Failed_Rename_CollectionInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Failed to rename collection`)
};
const zh_failed_rename_collection = /** @type {(inputs: Failed_Rename_CollectionInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`重命名收藏集失败`)
};
/**
* | output |
* | --- |
* | "Failed to rename collection" |
*
* @param {Failed_Rename_CollectionInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_rename_collection = /** @type {((inputs?: Failed_Rename_CollectionInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Failed_Rename_CollectionInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_failed_rename_collection(inputs)
return zh_failed_rename_collection(inputs)
});
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Failed to rename folder" |
*
* @param {Failed_Rename_FolderInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_rename_folder: ((inputs?: Failed_Rename_FolderInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Failed_Rename_FolderInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Failed_Rename_FolderInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Failed_Rename_FolderInputs */
const en_failed_rename_folder = /** @type {(inputs: Failed_Rename_FolderInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Failed to rename folder`)
};
const zh_failed_rename_folder = /** @type {(inputs: Failed_Rename_FolderInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`重命名文件夹失败`)
};
/**
* | output |
* | --- |
* | "Failed to rename folder" |
*
* @param {Failed_Rename_FolderInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_rename_folder = /** @type {((inputs?: Failed_Rename_FolderInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Failed_Rename_FolderInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_failed_rename_folder(inputs)
return zh_failed_rename_folder(inputs)
});
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Failed to rename share link" |
*
* @param {Failed_Rename_Share_LinkInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_rename_share_link: ((inputs?: Failed_Rename_Share_LinkInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Failed_Rename_Share_LinkInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Failed_Rename_Share_LinkInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Failed_Rename_Share_LinkInputs */
const en_failed_rename_share_link = /** @type {(inputs: Failed_Rename_Share_LinkInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Failed to rename share link`)
};
const zh_failed_rename_share_link = /** @type {(inputs: Failed_Rename_Share_LinkInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`重命名分享链接失败`)
};
/**
* | output |
* | --- |
* | "Failed to rename share link" |
*
* @param {Failed_Rename_Share_LinkInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_rename_share_link = /** @type {((inputs?: Failed_Rename_Share_LinkInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Failed_Rename_Share_LinkInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_failed_rename_share_link(inputs)
return zh_failed_rename_share_link(inputs)
});
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Failed to fetch folder children" |
*
* @param {Failed_To_Fetch_Folder_ChildrenInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_to_fetch_folder_children: ((inputs?: Failed_To_Fetch_Folder_ChildrenInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Failed_To_Fetch_Folder_ChildrenInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Failed_To_Fetch_Folder_ChildrenInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Failed_To_Fetch_Folder_ChildrenInputs */
const en_failed_to_fetch_folder_children = /** @type {(inputs: Failed_To_Fetch_Folder_ChildrenInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Failed to fetch folder children`)
};
const zh_failed_to_fetch_folder_children = /** @type {(inputs: Failed_To_Fetch_Folder_ChildrenInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`获取子文件夹失败`)
};
/**
* | output |
* | --- |
* | "Failed to fetch folder children" |
*
* @param {Failed_To_Fetch_Folder_ChildrenInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const failed_to_fetch_folder_children = /** @type {((inputs?: Failed_To_Fetch_Folder_ChildrenInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Failed_To_Fetch_Folder_ChildrenInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_failed_to_fetch_folder_children(inputs)
return zh_failed_to_fetch_folder_children(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "share link" |
*
* @param {Share_LinkInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const share_link: ((inputs?: Share_LinkInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Share_LinkInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Share_LinkInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Share_LinkInputs */
const en_share_link = /** @type {(inputs: Share_LinkInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`share link`)
};
const zh_share_link = /** @type {(inputs: Share_LinkInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`分享链接`)
};
/**
* | output |
* | --- |
* | "share link" |
*
* @param {Share_LinkInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const share_link = /** @type {((inputs?: Share_LinkInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Share_LinkInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_share_link(inputs)
return zh_share_link(inputs)
});