Skip to content

Commit 5bffcd8

Browse files
committed
fix: fmt
1 parent 712a1ec commit 5bffcd8

16 files changed

Lines changed: 83 additions & 38 deletions

File tree

‎app/(dashboard)/browser/content.tsx‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,7 @@ export function BrowserContent({ bucketName, keyPath = "", preview = false, prev
126126
if (!currentIds.has(id)) prevCompletedIdsRef.current.delete(id)
127127
}
128128
const completedForBucket = tasks.filter(
129-
(t) =>
130-
(t.kind === "upload" || t.kind === "delete") &&
131-
t.bucketName === bucketName &&
132-
t.status === "completed",
129+
(t) => (t.kind === "upload" || t.kind === "delete") && t.bucketName === bucketName && t.status === "completed",
133130
)
134131
const newCompletions = completedForBucket.filter((t) => !prevCompletedIdsRef.current.has(t.id))
135132
if (newCompletions.length > 0) {

‎app/(dashboard)/browser/page.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function BrowserBucketsPage() {
6363
if (!usage) {
6464
return
6565
}
66-
66+
6767
const bucketUsage = usage?.buckets_usage ?? {}
6868

6969
setData((prev) =>

‎app/site.webmanifest‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
{"name":"","short_name":"","icons":[{"src":"/rustfs/console/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/rustfs/console/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
1+
{
2+
"name": "",
3+
"short_name": "",
4+
"icons": [
5+
{ "src": "/rustfs/console/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" },
6+
{ "src": "/rustfs/console/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" }
7+
],
8+
"theme_color": "#ffffff",
9+
"background_color": "#ffffff",
10+
"display": "standalone"
11+
}

‎components/object/pdf-viewer.tsx‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ export function PdfViewer({ url }: PdfViewerProps) {
2020

2121
if (!url) {
2222
return (
23-
<div className="flex h-[70vh] items-center justify-center text-sm text-muted-foreground">{t("Preview unavailable")}</div>
23+
<div className="flex h-[70vh] items-center justify-center text-sm text-muted-foreground">
24+
{t("Preview unavailable")}
25+
</div>
2426
)
2527
}
2628

@@ -48,7 +50,9 @@ export function PdfViewer({ url }: PdfViewerProps) {
4850
setLoadError(t("Preview unavailable"))
4951
}}
5052
>
51-
<div className="flex h-full items-center justify-center p-4 text-sm text-muted-foreground">{t("Preview unavailable")}</div>
53+
<div className="flex h-full items-center justify-center p-4 text-sm text-muted-foreground">
54+
{t("Preview unavailable")}
55+
</div>
5256
</iframe>
5357
)}
5458
{loading ? (
@@ -57,7 +61,9 @@ export function PdfViewer({ url }: PdfViewerProps) {
5761
</div>
5862
) : null}
5963
<noscript>
60-
<div className="flex h-full items-center justify-center p-4 text-sm text-muted-foreground">{t("Preview unavailable")}</div>
64+
<div className="flex h-full items-center justify-center p-4 text-sm text-muted-foreground">
65+
{t("Preview unavailable")}
66+
</div>
6167
</noscript>
6268
</div>
6369
)

‎components/object/preview-modal.tsx‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,10 @@ export function ObjectPreviewModal({ show, onShowChange, object }: ObjectPreview
238238
<div ref={imageViewportRef} className="h-full w-full overflow-auto p-2">
239239
<div className="flex min-h-full min-w-full items-center justify-center">
240240
<div
241-
className={cn("shrink-0 flex items-center justify-center transition-opacity", imageLayoutReady ? "opacity-100" : "opacity-0")}
241+
className={cn(
242+
"shrink-0 flex items-center justify-center transition-opacity",
243+
imageLayoutReady ? "opacity-100" : "opacity-0",
244+
)}
242245
style={
243246
imageNaturalSize
244247
? {
@@ -252,7 +255,10 @@ export function ObjectPreviewModal({ show, onShowChange, object }: ObjectPreview
252255
src={previewUrl}
253256
alt={objectKey || t("Preview")}
254257
referrerPolicy="no-referrer"
255-
className={cn(imageNaturalSize ? "h-full w-full" : "max-h-full max-w-full", "object-contain cursor-zoom-in")}
258+
className={cn(
259+
imageNaturalSize ? "h-full w-full" : "max-h-full max-w-full",
260+
"object-contain cursor-zoom-in",
261+
)}
256262
onLoad={(event) => {
257263
const nextSize = {
258264
width: event.currentTarget.naturalWidth || event.currentTarget.clientWidth,

‎components/theme/logo.tsx‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,5 @@ export function ThemeLogo({ alt, onError, ...props }: ThemeLogoProps) {
1515
const theme = getThemeManifest()
1616
const src = resolvedTheme === "dark" ? logoDark : logoLight
1717

18-
return (
19-
<Image
20-
{...props}
21-
src={src}
22-
alt={alt ?? theme.brand.name}
23-
onError={onError}
24-
/>
25-
)
18+
return <Image {...props} src={src} alt={alt ?? theme.brand.name} onError={onError} />
2619
}

‎components/user/change-password.tsx‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,14 @@ export function ChangePassword({ visible, onVisibleChange }: ChangePasswordProps
7272
return
7373
}
7474
const userInfo = (await api.get("/accountinfo")) as { account_name?: string }
75-
await createUser({
76-
accessKey: userInfo?.account_name ?? "",
77-
secretKey: newSecretKey,
78-
status: "enabled",
79-
}, { suppress403Redirect: true })
75+
await createUser(
76+
{
77+
accessKey: userInfo?.account_name ?? "",
78+
secretKey: newSecretKey,
79+
status: "enabled",
80+
},
81+
{ suppress403Redirect: true },
82+
)
8083
message.success(t("Updated successfully"))
8184
closeModal()
8285
} catch (error) {

‎components/user/edit/groups.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ export function UserEditGroups({ value, options, disabled = false, onChange }: U
5959
<CommandGroup>
6060
{options.map((option) => (
6161
<CommandItem key={option.value} value={option.label} onSelect={() => toggleGroup(option.value)}>
62-
<RiCheckLine className={cn("me-2 size-4", value.includes(option.value) ? "opacity-100" : "opacity-0")} />
62+
<RiCheckLine
63+
className={cn("me-2 size-4", value.includes(option.value) ? "opacity-100" : "opacity-0")}
64+
/>
6365
<span>{option.label}</span>
6466
</CommandItem>
6567
))}

‎components/user/edit/policies.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ export function UserEditPolicies({ value, options, disabled = false, onChange }:
5959
<CommandGroup>
6060
{options.map((option) => (
6161
<CommandItem key={option.value} value={option.label} onSelect={() => togglePolicy(option.value)}>
62-
<RiCheckLine className={cn("me-2 size-4", value.includes(option.value) ? "opacity-100" : "opacity-0")} />
62+
<RiCheckLine
63+
className={cn("me-2 size-4", value.includes(option.value) ? "opacity-100" : "opacity-0")}
64+
/>
6365
<span>{option.label}</span>
6466
</CommandItem>
6567
))}

‎contexts/api-context.tsx‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,15 @@ export function ApiProvider({ children }: { children: React.ReactNode }) {
8282
return () => {
8383
cancelled = true
8484
}
85-
}, [isAuthenticated, credentials?.AccessKeyId, credentials?.SecretAccessKey, credentials?.SessionToken, logout, pathname, router])
85+
}, [
86+
isAuthenticated,
87+
credentials?.AccessKeyId,
88+
credentials?.SecretAccessKey,
89+
credentials?.SessionToken,
90+
logout,
91+
pathname,
92+
router,
93+
])
8694

8795
return <ApiContext.Provider value={{ api: apiClient, isReady }}>{children}</ApiContext.Provider>
8896
}

0 commit comments

Comments
 (0)