Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Center empty state messages vertically in sidebars

Anand Baburajan56aff9879dd4
diff --git a/web/packages/gallery/components/viewer/CommentsSidebar.tsx b/web/packages/gallery/components/viewer/CommentsSidebar.tsx
index 10929553e1..62748aead6 100644
--- a/web/packages/gallery/components/viewer/CommentsSidebar.tsx
+++ b/web/packages/gallery/components/viewer/CommentsSidebar.tsx
@@ -1672,8 +1672,12 @@ const LoadingContainer = styled(Box)(() => ({
}));
const EmptyMessage = styled(Typography)(({ theme }) => ({
- textAlign: "center",
- padding: "48px 0",
+ display: "flex",
+ justifyContent: "center",
+ alignItems: "center",
+ height: "100%",
+ // Offset for header (marginBottom: 48) + padding diff (32-24=8) = 56, halved
+ marginTop: -28,
color: "#666",
...theme.applyStyles("dark", { color: "rgba(255, 255, 255, 0.5)" }),
}));
diff --git a/web/packages/gallery/components/viewer/FeedSidebar.tsx b/web/packages/gallery/components/viewer/FeedSidebar.tsx
index ce33a433e9..eaf90560ff 100644
--- a/web/packages/gallery/components/viewer/FeedSidebar.tsx
+++ b/web/packages/gallery/components/viewer/FeedSidebar.tsx
@@ -964,8 +964,12 @@ const LoadingContainer = styled(Box)(() => ({
}));
const EmptyStateText = styled(Typography)(({ theme }) => ({
- textAlign: "center",
+ display: "flex",
+ justifyContent: "center",
+ alignItems: "center",
+ height: "100%",
+ // Offset for header (marginBottom: 48) + padding diff (32-24=8) = 56, halved
+ marginTop: -28,
color: "#666",
- padding: "48px 0",
...theme.applyStyles("dark", { color: "rgba(255, 255, 255, 0.6)" }),
}));
diff --git a/web/packages/gallery/components/viewer/LikesSidebar.tsx b/web/packages/gallery/components/viewer/LikesSidebar.tsx
index e2f31ceedb..ae15ddccea 100644
--- a/web/packages/gallery/components/viewer/LikesSidebar.tsx
+++ b/web/packages/gallery/components/viewer/LikesSidebar.tsx
@@ -720,8 +720,12 @@ const LoadingContainer = styled(Box)(() => ({
}));
const EmptyMessage = styled(Typography)(({ theme }) => ({
- textAlign: "center",
- padding: "48px 0",
+ display: "flex",
+ justifyContent: "center",
+ alignItems: "center",
+ height: "100%",
+ // Offset for header (marginBottom: 48) + padding diff (32-24=8) = 56, halved
+ marginTop: -28,
color: "#666",
...theme.applyStyles("dark", { color: "rgba(255, 255, 255, 0.5)" }),
}));