Skip to content

armgit / ente

Public Imported from GitHub
0

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

Center copy button vertically in single-line copyable fields

anandbaburajana16185e9e214
diff --git a/web/apps/locker/src/components/file-share/CopyableField.tsx b/web/apps/locker/src/components/file-share/CopyableField.tsx
index fe730dccda..fa90a80a27 100644
--- a/web/apps/locker/src/components/file-share/CopyableField.tsx
+++ b/web/apps/locker/src/components/file-share/CopyableField.tsx
@@ -59,8 +59,9 @@ export const CopyableField: React.FC<CopyableFieldProps> = ({
onClick={() => onCopy(value)}
sx={{
position: "absolute",
- top: 8,
+ top: multiline ? 8 : "50%",
right: 8,
+ transform: multiline ? "none" : "translateY(-50%)",
color: "#757575",
"&:hover": {
bgcolor: "rgba(0, 0, 0, 0.04)",
diff --git a/web/apps/locker/src/components/file-share/FileShareView.tsx b/web/apps/locker/src/components/file-share/FileShareView.tsx
index d8bad6300c..8b83ef58ff 100644
--- a/web/apps/locker/src/components/file-share/FileShareView.tsx
+++ b/web/apps/locker/src/components/file-share/FileShareView.tsx
@@ -1,9 +1,4 @@
-import {
- Box,
- Button,
- CircularProgress,
- Typography,
-} from "@mui/material";
+import { Box, Button, CircularProgress, Typography } from "@mui/material";
import { Notification } from "ente-new/photos/components/Notification";
import Head from "next/head";
import React from "react";
@@ -62,7 +57,7 @@ export const FileShareView: React.FC = () => {
},
}}
>
- {/* Ente Logo */}
+ {/* Ente Locker Logo */}
<Box
sx={{
mt: { xs: 5, md: 6 },
@@ -80,7 +75,7 @@ export const FileShareView: React.FC = () => {
<img
src="/images/ente-locker.svg"
alt="Ente Locker"
- style={{ height: "52px", cursor: "pointer" }}
+ style={{ height: "56px", cursor: "pointer" }}
/>
</a>
</Box>
@@ -157,11 +152,10 @@ export const FileShareView: React.FC = () => {
{/* Large File Icon */}
<Box
sx={{
- backgroundColor:
- getLockerFileIcon(
- fileInfo.fileName,
- fileInfo.lockerType,
- ).backgroundColor,
+ backgroundColor: getLockerFileIcon(
+ fileInfo.fileName,
+ fileInfo.lockerType,
+ ).backgroundColor,
borderRadius: "20px",
padding: 1.8,
display: "flex",