diff --git a/src/components/dashboard/Dashboard.tsx b/src/components/dashboard/Dashboard.tsx index d4674ca..d8d9112 100644 --- a/src/components/dashboard/Dashboard.tsx +++ b/src/components/dashboard/Dashboard.tsx @@ -193,7 +193,7 @@ export function Dashboard() {
{Array.from({ length: 3 }).map((_, i) => ( - + ))}
@@ -206,7 +206,7 @@ export function Dashboard() {
{Array.from({ length: 3 }).map((_, i) => ( - + ))}
@@ -254,12 +254,11 @@ export function Dashboard() {
- +
- {/* the api already sends 10 activities only but slicing in case of realtime updates */} - +
diff --git a/src/components/dashboard/RecentActivity.tsx b/src/components/dashboard/RecentActivity.tsx index b3b52c7..89f95fc 100644 --- a/src/components/dashboard/RecentActivity.tsx +++ b/src/components/dashboard/RecentActivity.tsx @@ -16,27 +16,27 @@ export function RecentActivity({ activities }: RecentActivityProps) { View All - +
{activities.length === 0 ? (

No recent activity

) : ( activities.map((activity, index) => ( -
-
+
+
-
-

+

+
{activity.message} -

-

+

+
{formatDate(activity.timestamp)} -

+
)) diff --git a/src/components/dashboard/RepositoryList.tsx b/src/components/dashboard/RepositoryList.tsx index ecc5ee6..dab4b66 100644 --- a/src/components/dashboard/RepositoryList.tsx +++ b/src/components/dashboard/RepositoryList.tsx @@ -47,14 +47,13 @@ export function RepositoryList({ repositories }: RepositoryListProps) { return ( - {/* calculating the max height based non the other elements and sizing styles */} Repositories - + {repositories.length === 0 ? (
@@ -71,89 +70,80 @@ export function RepositoryList({ repositories }: RepositoryListProps) { {repositories.map((repo, index) => (
-
-
-

{repo.name}

- {repo.isPrivate && ( - - Private - - )} - {repo.isForked && ( - - Fork - - )} -
-
- - {repo.owner} - - {repo.organization && ( - - • {repo.organization} - - )} -
-
- -
+
- - {/* setting the minimum width to 3rem corresponding to the largest status (mirrored) so that all are left alligned */} - {repo.status} - +
+
+
+

{repo.name}

+ {repo.isPrivate && ( + + Private + + )} + {repo.isForked && ( + + Fork + + )} +
+
+ {repo.owner} + {repo.organization && ( + <> + / + {repo.organization} + + )} +
+
+ + + {repo.status} + + +
{(() => { const giteaUrl = getGiteaRepoUrl(repo); + const giteaEnabled = giteaUrl && ['mirrored', 'synced'].includes(repo.status); - // Determine tooltip based on status and configuration - let tooltip: string; - if (!giteaConfig?.url) { - tooltip = "Gitea not configured"; - } else if (repo.status === 'imported') { - tooltip = "Repository not yet mirrored to Gitea"; - } else if (repo.status === 'failed') { - tooltip = "Repository mirroring failed"; - } else if (repo.status === 'mirroring') { - tooltip = "Repository is being mirrored to Gitea"; - } else if (giteaUrl) { - tooltip = "View on Gitea"; - } else { - tooltip = "Gitea repository not available"; - } - - return giteaUrl ? ( - ) : ( - ); })()} -