mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2025-12-10 21:46:45 +03:00
added details
This commit is contained in:
@@ -209,6 +209,7 @@ export function OrganizationList({
|
|||||||
{statusBadge.label}
|
{statusBadge.label}
|
||||||
</Badge>
|
</Badge>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<span
|
<span
|
||||||
className={`text-xs px-2 py-0.5 rounded-full capitalize ${
|
className={`text-xs px-2 py-0.5 rounded-full capitalize ${
|
||||||
@@ -220,6 +221,28 @@ export function OrganizationList({
|
|||||||
{org.membershipRole}
|
{org.membershipRole}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="text-xs text-muted-foreground">
|
||||||
|
<span className="font-semibold">{org.repositoryCount}</span>
|
||||||
|
<span className="ml-1">repos</span>
|
||||||
|
{/* Repository breakdown for mobile - only show non-zero counts */}
|
||||||
|
{(() => {
|
||||||
|
const parts = [];
|
||||||
|
if (org.publicRepositoryCount && org.publicRepositoryCount > 0) {
|
||||||
|
parts.push(`${org.publicRepositoryCount}pub`);
|
||||||
|
}
|
||||||
|
if (org.privateRepositoryCount && org.privateRepositoryCount > 0) {
|
||||||
|
parts.push(`${org.privateRepositoryCount}priv`);
|
||||||
|
}
|
||||||
|
if (org.forkRepositoryCount && org.forkRepositoryCount > 0) {
|
||||||
|
parts.push(`${org.forkRepositoryCount}fork`);
|
||||||
|
}
|
||||||
|
|
||||||
|
return parts.length > 0 ? (
|
||||||
|
<span className="ml-1">({parts.join('/')})</span>
|
||||||
|
) : null;
|
||||||
|
})()}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Destination override section */}
|
{/* Destination override section */}
|
||||||
@@ -288,19 +311,29 @@ export function OrganizationList({
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Repository breakdown - TODO: Add these properties to Organization type */}
|
{/* Repository breakdown - only show non-zero counts */}
|
||||||
{/* Commented out until repository count breakdown is available
|
{(() => {
|
||||||
{isLoading || (org.status === "mirroring") ? (
|
const counts = [];
|
||||||
<div className="flex items-center gap-3">
|
if (org.publicRepositoryCount && org.publicRepositoryCount > 0) {
|
||||||
<Skeleton className="h-4 w-20" />
|
counts.push(`${org.publicRepositoryCount} public`);
|
||||||
<Skeleton className="h-4 w-20" />
|
}
|
||||||
<Skeleton className="h-4 w-20" />
|
if (org.privateRepositoryCount && org.privateRepositoryCount > 0) {
|
||||||
|
counts.push(`${org.privateRepositoryCount} private`);
|
||||||
|
}
|
||||||
|
if (org.forkRepositoryCount && org.forkRepositoryCount > 0) {
|
||||||
|
counts.push(`${org.forkRepositoryCount} ${org.forkRepositoryCount === 1 ? 'fork' : 'forks'}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
return counts.length > 0 ? (
|
||||||
|
<div className="flex items-center gap-3 text-xs text-muted-foreground">
|
||||||
|
{counts.map((count, index) => (
|
||||||
|
<span key={index} className={index > 0 ? "border-l pl-3" : ""}>
|
||||||
|
{count}
|
||||||
|
</span>
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : null;
|
||||||
<div className="flex items-center gap-3">
|
})()}
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
*/}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -222,6 +222,9 @@ export const organizationSchema = z.object({
|
|||||||
lastMirrored: z.coerce.date().optional().nullable(),
|
lastMirrored: z.coerce.date().optional().nullable(),
|
||||||
errorMessage: z.string().optional().nullable(),
|
errorMessage: z.string().optional().nullable(),
|
||||||
repositoryCount: z.number().default(0),
|
repositoryCount: z.number().default(0),
|
||||||
|
publicRepositoryCount: z.number().optional(),
|
||||||
|
privateRepositoryCount: z.number().optional(),
|
||||||
|
forkRepositoryCount: z.number().optional(),
|
||||||
createdAt: z.coerce.date(),
|
createdAt: z.coerce.date(),
|
||||||
updatedAt: z.coerce.date(),
|
updatedAt: z.coerce.date(),
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user