chore: format files

This commit is contained in:
Nicolas Meienberger
2025-11-26 22:52:05 +01:00
parent 60f37076a8
commit 150b4f6e89
14 changed files with 3303 additions and 3468 deletions

View File

@@ -237,8 +237,7 @@ export const CreateRepositoryForm = ({
</SelectContent> </SelectContent>
</Select> </Select>
<FormDescription> <FormDescription>
Choose whether to use Zerobyte's master password or enter a custom password for the existing Choose whether to use Zerobyte's master password or enter a custom password for the existing repository.
repository.
</FormDescription> </FormDescription>
</FormItem> </FormItem>

View File

@@ -67,7 +67,7 @@ export const SnapshotFileBrowser = (props: Props) => {
const addBasePath = useCallback( const addBasePath = useCallback(
(displayPath: string): string => { (displayPath: string): string => {
let vbp = volumeBasePath === "/" ? "" : volumeBasePath; const vbp = volumeBasePath === "/" ? "" : volumeBasePath;
if (!vbp) return displayPath; if (!vbp) return displayPath;
if (displayPath === "/") return vbp; if (displayPath === "/") return vbp;

View File

@@ -158,7 +158,10 @@ export default function Notifications({ loaderData }: Route.ComponentProps) {
<TableCell className="font-medium text-strong-accent">{notification.name}</TableCell> <TableCell className="font-medium text-strong-accent">{notification.name}</TableCell>
<TableCell className="capitalize">{notification.type}</TableCell> <TableCell className="capitalize">{notification.type}</TableCell>
<TableCell className="text-center"> <TableCell className="text-center">
<StatusDot variant={notification.enabled ? "success" : "neutral"} label={notification.enabled ? "Enabled" : "Disabled"} /> <StatusDot
variant={notification.enabled ? "success" : "neutral"}
label={notification.enabled ? "Enabled" : "Disabled"}
/>
</TableCell> </TableCell>
</TableRow> </TableRow>
)) ))

View File

@@ -107,10 +107,7 @@ export const RestoreSnapshotForm = ({ formId, onSubmit, className }: Props) => {
className="h-auto p-0 text-sm font-normal" className="h-auto p-0 text-sm font-normal"
> >
Advanced Advanced
<ChevronDown <ChevronDown size={16} className={`ml-1 transition-transform ${showAdvanced ? "rotate-180" : ""}`} />
size={16}
className={`ml-1 transition-transform ${showAdvanced ? "rotate-180" : ""}`}
/>
</Button> </Button>
{showAdvanced && ( {showAdvanced && (

View File

@@ -32,12 +32,12 @@ export const RepositoryInfoTabContent = ({ repository }: Props) => {
<div className="text-sm font-medium text-muted-foreground">Created At</div> <div className="text-sm font-medium text-muted-foreground">Created At</div>
<p className="mt-1 text-sm">{new Date(repository.createdAt * 1000).toLocaleString()}</p> <p className="mt-1 text-sm">{new Date(repository.createdAt * 1000).toLocaleString()}</p>
</div> </div>
<div> <div>
<div className="text-sm font-medium text-muted-foreground">Last Checked</div> <div className="text-sm font-medium text-muted-foreground">Last Checked</div>
<p className="mt-1 text-sm"> <p className="mt-1 text-sm">
{repository.lastChecked ? new Date(repository.lastChecked * 1000).toLocaleString() : "Never"} {repository.lastChecked ? new Date(repository.lastChecked * 1000).toLocaleString() : "Never"}
</p> </p>
</div> </div>
</div> </div>
</div> </div>
{repository.lastError && ( {repository.lastError && (

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -651,4 +651,3 @@
"indexes": {} "indexes": {}
} }
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,125 +1,125 @@
{ {
"version": "7", "version": "7",
"dialect": "sqlite", "dialect": "sqlite",
"entries": [ "entries": [
{ {
"idx": 0, "idx": 0,
"version": "6", "version": "6",
"when": 1755765658194, "when": 1755765658194,
"tag": "0000_known_madelyne_pryor", "tag": "0000_known_madelyne_pryor",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 1, "idx": 1,
"version": "6", "version": "6",
"when": 1755775437391, "when": 1755775437391,
"tag": "0001_far_frank_castle", "tag": "0001_far_frank_castle",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 2, "idx": 2,
"version": "6", "version": "6",
"when": 1756930554198, "when": 1756930554198,
"tag": "0002_cheerful_randall", "tag": "0002_cheerful_randall",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 3, "idx": 3,
"version": "6", "version": "6",
"when": 1758653407064, "when": 1758653407064,
"tag": "0003_mature_hellcat", "tag": "0003_mature_hellcat",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 4, "idx": 4,
"version": "6", "version": "6",
"when": 1758961535488, "when": 1758961535488,
"tag": "0004_wealthy_tomas", "tag": "0004_wealthy_tomas",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 5, "idx": 5,
"version": "6", "version": "6",
"when": 1759416698274, "when": 1759416698274,
"tag": "0005_simple_alice", "tag": "0005_simple_alice",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 6, "idx": 6,
"version": "6", "version": "6",
"when": 1760734377440, "when": 1760734377440,
"tag": "0006_secret_micromacro", "tag": "0006_secret_micromacro",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 7, "idx": 7,
"version": "6", "version": "6",
"when": 1761224911352, "when": 1761224911352,
"tag": "0007_watery_sersi", "tag": "0007_watery_sersi",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 8, "idx": 8,
"version": "6", "version": "6",
"when": 1761414054481, "when": 1761414054481,
"tag": "0008_silent_lady_bullseye", "tag": "0008_silent_lady_bullseye",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 9, "idx": 9,
"version": "6", "version": "6",
"when": 1762095226041, "when": 1762095226041,
"tag": "0009_little_adam_warlock", "tag": "0009_little_adam_warlock",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 10, "idx": 10,
"version": "6", "version": "6",
"when": 1762610065889, "when": 1762610065889,
"tag": "0010_perfect_proemial_gods", "tag": "0010_perfect_proemial_gods",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 11, "idx": 11,
"version": "6", "version": "6",
"when": 1763644043601, "when": 1763644043601,
"tag": "0011_familiar_stone_men", "tag": "0011_familiar_stone_men",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 12, "idx": 12,
"version": "6", "version": "6",
"when": 1764100562084, "when": 1764100562084,
"tag": "0012_add_short_ids", "tag": "0012_add_short_ids",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 13, "idx": 13,
"version": "6", "version": "6",
"when": 1764182159797, "when": 1764182159797,
"tag": "0013_elite_sprite", "tag": "0013_elite_sprite",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 14, "idx": 14,
"version": "6", "version": "6",
"when": 1764182405089, "when": 1764182405089,
"tag": "0014_wild_echo", "tag": "0014_wild_echo",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 15, "idx": 15,
"version": "6", "version": "6",
"when": 1764182465287, "when": 1764182465287,
"tag": "0015_jazzy_sersi", "tag": "0015_jazzy_sersi",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 16, "idx": 16,
"version": "6", "version": "6",
"when": 1764193182689, "when": 1764193182689,
"tag": "0016_fix-timestamps-to-seconds", "tag": "0016_fix-timestamps-to-seconds",
"breakpoints": true "breakpoints": true
} }
] ]
} }

View File

@@ -134,7 +134,10 @@ export class AuthService {
* Clean up expired sessions * Clean up expired sessions
*/ */
async cleanupExpiredSessions() { async cleanupExpiredSessions() {
const result = await db.delete(sessionsTable).where(lt(sessionsTable.expiresAt, Math.floor(Date.now() / 1000))).returning(); const result = await db
.delete(sessionsTable)
.where(lt(sessionsTable.expiresAt, Math.floor(Date.now() / 1000)))
.returning();
if (result.length > 0) { if (result.length > 0) {
logger.info(`Cleaned up ${result.length} expired sessions`); logger.info(`Cleaned up ${result.length} expired sessions`);
} }

View File

@@ -209,7 +209,12 @@ const executeBackup = async (scheduleId: number, manual = false) => {
await db await db
.update(backupSchedulesTable) .update(backupSchedulesTable)
.set({ lastBackupStatus: "in_progress", updatedAt: Math.floor(Date.now() / 1000), lastBackupError: null, nextBackupAt }) .set({
lastBackupStatus: "in_progress",
updatedAt: Math.floor(Date.now() / 1000),
lastBackupError: null,
nextBackupAt,
})
.where(eq(backupSchedulesTable.id, scheduleId)); .where(eq(backupSchedulesTable.id, scheduleId));
const abortController = new AbortController(); const abortController = new AbortController();