mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2025-12-17 03:43:46 +03:00
tsc fixes
This commit is contained in:
@@ -131,6 +131,8 @@ export const repositorySchema = z.object({
|
||||
"skipped",
|
||||
"deleting",
|
||||
"deleted",
|
||||
"syncing",
|
||||
"synced",
|
||||
])
|
||||
.default("imported"),
|
||||
lastMirrored: z.coerce.date().optional().nullable(),
|
||||
@@ -157,6 +159,8 @@ export const mirrorJobSchema = z.object({
|
||||
"skipped",
|
||||
"deleting",
|
||||
"deleted",
|
||||
"syncing",
|
||||
"synced",
|
||||
])
|
||||
.default("imported"),
|
||||
message: z.string(),
|
||||
@@ -191,6 +195,8 @@ export const organizationSchema = z.object({
|
||||
"skipped",
|
||||
"deleting",
|
||||
"deleted",
|
||||
"syncing",
|
||||
"synced",
|
||||
])
|
||||
.default("imported"),
|
||||
lastMirrored: z.coerce.date().optional().nullable(),
|
||||
|
||||
@@ -194,7 +194,7 @@ export async function apiRequest<T>(
|
||||
}
|
||||
}
|
||||
|
||||
export const getStatusColor = (status: RepoStatus): string => {
|
||||
export const getStatusColor = (status: string): string => {
|
||||
switch (status) {
|
||||
case "imported":
|
||||
return "bg-blue-500"; // Info/primary-like
|
||||
@@ -208,6 +208,12 @@ export const getStatusColor = (status: RepoStatus): string => {
|
||||
return "bg-indigo-500"; // Sync in progress
|
||||
case "synced":
|
||||
return "bg-teal-500"; // Sync complete
|
||||
case "skipped":
|
||||
return "bg-gray-500"; // Skipped
|
||||
case "deleting":
|
||||
return "bg-orange-500"; // Deleting
|
||||
case "deleted":
|
||||
return "bg-gray-600"; // Deleted
|
||||
default:
|
||||
return "bg-gray-400"; // Unknown/neutral
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user