Skip to content

armgit / ente

Public Imported from GitHub
0

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

feat(paste): enhance PasteFooter with Ente logo and improve PasteViewPanel layout and accessibility

Aswin Asok8a0606f3abe7
diff --git a/web/apps/paste/src/features/paste/components/PasteFooter.tsx b/web/apps/paste/src/features/paste/components/PasteFooter.tsx
index 273ffb040e..b8a893b7d6 100644
--- a/web/apps/paste/src/features/paste/components/PasteFooter.tsx
+++ b/web/apps/paste/src/features/paste/components/PasteFooter.tsx
@@ -1,43 +1,99 @@
import { Box, Stack, Typography } from "@mui/material";
+import { EnteLogo } from "ente-base/components/EnteLogo";
+
+const productLinkSx = (hoverColor: string) => ({
+ color: "rgba(230, 236, 255, 0.82)",
+ fontWeight: 700,
+ fontSize: { xs: "0.74rem", sm: "0.8rem" },
+ letterSpacing: "0.03em",
+ textDecoration: "underline",
+ textDecorationColor: "rgba(230, 236, 255, 0.5)",
+ textUnderlineOffset: "3px",
+ cursor: "pointer",
+ whiteSpace: "nowrap",
+ transition: "color 180ms ease, text-decoration-color 180ms ease",
+ "&:hover": {
+ color: hoverColor,
+ textDecoration: "underline",
+ textDecorationColor: hoverColor,
+ },
+});
export const PasteFooter = () => (
- <Stack spacing={1.3} alignItems="center">
- <a
- href="https://ente.io?utm_source=paste"
+ <Stack
+ alignItems="center"
+ spacing={1.1}
+ >
+ <Box
+ component="a"
+ href="https://ente.io"
target="_blank"
rel="noopener"
- style={{
- display: "block",
+ aria-label="Ente"
+ sx={{
lineHeight: 0,
- color: "inherit",
- textDecoration: "none",
+ color: "rgba(236, 243, 255, 0.92)",
+ transition: "color 180ms ease",
+ "&:hover": {
+ color: "#08C225",
+ },
}}
>
+ <EnteLogo height={26} />
+ </Box>
+
+ <Stack
+ direction="row"
+ spacing={1}
+ alignItems="center"
+ justifyContent="center"
+ flexWrap="nowrap"
+ >
+ <Typography
+ component="a"
+ href="https://ente.io"
+ target="_blank"
+ rel="noopener"
+ sx={productLinkSx("#08C225")}
+ >
+ Photos
+ </Typography>
<Box
- component="img"
- src="/images/big3.png"
- alt="Other Ente apps"
+ component="span"
sx={{
- display: "block",
- width: { xs: 132, sm: 148 },
- maxWidth: "38vw",
- height: "auto",
+ width: 5,
+ height: 5,
+ borderRadius: "50%",
+ bgcolor: "rgba(230, 236, 255, 0.52)",
}}
/>
- </a>
-
- <Typography
- variant="mini"
- sx={{
- color: "rgba(230, 236, 255, 0.56)",
- fontWeight: 700,
- textTransform: "uppercase",
- letterSpacing: "0.06em",
- fontSize: { xs: "0.58rem", sm: "0.62rem" },
- textAlign: "center",
- }}
- >
- ENTE E2EE ECOSYSTEM
- </Typography>
+ <Typography
+ component="a"
+ href="https://ente.io/locker"
+ target="_blank"
+ rel="noopener"
+ sx={productLinkSx("#076AE2")}
+ >
+ Documents
+ </Typography>
+ <Box
+ component="span"
+ sx={{
+ width: 5,
+ height: 5,
+ borderRadius: "50%",
+ bgcolor: "rgba(230, 236, 255, 0.52)",
+ }}
+ />
+ <Typography
+ component="a"
+ href="https://ente.io/auth"
+ target="_blank"
+ rel="noopener"
+ sx={productLinkSx("#A75CFF")}
+ >
+ Auth
+ </Typography>
+ </Stack>
</Stack>
);
diff --git a/web/apps/paste/src/features/paste/components/PasteViewPanel.tsx b/web/apps/paste/src/features/paste/components/PasteViewPanel.tsx
index 8e43b4e197..173e94d070 100644
--- a/web/apps/paste/src/features/paste/components/PasteViewPanel.tsx
+++ b/web/apps/paste/src/features/paste/components/PasteViewPanel.tsx
@@ -130,7 +130,7 @@ export const PasteViewPanel = ({
</Stack>
)}
- {resolvedText && (
+ {!resolvedText && (
<Stack spacing={1.8}>
<Typography
sx={{
@@ -149,6 +149,7 @@ export const PasteViewPanel = ({
fullWidth
multiline
minRows={10}
+ maxRows={14}
value={resolvedText}
slotProps={{
htmlInput: { "aria-label": "Paste contents" },
@@ -166,6 +167,8 @@ export const PasteViewPanel = ({
{
"& .MuiFilledInput-root": {
paddingBottom: "72px",
+ maxHeight: { xs: 320, sm: 360 },
+ overflow: "hidden",
backdropFilter:
"blur(9px) saturate(112%)",
WebkitBackdropFilter:
@@ -201,26 +204,20 @@ export const PasteViewPanel = ({
right: 18,
bottom: 18,
display: "flex",
- justifyContent: "space-between",
+ justifyContent: "flex-end",
alignItems: "center",
gap: 1.2,
pointerEvents: "none",
}}
>
- <Typography
- variant="mini"
- sx={{
- color: "rgba(182, 197, 229, 0.44)",
- fontWeight: 500,
- }}
- >
- This paste has been removed from Ente servers.
- </Typography>
<Button
variant="contained"
size="small"
disableElevation
onClick={() => {
+ if (resolvedText === null) {
+ return;
+ }
void onCopyText(resolvedText).catch(() => {
// Ignore errors to avoid unhandled rejections in click handlers.
});
@@ -252,6 +249,15 @@ export const PasteViewPanel = ({
</Button>
</Box>
</Box>
+ <Typography
+ variant="mini"
+ sx={{
+ color: "rgba(182, 197, 229, 0.44)",
+ fontWeight: 500,
+ }}
+ >
+ This paste has been removed from Ente servers.
+ </Typography>
</Stack>
)}
</>