+ {/* Header with org name and badges */}
+
+
+
+
+ {StatusIcon && }
+ {statusBadge.label}
+
+
+
+
- {/* Destination override section */}
-
-
handleUpdateDestination(org.id!, newDestination)}
- isUpdating={isLoading}
- />
+ {/* Destination override section */}
+
+ handleUpdateDestination(org.id!, newDestination)}
+ isUpdating={isLoading}
+ />
+
+
+
+ {/* Desktop Layout */}
+
+ {/* Header with org icon, name, role badge and status */}
+
+
+
+ {/* Status badge */}
+
+ {StatusIcon && }
+ {statusBadge.label}
+
+
+
+ {/* Destination override section */}
+
+ handleUpdateDestination(org.id!, newDestination)}
+ isUpdating={isLoading}
+ />
+
+
+ {/* Repository statistics */}
+
+
+
+ {org.repositoryCount}
+
+ {org.repositoryCount === 1 ? "repository" : "repositories"}
+
+
+
+ {/* Repository breakdown */}
+ {isLoading || (org.status === "mirroring" && org.publicRepositoryCount === undefined) ? (
+
+
+
+
+ ) : (
+
+ {org.publicRepositoryCount !== undefined && (
+
+
+
+ {org.publicRepositoryCount} public
+
+
+ )}
+ {org.privateRepositoryCount !== undefined && org.privateRepositoryCount > 0 && (
+
+
+
+ {org.privateRepositoryCount} private
+
+
+ )}
+
+ )}
-
- {StatusIcon && }
- {statusBadge.label}
-
-
-
-
- {org.repositoryCount}{" "}
- {org.repositoryCount === 1 ? "repository" : "repositories"}
-
-
- {/* Always render this section to prevent layout shift */}
-
- {isLoading || (org.status === "mirroring" && org.publicRepositoryCount === undefined) ? (
- <>
-
-
- >
- ) : (
- <>
- {org.publicRepositoryCount !== undefined ? (
-
-
- {org.publicRepositoryCount} public
-
- ) : null}
- {org.privateRepositoryCount !== undefined && org.privateRepositoryCount > 0 ? (
-
-
- {org.privateRepositoryCount} private
-
- ) : null}
- {org.forkRepositoryCount !== undefined && org.forkRepositoryCount > 0 ? (
-
-
- {org.forkRepositoryCount} fork{org.forkRepositoryCount !== 1 ? 's' : ''}
-
- ) : null}
- {/* Show a placeholder if no counts are available to maintain height */}
- {org.publicRepositoryCount === undefined &&
- org.privateRepositoryCount === undefined &&
- org.forkRepositoryCount === undefined && (
-
Loading counts...
- )}
- >
- )}
-
-
-
-
+ {/* Mobile Actions */}
+
{org.status === "imported" && (
)}
{org.status === "mirroring" && (
-
-
-
+
+
{(() => {
const giteaUrl = getGiteaOrgUrl(org);
@@ -337,34 +388,166 @@ export function OrganizationList({
}
return giteaUrl ? (
-
+
-
+
+ Gitea
) : (
-
+
+ Gitea
);
})()}
-
+
-
+
+ GitHub
+
+ {/* Desktop Actions */}
+
+
+ {org.status === "imported" && (
+
org.id && onMirror({ orgId: org.id })}
+ disabled={isLoading}
+ >
+ {isLoading ? (
+ <>
+
+ Starting mirror...
+ >
+ ) : (
+ <>
+
+ Mirror Organization
+ >
+ )}
+
+ )}
+
+ {org.status === "mirroring" && (
+
+
+ Mirroring in progress...
+
+ )}
+
+ {org.status === "mirrored" && (
+
+
+ Successfully mirrored
+
+ )}
+
+ {org.status === "failed" && (
+
org.id && onMirror({ orgId: org.id })}
+ disabled={isLoading}
+ >
+ {isLoading ? (
+ <>
+
+ Retrying...
+ >
+ ) : (
+ <>
+
+ Retry Mirror
+ >
+ )}
+
+ )}
+
+
+
+ {(() => {
+ const giteaUrl = getGiteaOrgUrl(org);
+
+ // Determine tooltip based on status and configuration
+ let tooltip: string;
+ if (!giteaConfig?.url) {
+ tooltip = "Gitea not configured";
+ } else if (org.status === 'imported') {
+ tooltip = "Organization not yet mirrored to Gitea";
+ } else if (org.status === 'failed') {
+ tooltip = "Organization mirroring failed";
+ } else if (org.status === 'mirroring') {
+ tooltip = "Organization is being mirrored to Gitea";
+ } else if (giteaUrl) {
+ tooltip = "View on Gitea";
+ } else {
+ tooltip = "Gitea organization not available";
+ }
+
+ return (
+
+ );
+ })()}
+
+
);
})}
diff --git a/src/components/repositories/Repository.tsx b/src/components/repositories/Repository.tsx
index 53912a9..22e746c 100644
--- a/src/components/repositories/Repository.tsx
+++ b/src/components/repositories/Repository.tsx
@@ -752,18 +752,16 @@ export default function Repository() {
- {selectedRepoIds.size === 0 && (
-
0}
- title="Mirror all repositories"
- className="h-10 w-10 shrink-0"
- >
-
-
- )}
+
0}
+ title="Mirror all repositories"
+ className="h-10 w-10 shrink-0"
+ >
+
+
{/* Desktop: Original layout */}
@@ -844,24 +842,80 @@ export default function Repository() {
+
+ {/* Bulk actions on desktop - integrated into the same line */}
+
+ {selectedRepoIds.size === 0 ? (
+
0}
+ className="whitespace-nowrap"
+ >
+
+ Mirror All
+
+ ) : (
+ <>
+
+
+ {selectedRepoIds.size} selected
+
+ setSelectedRepoIds(new Set())}
+ >
+
+
+
+
+ {availableActions.includes('mirror') && (
+
0}
+ >
+
+ Mirror ({selectedRepoIds.size})
+
+ )}
+
+ {availableActions.includes('sync') && (
+
0}
+ >
+
+ Sync ({selectedRepoIds.size})
+
+ )}
+
+ {availableActions.includes('retry') && (
+
0}
+ >
+
+ Retry
+
+ )}
+ >
+ )}
+