From 47796713236945be234b571ed9d40ad6482cd9a7 Mon Sep 17 00:00:00 2001 From: Daniel Luiz Alves Date: Fri, 18 Jul 2025 01:17:54 -0300 Subject: [PATCH 1/4] feat: add QR code functionality for share links - Introduced a new QrCodeModal component to display and download QR codes for shared links. - Updated share management to include functionality for viewing QR codes. - Enhanced the GenerateShareLinkModal to include QR code generation and download options. - Updated UI components to support QR code viewing and downloading in share details and recent shares sections. - Added translations and improved user experience for share link generation and QR code interactions. --- apps/web/messages/en-US.json | 57 ++-- apps/web/package.json | 1 + apps/web/pnpm-lock.yaml | 19 ++ .../shares/components/shares-modals.tsx | 13 + .../components/shares-table-container.tsx | 1 + .../dashboard/components/recent-shares.tsx | 1 + .../app/dashboard/modals/dashboard-modals.tsx | 13 + .../modals/generate-share-link-modal.tsx | 109 ++++++- apps/web/src/components/modals/index.ts | 13 + .../src/components/modals/qr-code-modal.tsx | 103 +++++++ .../components/modals/share-details-modal.tsx | 289 ++++++++++++------ .../src/components/tables/shares-table.tsx | 9 + apps/web/src/hooks/use-share-manager.ts | 5 + 13 files changed, 504 insertions(+), 129 deletions(-) create mode 100644 apps/web/src/components/modals/index.ts create mode 100644 apps/web/src/components/modals/qr-code-modal.tsx diff --git a/apps/web/messages/en-US.json b/apps/web/messages/en-US.json index 6561b00..f75cffc 100644 --- a/apps/web/messages/en-US.json +++ b/apps/web/messages/en-US.json @@ -318,16 +318,21 @@ "generateShareLink": { "generateTitle": "Generate Share Link", "updateTitle": "Update Share Link", - "generateDescription": "Generate a link to share your files", - "updateDescription": "Update the alias for this share link", - "aliasPlaceholder": "Enter alias", - "linkReady": "Your share link is ready:", + "generateDescription": "Generate a custom link for this share. You can customize the URL to make it more memorable.", + "updateDescription": "Update the custom link for this share. You can customize the URL to make it more memorable.", + "aliasPlaceholder": "Custom ID for link", + "linkReady": "Your share link is ready. You can copy it now.", + "readyDescription": "Your share link is ready. You can scan the QR code directly, download it for later use, or copy the link below.", "generateButton": "Generate Link", "updateButton": "Update Link", "copyButton": "Copy Link", "success": "Link generated successfully", "error": "Failed to generate link", - "copied": "Link copied to clipboard" + "copied": "Link copied to clipboard", + "tabs": { + "link": "Link", + "qrcode": "QR Code" + } }, "home": { "description": "The open-source alternative to WeTransfer. Share files securely, without tracking or limitations.", @@ -1206,34 +1211,36 @@ }, "shareDetails": { "title": "Share Details", - "subtitle": "Detailed information about this share", + "subtitle": "View and manage details for this share", "basicInfo": "Basic Information", "name": "Name", "description": "Description", - "noDescription": "No description provided", - "untitled": "Untitled", "shareLink": "Share Link", - "editLink": "Edit Link", - "generateLink": "Generate Link", - "noLink": "No link generated yet", - "copyLink": "Copy link", - "openLink": "Open in new tab", - "linkCopied": "Link copied to clipboard", - "views": "Views", "dates": "Dates", + "security": "Security", + "files": "Files", + "recipients": "Recipients", + "views": "Views", "created": "Created", "expires": "Expires", "never": "Never", - "security": "Security", - "editSecurity": "Edit Security", - "editExpiration": "Edit Expiration", + "untitled": "Untitled Share", + "noDescription": "No description", + "notAvailable": "N/A", + "invalidDate": "Invalid date", "passwordProtected": "Password Protected", "publicAccess": "Public Access", "maxViews": "Max Views:", - "files": "Files", - "recipients": "Recipients", - "notAvailable": "N/A", - "invalidDate": "Invalid date", + "noLink": "No link generated", + "generateLink": "Generate Link", + "editLink": "Edit Link", + "copyLink": "Copy Link", + "openLink": "Open Link", + "editSecurity": "Edit Security", + "editExpiration": "Edit Expiration", + "qrCode": "QR Code", + "downloadQrCode": "Download QR Code", + "clickToEnlargeQrCode": "Click to enlarge QR Code", "loadError": "Failed to load share details" }, "shareExpiration": { @@ -1419,6 +1426,7 @@ "generateLink": "Generate Link", "editLink": "Edit Link", "copyLink": "Copy Link", + "viewQrCode": "View QR Code", "notifyRecipients": "Notify Recipients", "downloadShareFiles": "Download All Files", "delete": "Delete" @@ -1453,6 +1461,11 @@ "dark": "Dark", "system": "System" }, + "qrCodeModal": { + "title": "Share QR Code", + "description": "Scan this QR code to access the shared files.", + "download": "Download QR Code" + }, "twoFactor": { "title": "Two-Factor Authentication", "description": "Add an extra layer of security to your account", diff --git a/apps/web/package.json b/apps/web/package.json index b8b71af..cd0daa7 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -70,6 +70,7 @@ "react-hook-form": "^7.59.0", "react-icons": "^5.5.0", "react-image-crop": "^11.0.10", + "react-qr-code": "^2.0.18", "react-qr-reader": "3.0.0-beta-1", "sonner": "^2.0.5", "tailwind-merge": "^3.3.1", diff --git a/apps/web/pnpm-lock.yaml b/apps/web/pnpm-lock.yaml index 6a18b40..cc70497 100644 --- a/apps/web/pnpm-lock.yaml +++ b/apps/web/pnpm-lock.yaml @@ -128,6 +128,9 @@ importers: react-image-crop: specifier: ^11.0.10 version: 11.0.10(react@19.1.0) + react-qr-code: + specifier: ^2.0.18 + version: 2.0.18(react@19.1.0) react-qr-reader: specifier: 3.0.0-beta-1 version: 3.0.0-beta-1(react-dom@19.1.0(react@19.1.0))(react@19.1.0) @@ -2544,6 +2547,9 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} + qr.js@0.0.0: + resolution: {integrity: sha512-c4iYnWb+k2E+vYpRimHqSu575b1/wKl4XFeJGpFmrJQz5I88v9aY2czh7s0w36srfCM1sXgC/xpoJz5dJfq+OQ==} + qrcode@1.5.4: resolution: {integrity: sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==} engines: {node: '>=10.13.0'} @@ -2591,6 +2597,11 @@ packages: react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} + react-qr-code@2.0.18: + resolution: {integrity: sha512-v1Jqz7urLMhkO6jkgJuBYhnqvXagzceg3qJUWayuCK/c6LTIonpWbwxR1f1APGd4xrW/QcQEovNrAojbUz65Tg==} + peerDependencies: + react: '*' + react-qr-reader@3.0.0-beta-1: resolution: {integrity: sha512-5HeFH9x/BlziRYQYGK2AeWS9WiKYZtGGMs9DXy3bcySTX3C9UJL9EwcPnWw8vlf7JP4FcrAlr1SnZ5nsWLQGyw==} peerDependencies: @@ -5451,6 +5462,8 @@ snapshots: punycode@2.3.1: {} + qr.js@0.0.0: {} + qrcode@1.5.4: dependencies: dijkstrajs: 1.0.3 @@ -5491,6 +5504,12 @@ snapshots: react-is@16.13.1: {} + react-qr-code@2.0.18(react@19.1.0): + dependencies: + prop-types: 15.8.1 + qr.js: 0.0.0 + react: 19.1.0 + react-qr-reader@3.0.0-beta-1(react-dom@19.1.0(react@19.1.0))(react@19.1.0): dependencies: '@zxing/browser': 0.0.7(@zxing/library@0.18.6) diff --git a/apps/web/src/app/(shares)/shares/components/shares-modals.tsx b/apps/web/src/app/(shares)/shares/components/shares-modals.tsx index cf250ad..e136a8c 100644 --- a/apps/web/src/app/(shares)/shares/components/shares-modals.tsx +++ b/apps/web/src/app/(shares)/shares/components/shares-modals.tsx @@ -4,6 +4,7 @@ import { useTranslations } from "next-intl"; import { CreateShareModal } from "@/components/modals/create-share-modal"; import { DeleteConfirmationModal } from "@/components/modals/delete-confirmation-modal"; import { GenerateShareLinkModal } from "@/components/modals/generate-share-link-modal"; +import { QrCodeModal } from "@/components/modals/qr-code-modal"; import { ShareActionsModals } from "@/components/modals/share-actions-modals"; import { ShareDetailsModal } from "@/components/modals/share-details-modal"; import { ShareExpirationModal } from "@/components/modals/share-expiration-modal"; @@ -30,6 +31,11 @@ export function SharesModals({ onSuccess(); }; + const getShareLink = (share: any) => { + if (!share?.alias?.alias) return ""; + return `${window.location.origin}/s/${share.alias.alias}`; + }; + return ( <> @@ -51,6 +57,13 @@ export function SharesModals({ onEditFile={fileManager.handleRename} /> + shareManager.setShareToViewQrCode(null)} + shareLink={getShareLink(shareManager.shareToViewQrCode)} + shareName={shareManager.shareToViewQrCode?.name || "Share"} + /> + shareManager.setSharesToDelete(null)} diff --git a/apps/web/src/app/(shares)/shares/components/shares-table-container.tsx b/apps/web/src/app/(shares)/shares/components/shares-table-container.tsx index 66fd75f..9b1061c 100644 --- a/apps/web/src/app/(shares)/shares/components/shares-table-container.tsx +++ b/apps/web/src/app/(shares)/shares/components/shares-table-container.tsx @@ -20,6 +20,7 @@ export function SharesTableContainer({ shares, onCopyLink, onCreateShare, shareM onManageFiles={shareManager.setShareToManageFiles} onManageRecipients={shareManager.setShareToManageRecipients} onNotifyRecipients={shareManager.handleNotifyRecipients} + onViewQrCode={shareManager.setShareToViewQrCode} onViewDetails={shareManager.setShareToViewDetails} setClearSelectionCallback={shareManager.setClearSelectionCallback} /> diff --git a/apps/web/src/app/dashboard/components/recent-shares.tsx b/apps/web/src/app/dashboard/components/recent-shares.tsx index 08affd5..299be9a 100644 --- a/apps/web/src/app/dashboard/components/recent-shares.tsx +++ b/apps/web/src/app/dashboard/components/recent-shares.tsx @@ -62,6 +62,7 @@ export function RecentShares({ shares, shareManager, onOpenCreateModal, onCopyLi onManageFiles={shareManager.setShareToManageFiles} onManageRecipients={shareManager.setShareToManageRecipients} onNotifyRecipients={shareManager.handleNotifyRecipients} + onViewQrCode={shareManager.setShareToViewQrCode} onViewDetails={shareManager.setShareToViewDetails} setClearSelectionCallback={shareManager.setClearSelectionCallback} /> diff --git a/apps/web/src/app/dashboard/modals/dashboard-modals.tsx b/apps/web/src/app/dashboard/modals/dashboard-modals.tsx index 10fe0ca..d63bd4f 100644 --- a/apps/web/src/app/dashboard/modals/dashboard-modals.tsx +++ b/apps/web/src/app/dashboard/modals/dashboard-modals.tsx @@ -7,6 +7,7 @@ import { DeleteConfirmationModal } from "@/components/modals/delete-confirmation import { FileActionsModals } from "@/components/modals/file-actions-modals"; import { FilePreviewModal } from "@/components/modals/file-preview-modal"; import { GenerateShareLinkModal } from "@/components/modals/generate-share-link-modal"; +import { QrCodeModal } from "@/components/modals/qr-code-modal"; import { ShareActionsModals } from "@/components/modals/share-actions-modals"; import { ShareDetailsModal } from "@/components/modals/share-details-modal"; import { ShareExpirationModal } from "@/components/modals/share-expiration-modal"; @@ -25,6 +26,11 @@ export function DashboardModals({ modals, fileManager, shareManager, onSuccess } onSuccess(); }; + const getShareLink = (share: any) => { + if (!share?.alias?.alias) return ""; + return `${window.location.origin}/s/${share.alias.alias}`; + }; + return ( <> @@ -144,6 +150,13 @@ export function DashboardModals({ modals, fileManager, shareManager, onSuccess } onGenerate={shareManager.handleGenerateLink} onSuccess={onSuccess} /> + + shareManager.setShareToViewQrCode(null)} + shareLink={getShareLink(shareManager.shareToViewQrCode)} + shareName={shareManager.shareToViewQrCode?.name || "Share"} + /> ); } diff --git a/apps/web/src/components/modals/generate-share-link-modal.tsx b/apps/web/src/components/modals/generate-share-link-modal.tsx index 85d88bc..0221272 100644 --- a/apps/web/src/components/modals/generate-share-link-modal.tsx +++ b/apps/web/src/components/modals/generate-share-link-modal.tsx @@ -1,8 +1,9 @@ "use client"; import { useEffect, useState } from "react"; -import { IconCopy } from "@tabler/icons-react"; +import { IconCopy, IconDownload } from "@tabler/icons-react"; import { useTranslations } from "next-intl"; +import QRCode from "react-qr-code"; import { toast } from "sonner"; import { Button } from "@/components/ui/button"; @@ -33,6 +34,7 @@ export function GenerateShareLinkModal({ const [isLoading, setIsLoading] = useState(false); const [generatedLink, setGeneratedLink] = useState(""); const [isEdit, setIsEdit] = useState(false); + const [isDownloading, setIsDownloading] = useState(false); useEffect(() => { if (shareId && share?.alias?.alias) { @@ -68,9 +70,56 @@ export function GenerateShareLinkModal({ toast.success(t("generateShareLink.copied")); }; + const downloadQRCode = () => { + setIsDownloading(true); + + // Get the SVG element + const svg = document.getElementById("share-link-qr-code"); + if (!svg) { + setIsDownloading(false); + return; + } + + // Create a canvas + const canvas = document.createElement("canvas"); + const ctx = canvas.getContext("2d"); + + // Set dimensions (with some padding) + const padding = 20; + canvas.width = 256 + padding * 2; + canvas.height = 256 + padding * 2; + + // Fill white background + if (ctx) { + ctx.fillStyle = "#FFFFFF"; + ctx.fillRect(0, 0, canvas.width, canvas.height); + + // Convert SVG to data URL + const svgData = new XMLSerializer().serializeToString(svg); + const img = new Image(); + + img.onload = () => { + // Draw the image in the center of the canvas with padding + ctx.drawImage(img, padding, padding, 256, 256); + + // Create a download link + const link = document.createElement("a"); + link.download = `${share?.name?.replace(/[^a-z0-9]/gi, "-").toLowerCase() || "share"}-qr-code.png`; + link.href = canvas.toDataURL("image/png"); + link.click(); + + setIsDownloading(false); + }; + + img.src = `data:image/svg+xml;base64,${btoa(svgData)}`; + } else { + setIsDownloading(false); + } + }; + return ( onClose()}> - + {isEdit ? t("generateShareLink.updateTitle") : t("generateShareLink.generateTitle")} @@ -88,23 +137,55 @@ export function GenerateShareLinkModal({ /> ) : ( -
-

{t("generateShareLink.linkReady")}

- +
+

+ {t("generateShareLink.readyDescription", { + defaultValue: + "Your share link is ready. You can scan the QR code directly, download it for later use, or copy the link below.", + })} +

+
+
+ +
+
+ +
+
+ + +
+
+ + + +
)} - - {!generatedLink ? ( + {!generatedLink && ( + - ) : ( - - )} - + + )}
); diff --git a/apps/web/src/components/modals/index.ts b/apps/web/src/components/modals/index.ts new file mode 100644 index 0000000..df3d2f6 --- /dev/null +++ b/apps/web/src/components/modals/index.ts @@ -0,0 +1,13 @@ +export { QrCodeModal } from "./qr-code-modal"; +export { UploadFileModal } from "./upload-file-modal"; +export { CreateShareModal } from "./create-share-modal"; +export { ShareSecurityModal } from "./share-security-modal"; +export { ShareFileModal } from "./share-file-modal"; +export { ShareMultipleFilesModal } from "./share-multiple-files-modal"; +export { ShareDetailsModal } from "./share-details-modal"; +export { FilePreviewModal } from "./file-preview-modal"; +export { GenerateShareLinkModal } from "./generate-share-link-modal"; +export { ImageEditModal } from "./image-edit-modal"; +export { DeleteConfirmationModal } from "./delete-confirmation-modal"; +export { BulkDownloadModal } from "./bulk-download-modal"; +export { ShareExpirationModal } from "./share-expiration-modal"; diff --git a/apps/web/src/components/modals/qr-code-modal.tsx b/apps/web/src/components/modals/qr-code-modal.tsx new file mode 100644 index 0000000..52cc634 --- /dev/null +++ b/apps/web/src/components/modals/qr-code-modal.tsx @@ -0,0 +1,103 @@ +import { useState } from "react"; +import { IconDownload } from "@tabler/icons-react"; +import { useTranslations } from "next-intl"; +import QRCode from "react-qr-code"; + +import { Button } from "@/components/ui/button"; +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from "@/components/ui/dialog"; + +interface QrCodeModalProps { + isOpen: boolean; + onClose: () => void; + shareLink: string; + shareName: string; +} + +export function QrCodeModal({ isOpen, onClose, shareLink, shareName }: QrCodeModalProps) { + const t = useTranslations(); + const [isDownloading, setIsDownloading] = useState(false); + + const downloadQRCode = () => { + setIsDownloading(true); + + // Get the SVG element + const svg = document.getElementById("share-qr-code"); + if (!svg) { + setIsDownloading(false); + return; + } + + // Create a canvas + const canvas = document.createElement("canvas"); + const ctx = canvas.getContext("2d"); + + // Set dimensions (with some padding) + const padding = 20; + canvas.width = 256 + padding * 2; + canvas.height = 256 + padding * 2; + + // Fill white background + if (ctx) { + ctx.fillStyle = "#FFFFFF"; + ctx.fillRect(0, 0, canvas.width, canvas.height); + + // Convert SVG to data URL + const svgData = new XMLSerializer().serializeToString(svg); + const img = new Image(); + + img.onload = () => { + // Draw the image in the center of the canvas with padding + ctx.drawImage(img, padding, padding, 256, 256); + + // Create a download link + const link = document.createElement("a"); + link.download = `${shareName.replace(/[^a-z0-9]/gi, "-").toLowerCase()}-qr-code.png`; + link.href = canvas.toDataURL("image/png"); + link.click(); + + setIsDownloading(false); + }; + + img.src = `data:image/svg+xml;base64,${btoa(svgData)}`; + } else { + setIsDownloading(false); + } + }; + + return ( + !open && onClose()}> + + + {t("qrCodeModal.title", { defaultValue: "Share QR Code" })} + + {t("qrCodeModal.description", { defaultValue: "Scan this QR code to access the shared files." })} + + + +
+
+ +
+

{shareLink}

+
+ + + + + +
+
+ ); +} diff --git a/apps/web/src/components/modals/share-details-modal.tsx b/apps/web/src/components/modals/share-details-modal.tsx index 355c552..7c24fca 100644 --- a/apps/web/src/components/modals/share-details-modal.tsx +++ b/apps/web/src/components/modals/share-details-modal.tsx @@ -4,6 +4,7 @@ import { useCallback, useEffect, useRef, useState } from "react"; import { IconCheck, IconCopy, + IconDownload, IconEdit, IconExternalLink, IconLock, @@ -13,6 +14,7 @@ import { } from "@tabler/icons-react"; import { format } from "date-fns"; import { useTranslations } from "next-intl"; +import QRCode from "react-qr-code"; import { toast } from "sonner"; import { Badge } from "@/components/ui/badge"; @@ -30,6 +32,7 @@ import { Loader } from "@/components/ui/loader"; import { getShare } from "@/http/endpoints"; import { getFileIcon } from "@/utils/file-icons"; import { GenerateShareLinkModal } from "./generate-share-link-modal"; +import { QrCodeModal } from "./qr-code-modal"; import { ShareExpirationModal } from "./share-expiration-modal"; import { ShareSecurityModal } from "./share-security-modal"; @@ -86,6 +89,8 @@ export function ShareDetailsModal({ const [showLinkModal, setShowLinkModal] = useState(false); const [showSecurityModal, setShowSecurityModal] = useState(false); const [showExpirationModal, setShowExpirationModal] = useState(false); + const [showQrCodeModal, setShowQrCodeModal] = useState(false); + const [isDownloading, setIsDownloading] = useState(false); const inputRef = useRef(null); const loadShareDetails = useCallback(async () => { @@ -209,6 +214,53 @@ export function ShareDetailsModal({ } }; + const downloadQRCode = () => { + setIsDownloading(true); + + // Get the SVG element + const svg = document.getElementById("share-details-qr-code"); + if (!svg) { + setIsDownloading(false); + return; + } + + // Create a canvas + const canvas = document.createElement("canvas"); + const ctx = canvas.getContext("2d"); + + // Set dimensions (with some padding) + const padding = 20; + canvas.width = 200 + padding * 2; + canvas.height = 200 + padding * 2; + + // Fill white background + if (ctx) { + ctx.fillStyle = "#FFFFFF"; + ctx.fillRect(0, 0, canvas.width, canvas.height); + + // Convert SVG to data URL + const svgData = new XMLSerializer().serializeToString(svg); + const img = new Image(); + + img.onload = () => { + // Draw the image in the center of the canvas with padding + ctx.drawImage(img, padding, padding, 200, 200); + + // Create a download link + const link = document.createElement("a"); + link.download = `${share?.name?.replace(/[^a-z0-9]/gi, "-").toLowerCase() || "share"}-qr-code.png`; + link.href = canvas.toDataURL("image/png"); + link.click(); + + setIsDownloading(false); + }; + + img.src = `data:image/svg+xml;base64,${btoa(svgData)}`; + } else { + setIsDownloading(false); + } + }; + const handleLinkGenerated = async () => { setShowLinkModal(false); await loadShareDetails(); @@ -258,7 +310,7 @@ export function ShareDetailsModal({
-

{share.viewCount || 0}

+

{share.views || 0}

{t("shareDetails.views")}

@@ -271,105 +323,148 @@ export function ShareDetailsModal({
-
-
-

{t("shareDetails.basicInfo")}

+
+ {/* Basic Information */} +
+
+

{t("shareDetails.basicInfo")}

+
+ +
+
+ + {onUpdateName && !isEditingName && ( + + )} +
+ {isEditingName ? ( +
+ setEditValue(e.target.value)} + onKeyDown={handleKeyDown} + className="h-8 flex-1 text-sm" + onClick={(e) => e.stopPropagation()} + /> + + +
+ ) : ( + {displayName || t("shareDetails.untitled")} + )} +
+ +
+
+ + {onUpdateDescription && !isEditingDescription && ( + + )} +
+ {isEditingDescription ? ( +
+ setEditValue(e.target.value)} + onKeyDown={handleKeyDown} + className="h-8 flex-1 text-sm" + placeholder={t("shareDetails.noDescription")} + onClick={(e) => e.stopPropagation()} + /> + + +
+ ) : ( + {displayDescription || t("shareDetails.noDescription")} + )} +
-
-
- - {onUpdateName && !isEditingName && ( + {/* QR Code */} + {shareLink && ( +
+
+

setShowQrCodeModal(true)} + > + {t("shareDetails.qrCode", { defaultValue: "QR Code" })} +

- )} -
- {isEditingName ? ( -
- setEditValue(e.target.value)} - onKeyDown={handleKeyDown} - className="h-8 flex-1 text-sm" - onClick={(e) => e.stopPropagation()} - /> - -
- ) : ( - {displayName || t("shareDetails.untitled")} - )} -
- -
-
- - {onUpdateDescription && !isEditingDescription && ( - - )} -
- {isEditingDescription ? ( -
- setEditValue(e.target.value)} - onKeyDown={handleKeyDown} - className="h-8 flex-1 text-sm" - placeholder={t("shareDetails.noDescription")} - onClick={(e) => e.stopPropagation()} - /> - - + +
- ) : ( - {displayDescription || t("shareDetails.noDescription")} - )} -
+
+ )}
@@ -556,16 +651,16 @@ export function ShareDetailsModal({ - {showLinkModal && onGenerateLink && ( + {showLinkModal && shareId && ( setShowLinkModal(false)} - onGenerate={onGenerateLink} onSuccess={handleLinkGenerated} + onGenerate={onGenerateLink || (() => Promise.resolve())} /> )} - {showSecurityModal && ( + {showSecurityModal && shareId && onUpdateSecurity && ( )} - {showExpirationModal && ( + {showExpirationModal && shareId && onUpdateExpiration && ( )} + {showQrCodeModal && shareLink && ( + setShowQrCodeModal(false)} + shareLink={shareLink} + shareName={share?.name || "Share"} + /> + )} ); } diff --git a/apps/web/src/components/tables/shares-table.tsx b/apps/web/src/components/tables/shares-table.tsx index 0cb1801..3053d68 100644 --- a/apps/web/src/components/tables/shares-table.tsx +++ b/apps/web/src/components/tables/shares-table.tsx @@ -12,6 +12,7 @@ import { IconLock, IconLockOpen, IconMail, + IconQrcode, IconTrash, IconUsers, IconX, @@ -46,6 +47,7 @@ export interface SharesTableProps { onGenerateLink: (share: any) => void; onCopyLink: (share: any) => void; onNotifyRecipients: (share: any) => void; + onViewQrCode?: (share: any) => void; onDownloadShareFiles?: (share: any) => void; onBulkDelete?: (shares: any[]) => void; onBulkDownload?: (shares: any[]) => void; @@ -66,6 +68,7 @@ export function SharesTable({ onGenerateLink, onCopyLink, onNotifyRecipients, + onViewQrCode, onDownloadShareFiles, onBulkDelete, onBulkDownload, @@ -604,6 +607,12 @@ export function SharesTable({ {t("sharesTable.actions.copyLink")} )} + {share.alias && onViewQrCode && ( + onViewQrCode(share)}> + + {t("sharesTable.actions.viewQrCode", { defaultValue: "View QR Code" })} + + )} {share.recipients?.length > 0 && share.alias && smtpEnabled === "true" && ( onNotifyRecipients(share)}> diff --git a/apps/web/src/hooks/use-share-manager.ts b/apps/web/src/hooks/use-share-manager.ts index 4ee928f..40f2e4c 100644 --- a/apps/web/src/hooks/use-share-manager.ts +++ b/apps/web/src/hooks/use-share-manager.ts @@ -24,6 +24,7 @@ export interface ShareManagerHook { shareToManageExpiration: Share | null; shareToViewDetails: Share | null; shareToGenerateLink: Share | null; + shareToViewQrCode: Share | null; sharesToDelete: Share[] | null; setShareToDelete: (share: Share | null) => void; setShareToEdit: (share: Share | null) => void; @@ -33,6 +34,7 @@ export interface ShareManagerHook { setShareToManageExpiration: (share: Share | null) => void; setShareToViewDetails: (share: Share | null) => void; setShareToGenerateLink: (share: Share | null) => void; + setShareToViewQrCode: (share: Share | null) => void; setSharesToDelete: (shares: Share[] | null) => void; handleDelete: (shareId: string) => Promise; handleBulkDelete: (shares: Share[]) => void; @@ -62,6 +64,7 @@ export function useShareManager(onSuccess: () => void) { const [shareToManageExpiration, setShareToManageExpiration] = useState(null); const [shareToViewDetails, setShareToViewDetails] = useState(null); const [shareToGenerateLink, setShareToGenerateLink] = useState(null); + const [shareToViewQrCode, setShareToViewQrCode] = useState(null); const [sharesToDelete, setSharesToDelete] = useState(null); const [clearSelectionCallback, setClearSelectionCallbackState] = useState<(() => void) | null>(null); @@ -308,6 +311,7 @@ export function useShareManager(onSuccess: () => void) { shareToManageExpiration, shareToViewDetails, shareToGenerateLink, + shareToViewQrCode, sharesToDelete, setShareToDelete, setShareToEdit, @@ -317,6 +321,7 @@ export function useShareManager(onSuccess: () => void) { setShareToManageExpiration, setShareToViewDetails, setShareToGenerateLink, + setShareToViewQrCode, setSharesToDelete, handleDelete, handleBulkDelete, From 6fb55005d41cdb36186ef8a1fd66a307f1ded4e3 Mon Sep 17 00:00:00 2001 From: Daniel Luiz Alves Date: Fri, 18 Jul 2025 01:50:33 -0300 Subject: [PATCH 2/4] feat: enhance reverse share functionality with QR code support - Added QR code viewing and downloading capabilities in the reverse shares section. - Updated UI components to include QR code options in share details and cards. - Introduced new state management for handling QR code visibility. - Enhanced translations for QR code interactions across multiple languages. --- apps/web/messages/ar-SA.json | 14 +- apps/web/messages/de-DE.json | 14 +- apps/web/messages/en-US.json | 26 +-- apps/web/messages/es-ES.json | 14 +- apps/web/messages/fr-FR.json | 14 +- apps/web/messages/hi-IN.json | 14 +- apps/web/messages/it-IT.json | 14 +- apps/web/messages/ja-JP.json | 14 +- apps/web/messages/ko-KR.json | 14 +- apps/web/messages/nl-NL.json | 14 +- apps/web/messages/pl-PL.json | 14 +- apps/web/messages/pt-BR.json | 14 +- apps/web/messages/ru-RU.json | 14 +- apps/web/messages/tr-TR.json | 14 +- apps/web/messages/zh-CN.json | 20 +-- apps/web/package.json | 2 +- .../components/reverse-share-card.tsx | 28 +++- .../reverse-share-details-modal.tsx | 152 +++++++++++++----- .../reverse-shares-cards-container.tsx | 3 + .../components/reverse-shares-modals.tsx | 19 +++ .../hooks/use-reverse-shares.ts | 3 + .../src/app/(shares)/reverse-shares/page.tsx | 6 + .../modals/generate-share-link-modal.tsx | 4 +- .../src/components/modals/qr-code-modal.tsx | 2 +- apps/web/tsconfig.json | 25 +-- 25 files changed, 295 insertions(+), 177 deletions(-) diff --git a/apps/web/messages/ar-SA.json b/apps/web/messages/ar-SA.json index f32fa70..c481e8b 100644 --- a/apps/web/messages/ar-SA.json +++ b/apps/web/messages/ar-SA.json @@ -355,6 +355,12 @@ "stats": "{iconCount} أيقونة من {libraryCount} مكتبة", "categoryBadge": "{category} ({count} أيقونات)" }, + "imageEdit": { + "title": "تعديل الصورة", + "rotate": "تدوير", + "zoom": "تكبير/تصغير", + "cropInstructions": "اسحب لإعادة تحديد الموضع، غير حجم الزوايا لضبط منطقة القص" + }, "login": { "welcome": "مرحبا بك", "signInToContinue": "قم بتسجيل الدخول للمتابعة", @@ -1721,11 +1727,5 @@ "passwordRequired": "كلمة المرور مطلوبة", "nameRequired": "الاسم مطلوب", "required": "هذا الحقل مطلوب" - }, - "imageEdit": { - "title": "تعديل الصورة", - "rotate": "تدوير", - "zoom": "تكبير/تصغير", - "cropInstructions": "اسحب لإعادة تحديد الموضع، غير حجم الزوايا لضبط منطقة القص" } -} \ No newline at end of file +} diff --git a/apps/web/messages/de-DE.json b/apps/web/messages/de-DE.json index 5a2256c..7fc1dbc 100644 --- a/apps/web/messages/de-DE.json +++ b/apps/web/messages/de-DE.json @@ -355,6 +355,12 @@ "stats": "{iconCount} Symbole aus {libraryCount} Bibliotheken", "categoryBadge": "{category} ({count} Symbole)" }, + "imageEdit": { + "title": "Bild bearbeiten", + "rotate": "Drehen", + "zoom": "Zoom", + "cropInstructions": "Ziehen Sie, um die Position zu ändern, ändern Sie die Größe der Ecken, um die Zuschneidefläche anzupassen" + }, "login": { "welcome": "Willkommen zu", "signInToContinue": "Melden Sie sich an, um fortzufahren", @@ -1719,11 +1725,5 @@ "passwordRequired": "Passwort ist erforderlich", "nameRequired": "Name ist erforderlich", "required": "Dieses Feld ist erforderlich" - }, - "imageEdit": { - "title": "Bild bearbeiten", - "rotate": "Drehen", - "zoom": "Zoom", - "cropInstructions": "Ziehen Sie, um die Position zu ändern, ändern Sie die Größe der Ecken, um die Zuschneidefläche anzupassen" } -} \ No newline at end of file +} diff --git a/apps/web/messages/en-US.json b/apps/web/messages/en-US.json index f75cffc..03415d1 100644 --- a/apps/web/messages/en-US.json +++ b/apps/web/messages/en-US.json @@ -360,6 +360,12 @@ "stats": "{iconCount} icons from {libraryCount} libraries", "categoryBadge": "{category} ({count} icons)" }, + "imageEdit": { + "title": "Edit Image", + "rotate": "Rotate", + "zoom": "Zoom", + "cropInstructions": "Drag to reposition, resize corners to adjust crop area" + }, "login": { "welcome": "Welcome to", "signInToContinue": "Sign in to continue", @@ -405,12 +411,6 @@ "navigation": { "dashboard": "Dashboard" }, - "imageEdit": { - "title": "Edit Image", - "rotate": "Rotate", - "zoom": "Zoom", - "cropInstructions": "Drag to reposition, resize corners to adjust crop area" - }, "profile": { "password": { "title": "Change Password", @@ -453,6 +453,11 @@ }, "pageTitle": "Profile" }, + "qrCodeModal": { + "title": "Share QR Code", + "description": "Scan this QR code to access the link.", + "download": "Download QR Code" + }, "quickAccess": { "files": { "title": "My Files", @@ -618,6 +623,7 @@ "expired": "Expired", "expires": "Expires", "viewDetails": "View details", + "viewQrCode": "View QR Code", "copyLink": "Copy Link", "openInNewTab": "Open in New Tab", "editLink": "Edit Link", @@ -640,7 +646,8 @@ "viewDetails": "View Details", "edit": "Edit", "delete": "Delete", - "viewFiles": "Received Files" + "viewFiles": "Received Files", + "viewQrCode": "View QR Code" }, "empty": { "title": "No receive links created", @@ -1461,11 +1468,6 @@ "dark": "Dark", "system": "System" }, - "qrCodeModal": { - "title": "Share QR Code", - "description": "Scan this QR code to access the shared files.", - "download": "Download QR Code" - }, "twoFactor": { "title": "Two-Factor Authentication", "description": "Add an extra layer of security to your account", diff --git a/apps/web/messages/es-ES.json b/apps/web/messages/es-ES.json index 1ecc726..89dd137 100644 --- a/apps/web/messages/es-ES.json +++ b/apps/web/messages/es-ES.json @@ -355,6 +355,12 @@ "stats": "{iconCount} iconos de {libraryCount} bibliotecas", "categoryBadge": "{category} ({count} iconos)" }, + "imageEdit": { + "title": "Editar Imagen", + "rotate": "Rotar", + "zoom": "Zoom", + "cropInstructions": "Arrastra para reubicar, ajusta las esquinas para ajustar el área de recorte" + }, "login": { "welcome": "Bienvenido a", "signInToContinue": "Inicia sesión para continuar", @@ -1719,11 +1725,5 @@ "passwordRequired": "Se requiere la contraseña", "nameRequired": "El nombre es obligatorio", "required": "Este campo es obligatorio" - }, - "imageEdit": { - "title": "Editar Imagen", - "rotate": "Rotar", - "zoom": "Zoom", - "cropInstructions": "Arrastra para reubicar, ajusta las esquinas para ajustar el área de recorte" } -} \ No newline at end of file +} diff --git a/apps/web/messages/fr-FR.json b/apps/web/messages/fr-FR.json index 585d972..0d256bc 100644 --- a/apps/web/messages/fr-FR.json +++ b/apps/web/messages/fr-FR.json @@ -355,6 +355,12 @@ "stats": "{iconCount} icônes de {libraryCount} bibliothèques", "categoryBadge": "{category} ({count} icônes)" }, + "imageEdit": { + "title": "Modifier l'Image", + "rotate": "Tourner", + "zoom": "Zoom", + "cropInstructions": "Glisser pour répositionner, redimensionner les coins pour ajuster la zone de découpe" + }, "login": { "welcome": "Bienvenue à", "signInToContinue": "Connectez-vous pour continuer", @@ -1719,11 +1725,5 @@ "passwordRequired": "Le mot de passe est requis", "nameRequired": "Nome é obrigatório", "required": "Este campo é obrigatório" - }, - "imageEdit": { - "title": "Modifier l'Image", - "rotate": "Tourner", - "zoom": "Zoom", - "cropInstructions": "Glisser pour répositionner, redimensionner les coins pour ajuster la zone de découpe" } -} \ No newline at end of file +} diff --git a/apps/web/messages/hi-IN.json b/apps/web/messages/hi-IN.json index bb479d7..48cca92 100644 --- a/apps/web/messages/hi-IN.json +++ b/apps/web/messages/hi-IN.json @@ -355,6 +355,12 @@ "stats": "{libraryCount} लाइब्रेरी से {iconCount} आइकन", "categoryBadge": "{category} ({count} आइकन)" }, + "imageEdit": { + "title": "छवि संपादित करें", + "rotate": "घुमाएं", + "zoom": "ज़ूम", + "cropInstructions": "छवि को पुनः स्थानांतरित करने के लिए खींचें, कोणों को समायोजित करने के लिए आकार बदलें" + }, "login": { "welcome": "स्वागत है में", "signInToContinue": "जारी रखने के लिए साइन इन करें", @@ -1719,11 +1725,5 @@ "passwordRequired": "पासवर्ड आवश्यक है", "nameRequired": "नाम आवश्यक है", "required": "यह फ़ील्ड आवश्यक है" - }, - "imageEdit": { - "title": "छवि संपादित करें", - "rotate": "घुमाएं", - "zoom": "ज़ूम", - "cropInstructions": "छवि को पुनः स्थानांतरित करने के लिए खींचें, कोणों को समायोजित करने के लिए आकार बदलें" } -} \ No newline at end of file +} diff --git a/apps/web/messages/it-IT.json b/apps/web/messages/it-IT.json index 041b677..d0ec4f4 100644 --- a/apps/web/messages/it-IT.json +++ b/apps/web/messages/it-IT.json @@ -355,6 +355,12 @@ "stats": "{iconCount} icone da {libraryCount} librerie", "categoryBadge": "{category} ({count} icone)" }, + "imageEdit": { + "title": "Modifica Immagine", + "rotate": "Ruota", + "zoom": "Zoom", + "cropInstructions": "Trascina per riposizionare, ridimensiona gli angoli per adattare l'area di ritaglio" + }, "login": { "welcome": "Benvenuto in", "signInToContinue": "Accedi per continuare", @@ -1719,11 +1725,5 @@ "passwordMinLength": "La password deve contenere almeno 6 caratteri", "nameRequired": "Il nome è obbligatorio", "required": "Questo campo è obbligatorio" - }, - "imageEdit": { - "title": "Modifica Immagine", - "rotate": "Ruota", - "zoom": "Zoom", - "cropInstructions": "Trascina per riposizionare, ridimensiona gli angoli per adattare l'area di ritaglio" } -} \ No newline at end of file +} diff --git a/apps/web/messages/ja-JP.json b/apps/web/messages/ja-JP.json index fc8e686..3df2325 100644 --- a/apps/web/messages/ja-JP.json +++ b/apps/web/messages/ja-JP.json @@ -355,6 +355,12 @@ "stats": "{libraryCount}ライブラリから{iconCount}個のアイコン", "categoryBadge": "{category}({count}個のアイコン)" }, + "imageEdit": { + "title": "画像を編集", + "rotate": "回転", + "zoom": "ズーム", + "cropInstructions": "位置を変更するにはドラッグし、カット領域を調整するには角をリサイズしてください" + }, "login": { "welcome": "ようこそへ", "signInToContinue": "続行するにはサインインしてください", @@ -1719,11 +1725,5 @@ "passwordRequired": "パスワードは必須です", "nameRequired": "名前は必須です", "required": "このフィールドは必須です" - }, - "imageEdit": { - "title": "画像を編集", - "rotate": "回転", - "zoom": "ズーム", - "cropInstructions": "位置を変更するにはドラッグし、カット領域を調整するには角をリサイズしてください" } -} \ No newline at end of file +} diff --git a/apps/web/messages/ko-KR.json b/apps/web/messages/ko-KR.json index dfc4ace..60013d9 100644 --- a/apps/web/messages/ko-KR.json +++ b/apps/web/messages/ko-KR.json @@ -355,6 +355,12 @@ "stats": "{libraryCount}개의 라이브러리에서 {iconCount}개의 아이콘", "categoryBadge": "{category} ({count}개의 아이콘)" }, + "imageEdit": { + "title": "이미지 편집", + "rotate": "회전", + "zoom": "확대/축소", + "cropInstructions": "위치를 변경하려면 드래그하고, 자르기 영역을 조정하려면 모서리를 확대/축소하세요" + }, "login": { "welcome": "에 오신 것을 환영합니다", "signInToContinue": "계속하려면 로그인하세요", @@ -1719,11 +1725,5 @@ "passwordRequired": "비밀번호는 필수입니다", "nameRequired": "이름은 필수입니다", "required": "이 필드는 필수입니다" - }, - "imageEdit": { - "title": "이미지 편집", - "rotate": "회전", - "zoom": "확대/축소", - "cropInstructions": "위치를 변경하려면 드래그하고, 자르기 영역을 조정하려면 모서리를 확대/축소하세요" } -} \ No newline at end of file +} diff --git a/apps/web/messages/nl-NL.json b/apps/web/messages/nl-NL.json index 3377abc..3ac924e 100644 --- a/apps/web/messages/nl-NL.json +++ b/apps/web/messages/nl-NL.json @@ -355,6 +355,12 @@ "stats": "{iconCount} pictogrammen van {libraryCount} bibliotheken", "categoryBadge": "{category} ({count} pictogrammen)" }, + "imageEdit": { + "title": "Afbeelding bewerken", + "rotate": "Draai", + "zoom": "Vergroot", + "cropInstructions": "Sleep om te herpositioneren, verander de grootte van de hoeken om de uitsnijdgebied aan te passen" + }, "login": { "welcome": "Welkom bij", "signInToContinue": "Log in om door te gaan", @@ -1719,11 +1725,5 @@ "passwordMinLength": "Wachtwoord moet minimaal 6 tekens bevatten", "nameRequired": "Naam is verplicht", "required": "Dit veld is verplicht" - }, - "imageEdit": { - "title": "Afbeelding bewerken", - "rotate": "Draai", - "zoom": "Vergroot", - "cropInstructions": "Sleep om te herpositioneren, verander de grootte van de hoeken om de uitsnijdgebied aan te passen" } -} \ No newline at end of file +} diff --git a/apps/web/messages/pl-PL.json b/apps/web/messages/pl-PL.json index ae4fa18..15fd625 100644 --- a/apps/web/messages/pl-PL.json +++ b/apps/web/messages/pl-PL.json @@ -355,6 +355,12 @@ "stats": "{iconCount} ikon z {libraryCount} bibliotek", "categoryBadge": "{category} ({count} ikon)" }, + "imageEdit": { + "title": "Edytuj obraz", + "rotate": "Obróć", + "zoom": "Powiększ", + "cropInstructions": "Przeciągnij, aby przesunąć, zmień rozmiar rogów, aby dostosować obszar przycięcia" + }, "login": { "welcome": "Witaj w", "signInToContinue": "Zaloguj się, aby kontynuować", @@ -1719,11 +1725,5 @@ "passwordMinLength": "Hasło musi mieć co najmniej 6 znaków", "nameRequired": "Nazwa jest wymagana", "required": "To pole jest wymagane" - }, - "imageEdit": { - "title": "Edytuj obraz", - "rotate": "Obróć", - "zoom": "Powiększ", - "cropInstructions": "Przeciągnij, aby przesunąć, zmień rozmiar rogów, aby dostosować obszar przycięcia" } -} \ No newline at end of file +} diff --git a/apps/web/messages/pt-BR.json b/apps/web/messages/pt-BR.json index 79f9d06..deac30d 100644 --- a/apps/web/messages/pt-BR.json +++ b/apps/web/messages/pt-BR.json @@ -355,6 +355,12 @@ "stats": "{iconCount} ícones de {libraryCount} bibliotecas", "categoryBadge": "{category} ({count} ícones)" }, + "imageEdit": { + "title": "Editar imagem", + "rotate": "Girar", + "zoom": "Ampliar", + "cropInstructions": "Arraste para reposicionar, redimensione os cantos para ajustar a área de recorte" + }, "login": { "welcome": "Bem-vindo ao", "signInToContinue": "Faça login para continuar", @@ -1719,11 +1725,5 @@ "lastNameRequired": "O sobrenome é necessário", "usernameLength": "O nome de usuário deve ter pelo menos 3 caracteres", "usernameSpaces": "O nome de usuário não pode conter espaços" - }, - "imageEdit": { - "title": "Editar imagem", - "rotate": "Girar", - "zoom": "Ampliar", - "cropInstructions": "Arraste para reposicionar, redimensione os cantos para ajustar a área de recorte" } -} \ No newline at end of file +} diff --git a/apps/web/messages/ru-RU.json b/apps/web/messages/ru-RU.json index 5603916..e5b14ea 100644 --- a/apps/web/messages/ru-RU.json +++ b/apps/web/messages/ru-RU.json @@ -355,6 +355,12 @@ "stats": "{iconCount} иконок из {libraryCount} библиотек", "categoryBadge": "{category} ({count} иконок)" }, + "imageEdit": { + "title": "Редактировать изображение", + "rotate": "Повернуть", + "zoom": "Увеличить", + "cropInstructions": "Перетащите, чтобы переместить, измените размер углов, чтобы отрегулировать область обрезки" + }, "login": { "welcome": "Добро пожаловать в", "signInToContinue": "Войдите, чтобы продолжить", @@ -1719,11 +1725,5 @@ "passwordRequired": "Требуется пароль", "nameRequired": "Требуется имя", "required": "Это поле обязательно" - }, - "imageEdit": { - "title": "Редактировать изображение", - "rotate": "Повернуть", - "zoom": "Увеличить", - "cropInstructions": "Перетащите, чтобы переместить, измените размер углов, чтобы отрегулировать область обрезки" } -} \ No newline at end of file +} diff --git a/apps/web/messages/tr-TR.json b/apps/web/messages/tr-TR.json index 5a52756..0618b6d 100644 --- a/apps/web/messages/tr-TR.json +++ b/apps/web/messages/tr-TR.json @@ -355,6 +355,12 @@ "stats": "{libraryCount} kütüphaneden {iconCount} simge", "categoryBadge": "{category} ({count} simge)" }, + "imageEdit": { + "title": "Resmi Düzenle", + "rotate": "Döndür", + "zoom": "Yakınlaştır", + "cropInstructions": "Yerleştirmek için sürükleyin, kırpma alanını ayarlamak için köşeleri yeniden boyutlandırın" + }, "login": { "welcome": "Hoş geldiniz'e", "signInToContinue": "Devam etmek için oturum açın", @@ -1719,11 +1725,5 @@ "passwordRequired": "Şifre gerekli", "nameRequired": "İsim gereklidir", "required": "Bu alan zorunludur" - }, - "imageEdit": { - "title": "Resmi Düzenle", - "rotate": "Döndür", - "zoom": "Yakınlaştır", - "cropInstructions": "Yerleştirmek için sürükleyin, kırpma alanını ayarlamak için köşeleri yeniden boyutlandırın" } -} \ No newline at end of file +} diff --git a/apps/web/messages/zh-CN.json b/apps/web/messages/zh-CN.json index cf478e2..e7220de 100644 --- a/apps/web/messages/zh-CN.json +++ b/apps/web/messages/zh-CN.json @@ -355,6 +355,12 @@ "stats": "来自 {libraryCount} 个库的 {iconCount} 个图标", "categoryBadge": "{category}({count} 个图标)" }, + "imageEdit": { + "title": "编辑图片", + "rotate": "旋转", + "zoom": "缩放", + "cropInstructions": "拖动以重新定位,调整角落大小以调整裁剪区域" + }, "login": { "welcome": "欢迎您", "signInToContinue": "请登录以继续", @@ -1483,11 +1489,7 @@ "copyToClipboard": "复制到剪贴板", "savedMessage": "我已保存备用码", "available": "可用备用码:{count}个", - "instructions": [ - "• 将这些代码保存在安全的位置", - "• 每个备用码只能使用一次", - "• 您可以随时生成新的备用码" - ] + "instructions": ["• 将这些代码保存在安全的位置", "• 每个备用码只能使用一次", "• 您可以随时生成新的备用码"] }, "verification": { "title": "双重认证", @@ -1719,11 +1721,5 @@ "passwordRequired": "密码为必填项", "nameRequired": "名称为必填项", "required": "此字段为必填项" - }, - "imageEdit": { - "title": "编辑图片", - "rotate": "旋转", - "zoom": "缩放", - "cropInstructions": "拖动以重新定位,调整角落大小以调整裁剪区域" } -} \ No newline at end of file +} diff --git a/apps/web/package.json b/apps/web/package.json index cd0daa7..e243b3b 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -99,4 +99,4 @@ "tailwindcss": "4.1.11", "typescript": "5.8.3" } -} \ No newline at end of file +} diff --git a/apps/web/src/app/(shares)/reverse-shares/components/reverse-share-card.tsx b/apps/web/src/app/(shares)/reverse-shares/components/reverse-share-card.tsx index b21d8ab..f97e15d 100644 --- a/apps/web/src/app/(shares)/reverse-shares/components/reverse-share-card.tsx +++ b/apps/web/src/app/(shares)/reverse-shares/components/reverse-share-card.tsx @@ -11,6 +11,7 @@ import { IconLink, IconLock, IconLockOpen, + IconQrcode, IconToggleLeft, IconToggleRight, IconTrash, @@ -38,6 +39,7 @@ interface ReverseShareCardProps { onGenerateLink: (reverseShare: ReverseShare) => void; onViewDetails: (reverseShare: ReverseShare) => void; onViewFiles: (reverseShare: ReverseShare) => void; + onViewQrCode?: (reverseShare: ReverseShare) => void; onUpdateReverseShare?: (id: string, data: any) => Promise; onToggleActive?: (id: string, isActive: boolean) => Promise; onUpdatePassword?: (id: string, data: { hasPassword: boolean; password?: string }) => Promise; @@ -51,6 +53,7 @@ export function ReverseShareCard({ onGenerateLink, onViewDetails, onViewFiles, + onViewQrCode, onUpdateReverseShare, onToggleActive, onUpdatePassword, @@ -230,6 +233,18 @@ export function ReverseShareCard({
+ {hasAlias && onViewQrCode && ( + + )} + - +
+
+
onViewQrCode && onViewQrCode(reverseShare)} + title={t("reverseShares.actions.viewQrCode")} + > + +
+
+
+ )}
{/* Link de Compartilhamento */} diff --git a/apps/web/src/app/(shares)/reverse-shares/components/reverse-shares-cards-container.tsx b/apps/web/src/app/(shares)/reverse-shares/components/reverse-shares-cards-container.tsx index 9379c65..4187cca 100644 --- a/apps/web/src/app/(shares)/reverse-shares/components/reverse-shares-cards-container.tsx +++ b/apps/web/src/app/(shares)/reverse-shares/components/reverse-shares-cards-container.tsx @@ -10,6 +10,7 @@ interface ReverseSharesCardsContainerProps { onGenerateLink: (reverseShare: ReverseShare) => void; onViewDetails: (reverseShare: ReverseShare) => void; onViewFiles: (reverseShare: ReverseShare) => void; + onViewQrCode?: (reverseShare: ReverseShare) => void; onCreateReverseShare: () => void; onUpdateReverseShare?: (id: string, data: any) => Promise; onToggleActive?: (id: string, isActive: boolean) => Promise; @@ -24,6 +25,7 @@ export function ReverseSharesCardsContainer({ onGenerateLink, onViewDetails, onViewFiles, + onViewQrCode, onCreateReverseShare, onUpdateReverseShare, onToggleActive, @@ -45,6 +47,7 @@ export function ReverseSharesCardsContainer({ onGenerateLink={onGenerateLink} onViewDetails={onViewDetails} onViewFiles={onViewFiles} + onViewQrCode={onViewQrCode} onUpdateReverseShare={onUpdateReverseShare} onToggleActive={onToggleActive} onUpdatePassword={onUpdatePassword} diff --git a/apps/web/src/app/(shares)/reverse-shares/components/reverse-shares-modals.tsx b/apps/web/src/app/(shares)/reverse-shares/components/reverse-shares-modals.tsx index 5cdadb5..aac99e2 100644 --- a/apps/web/src/app/(shares)/reverse-shares/components/reverse-shares-modals.tsx +++ b/apps/web/src/app/(shares)/reverse-shares/components/reverse-shares-modals.tsx @@ -1,3 +1,4 @@ +import { QrCodeModal } from "@/components/modals/qr-code-modal"; import type { CreateReverseShareBody, UpdateReverseShareBody } from "@/http/endpoints/reverse-shares/types"; import { ReverseShare } from "../hooks/use-reverse-shares"; import { CreateReverseShareModal } from "./create-reverse-share-modal"; @@ -20,14 +21,17 @@ interface ReverseSharesModalsProps { reverseShareToGenerateLink: ReverseShare | null; reverseShareToDelete: ReverseShare | null; reverseShareToViewFiles: ReverseShare | null; + reverseShareToViewQrCode: ReverseShare | null; isDeleting: boolean; onCloseViewDetails: () => void; onCloseGenerateLink: () => void; onCloseDeleteModal: () => void; onCloseViewFiles: () => void; + onCloseViewQrCode: () => void; onConfirmDelete: (reverseShare: ReverseShare) => Promise; onCreateAlias: (reverseShareId: string, alias: string) => Promise; onCopyLink: (reverseShare: ReverseShare) => void; + onViewQrCode: (reverseShare: ReverseShare) => void; onUpdateReverseShareData?: (id: string, data: any) => Promise; onUpdatePassword?: (id: string, data: { hasPassword: boolean; password?: string }) => Promise; onToggleActive?: (id: string, isActive: boolean) => Promise; @@ -48,14 +52,17 @@ export function ReverseSharesModals({ reverseShareToGenerateLink, reverseShareToDelete, reverseShareToViewFiles, + reverseShareToViewQrCode, isDeleting, onCloseViewDetails, onCloseGenerateLink, onCloseDeleteModal, onCloseViewFiles, + onCloseViewQrCode, onConfirmDelete, onCreateAlias, onCopyLink, + onViewQrCode, onUpdateReverseShareData, onUpdatePassword, onToggleActive, @@ -103,6 +110,7 @@ export function ReverseSharesModals({ onCopyLink={onCopyLink} onUpdatePassword={onUpdatePassword} onToggleActive={onToggleActive} + onViewQrCode={onViewQrCode} /> + + ); } diff --git a/apps/web/src/app/(shares)/reverse-shares/hooks/use-reverse-shares.ts b/apps/web/src/app/(shares)/reverse-shares/hooks/use-reverse-shares.ts index ee6b662..467890a 100644 --- a/apps/web/src/app/(shares)/reverse-shares/hooks/use-reverse-shares.ts +++ b/apps/web/src/app/(shares)/reverse-shares/hooks/use-reverse-shares.ts @@ -30,6 +30,7 @@ export function useReverseShares() { const [reverseShareToDelete, setReverseShareToDelete] = useState(null); const [reverseShareToEdit, setReverseShareToEdit] = useState(null); const [reverseShareToViewFiles, setReverseShareToViewFiles] = useState(null); + const [reverseShareToViewQrCode, setReverseShareToViewQrCode] = useState(null); const [isDeleting, setIsDeleting] = useState(false); const [isCreateModalOpen, setIsCreateModalOpen] = useState(false); const [isCreating, setIsCreating] = useState(false); @@ -277,6 +278,7 @@ export function useReverseShares() { reverseShareToDelete, reverseShareToEdit, reverseShareToViewFiles, + reverseShareToViewQrCode, isDeleting, isCreateModalOpen, isCreating, @@ -288,6 +290,7 @@ export function useReverseShares() { setReverseShareToDelete, setReverseShareToEdit, setReverseShareToViewFiles, + setReverseShareToViewQrCode, setIsCreateModalOpen, handleCopyLink, handleDeleteReverseShare, diff --git a/apps/web/src/app/(shares)/reverse-shares/page.tsx b/apps/web/src/app/(shares)/reverse-shares/page.tsx index d56c2b9..545cf77 100644 --- a/apps/web/src/app/(shares)/reverse-shares/page.tsx +++ b/apps/web/src/app/(shares)/reverse-shares/page.tsx @@ -23,6 +23,7 @@ export default function ReverseSharesPage() { reverseShareToDelete, reverseShareToEdit, reverseShareToViewFiles, + reverseShareToViewQrCode, isDeleting, isCreateModalOpen, isCreating, @@ -37,6 +38,7 @@ export default function ReverseSharesPage() { setReverseShareToDelete, setReverseShareToEdit, setReverseShareToViewFiles, + setReverseShareToViewQrCode, handleCreateAlias, handleUpdatePassword, handleUpdateReverseShareData, @@ -77,6 +79,7 @@ export default function ReverseSharesPage() { onGenerateLink={setReverseShareToGenerateLink} onViewDetails={setReverseShareToViewDetails} onViewFiles={setReverseShareToViewFiles} + onViewQrCode={setReverseShareToViewQrCode} onCreateReverseShare={() => setIsCreateModalOpen(true)} onUpdateReverseShare={handleUpdateReverseShareData} onToggleActive={handleToggleActive} @@ -99,14 +102,17 @@ export default function ReverseSharesPage() { reverseShareToViewDetails={reverseShareToViewDetails} reverseShareToDelete={reverseShareToDelete} reverseShareToViewFiles={reverseShareToViewFiles} + reverseShareToViewQrCode={reverseShareToViewQrCode} isDeleting={isDeleting} onCloseGenerateLink={() => setReverseShareToGenerateLink(null)} onCloseViewDetails={() => setReverseShareToViewDetails(null)} onCloseDeleteModal={() => setReverseShareToDelete(null)} onCloseViewFiles={() => setReverseShareToViewFiles(null)} + onCloseViewQrCode={() => setReverseShareToViewQrCode(null)} onConfirmDelete={handleDeleteReverseShare} onCreateAlias={handleCreateAlias} onCopyLink={handleCopyLink} + onViewQrCode={setReverseShareToViewQrCode} onUpdateReverseShareData={handleUpdateReverseShareData} onUpdatePassword={handleUpdatePassword} onToggleActive={handleToggleActive} diff --git a/apps/web/src/components/modals/generate-share-link-modal.tsx b/apps/web/src/components/modals/generate-share-link-modal.tsx index 0221272..9846779 100644 --- a/apps/web/src/components/modals/generate-share-link-modal.tsx +++ b/apps/web/src/components/modals/generate-share-link-modal.tsx @@ -173,8 +173,8 @@ export function GenerateShareLinkModal({
diff --git a/apps/web/src/components/modals/qr-code-modal.tsx b/apps/web/src/components/modals/qr-code-modal.tsx index 52cc634..ce4b883 100644 --- a/apps/web/src/components/modals/qr-code-modal.tsx +++ b/apps/web/src/components/modals/qr-code-modal.tsx @@ -93,7 +93,7 @@ export function QrCodeModal({ isOpen, onClose, shareLink, shareName }: QrCodeMod {t("common.close")} diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json index 0459fe3..05836af 100644 --- a/apps/web/tsconfig.json +++ b/apps/web/tsconfig.json @@ -1,11 +1,7 @@ { "compilerOptions": { "target": "ES2017", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": true, @@ -23,20 +19,9 @@ } ], "paths": { - "@/*": [ - "./src/*" - ] + "@/*": ["./src/*"] } }, - "exclude": [ - "node_modules", - ".next/types/app/api/(proxy)/**/*", - ".next/types/**/*.ts" - ], - "include": [ - "**/*.ts", - "**/*.tsx", - "next-env.d.ts", - ".next/types/**/*.ts" - ] -} \ No newline at end of file + "exclude": ["node_modules", ".next/types/app/api/(proxy)/**/*", ".next/types/**/*.ts"], + "include": ["**/*.ts", "**/*.tsx", "next-env.d.ts", ".next/types/**/*.ts"] +} From 1a5c1de510bc4a0a43df70e308e74349b81dec91 Mon Sep 17 00:00:00 2001 From: Daniel Luiz Alves Date: Fri, 18 Jul 2025 02:09:00 -0300 Subject: [PATCH 3/4] feat: enhance share functionality with QR code support across multiple languages - Added new translations for QR code interactions in various languages. - Updated share link details to include options for viewing and downloading QR codes. - Enhanced user experience by providing clear instructions and descriptions related to QR code usage. - Improved consistency in UI components for QR code visibility and actions. --- apps/web/messages/ar-SA.json | 28 ++++++++++++++++++++++------ apps/web/messages/de-DE.json | 30 +++++++++++++++++++++++------- apps/web/messages/es-ES.json | 26 +++++++++++++++++++++----- apps/web/messages/fr-FR.json | 28 ++++++++++++++++++++++------ apps/web/messages/hi-IN.json | 28 ++++++++++++++++++++++------ apps/web/messages/it-IT.json | 28 ++++++++++++++++++++++------ apps/web/messages/ja-JP.json | 28 ++++++++++++++++++++++------ apps/web/messages/ko-KR.json | 28 ++++++++++++++++++++++------ apps/web/messages/nl-NL.json | 28 ++++++++++++++++++++++------ apps/web/messages/pl-PL.json | 28 ++++++++++++++++++++++------ apps/web/messages/pt-BR.json | 28 ++++++++++++++++++++++------ apps/web/messages/ru-RU.json | 28 ++++++++++++++++++++++------ apps/web/messages/tr-TR.json | 28 ++++++++++++++++++++++------ apps/web/messages/zh-CN.json | 34 +++++++++++++++++++++++++++------- 14 files changed, 313 insertions(+), 85 deletions(-) diff --git a/apps/web/messages/ar-SA.json b/apps/web/messages/ar-SA.json index c481e8b..185b341 100644 --- a/apps/web/messages/ar-SA.json +++ b/apps/web/messages/ar-SA.json @@ -327,7 +327,12 @@ "copyButton": "نسخ الرابط", "success": "تم إنشاء الرابط بنجاح", "error": "فشل في إنشاء الرابط", - "copied": "تم نسخ الرابط إلى الحافظة" + "copied": "تم نسخ الرابط إلى الحافظة", + "readyDescription": "رابط المشاركة الخاص بك جاهز. يمكنك مسح رمز QR مباشرة، أو تنزيله للاستخدام لاحقًا، أو نسخ الرابط أدناه.", + "tabs": { + "link": "الرابط", + "qrcode": "رمز QR" + } }, "home": { "description": "البديل مفتوح المصدر لـ WeTransfer. شارك ملفاتك بأمان، دون تتبع أو قيود.", @@ -619,11 +624,12 @@ "createLink": "إنشاء رابط", "delete": "حذف", "copyLinkTitle": "نسخ الرابط", - "createLinkCTA": "إنشاء رابط استلام" + "createLinkCTA": "إنشاء رابط استلام", + "viewQrCode": "عرض رمز QR" }, "status": { "active": "نشط", - "inactive": "غير نشط", + "inactive": "غير نشط", "expired": "منتهي الصلاحية", "protected": "محمي", "public": "عام" @@ -635,7 +641,8 @@ "viewDetails": "عرض التفاصيل", "edit": "تحرير", "delete": "حذف", - "viewFiles": "الملفات المستلمة" + "viewFiles": "الملفات المستلمة", + "viewQrCode": "عرض رمز QR" }, "empty": { "title": "لم يتم إنشاء روابط استلام", @@ -1238,7 +1245,10 @@ "invalidDate": "تاريخ غير صحيح", "loadError": "فشل في تحميل تفاصيل المشاركة", "editSecurity": "تحرير الأمان", - "editExpiration": "تحرير انتهاء الصلاحية" + "editExpiration": "تحرير انتهاء الصلاحية", + "clickToEnlargeQrCode": "انقر لتكبير رمز QR", + "downloadQrCode": "تحميل رمز QR", + "qrCode": "رمز QR" }, "shareExpiration": { "neverExpires": "لا تنتهي صلاحيته أبداً", @@ -1425,7 +1435,8 @@ "copyLink": "نسخ الرابط", "notifyRecipients": "إشعار المستقبلين", "delete": "حذف", - "downloadShareFiles": "قم بتنزيل جميع الملفات" + "downloadShareFiles": "قم بتنزيل جميع الملفات", + "viewQrCode": "عرض رمز QR" }, "bulkActions": { "delete": "حذف", @@ -1727,5 +1738,10 @@ "passwordRequired": "كلمة المرور مطلوبة", "nameRequired": "الاسم مطلوب", "required": "هذا الحقل مطلوب" + }, + "qrCodeModal": { + "title": "مشاركة رمز QR", + "description": "امسح رمز QR هذا للوصول إلى الرابط.", + "download": "تحميل رمز QR" } } diff --git a/apps/web/messages/de-DE.json b/apps/web/messages/de-DE.json index 7fc1dbc..1c63c3b 100644 --- a/apps/web/messages/de-DE.json +++ b/apps/web/messages/de-DE.json @@ -327,7 +327,12 @@ "copyButton": "Link kopieren", "success": "Link erfolgreich generiert", "error": "Fehler beim Generieren des Links", - "copied": "Link in die Zwischenablage kopiert" + "copied": "Link in die Zwischenablage kopiert", + "readyDescription": "Ihr Freigabe-Link ist bereit. Sie können den QR-Code direkt scannen, ihn für die spätere Verwendung herunterladen oder den Link unten kopieren.", + "tabs": { + "link": "Link", + "qrcode": "QR-Code" + } }, "home": { "description": "Die Open-Source-Alternative zu WeTransfer. Teilen Sie Dateien sicher, ohne Tracking oder Einschränkungen.", @@ -619,10 +624,11 @@ "createLink": "Link erstellen", "delete": "Löschen", "copyLinkTitle": "Link kopieren", - "createLinkCTA": "Empfangslink erstellen" + "createLinkCTA": "Empfangslink erstellen", + "viewQrCode": "QR-Code anzeigen" }, "status": { - "active": "Aktiv", + "active": "Aktiv", "inactive": "Inaktiv", "expired": "Abgelaufen", "protected": "Geschützt", @@ -630,12 +636,13 @@ }, "actions": { "copyLink": "Link kopieren", - "editAlias": "Alias bearbeiten", + "editAlias": "Alias bearbeiten", "createAlias": "Alias erstellen", "viewDetails": "Details anzeigen", "edit": "Bearbeiten", "delete": "Löschen", - "viewFiles": "Empfangene Dateien" + "viewFiles": "Empfangene Dateien", + "viewQrCode": "QR-Code anzeigen" }, "empty": { "title": "Keine Empfangslinks erstellt", @@ -1236,7 +1243,10 @@ "invalidDate": "Ungültiges Datum", "loadError": "Fehler beim Laden der Freigabe-Details", "editSecurity": "Sicherheit bearbeiten", - "editExpiration": "Ablauf bearbeiten" + "editExpiration": "Ablauf bearbeiten", + "clickToEnlargeQrCode": "Klicken Sie zum Vergrößern des QR-Codes", + "downloadQrCode": "QR-Code herunterladen", + "qrCode": "QR-Code" }, "shareExpiration": { "neverExpires": "Läuft nie ab", @@ -1423,7 +1433,8 @@ "copyLink": "Link Kopieren", "notifyRecipients": "Empfänger Benachrichtigen", "delete": "Löschen", - "downloadShareFiles": "Laden Sie alle Dateien herunter" + "downloadShareFiles": "Laden Sie alle Dateien herunter", + "viewQrCode": "QR-Code anzeigen" }, "bulkActions": { "delete": "Löschen", @@ -1725,5 +1736,10 @@ "passwordRequired": "Passwort ist erforderlich", "nameRequired": "Name ist erforderlich", "required": "Dieses Feld ist erforderlich" + }, + "qrCodeModal": { + "title": "QR-Code teilen", + "description": "Scannen Sie diesen QR-Code, um auf den Link zuzugreifen.", + "download": "QR-Code herunterladen" } } diff --git a/apps/web/messages/es-ES.json b/apps/web/messages/es-ES.json index 89dd137..79e93ca 100644 --- a/apps/web/messages/es-ES.json +++ b/apps/web/messages/es-ES.json @@ -327,7 +327,12 @@ "copyButton": "Copiar enlace", "success": "Enlace generado exitosamente", "error": "Error al generar enlace", - "copied": "Enlace copiado al portapapeles" + "copied": "Enlace copiado al portapapeles", + "readyDescription": "Tu enlace de compartir está listo. Puedes escanear el código QR directamente, descargarlo para usarlo más tarde, o copiar el enlace a continuación.", + "tabs": { + "link": "Enlace", + "qrcode": "Código QR" + } }, "home": { "description": "La alternativa de código abierto a WeTransfer. Comparte archivos de forma segura, sin rastreo ni limitaciones.", @@ -619,7 +624,8 @@ "createLink": "Crear Enlace", "delete": "Eliminar", "copyLinkTitle": "Copiar enlace", - "createLinkCTA": "Crear Enlace de Recepción" + "createLinkCTA": "Crear Enlace de Recepción", + "viewQrCode": "Ver Código QR" }, "status": { "active": "Activo", @@ -635,7 +641,8 @@ "viewDetails": "Ver Detalles", "edit": "Editar", "delete": "Eliminar", - "viewFiles": "Archivos Recibidos" + "viewFiles": "Archivos Recibidos", + "viewQrCode": "Ver Código QR" }, "empty": { "title": "Ningún enlace de recepción creado", @@ -1236,7 +1243,10 @@ "invalidDate": "Fecha inválida", "loadError": "Error al cargar detalles del compartir", "editSecurity": "Editar Seguridad", - "editExpiration": "Editar Expiración" + "editExpiration": "Editar Expiración", + "clickToEnlargeQrCode": "Haz clic para ampliar el Código QR", + "downloadQrCode": "Descargar Código QR", + "qrCode": "Código QR" }, "shareExpiration": { "neverExpires": "Nunca Expira", @@ -1423,7 +1433,8 @@ "copyLink": "Copiar Enlace", "notifyRecipients": "Notificar Destinatarios", "delete": "Eliminar", - "downloadShareFiles": "Descargar todos los archivos" + "downloadShareFiles": "Descargar todos los archivos", + "viewQrCode": "Ver Código QR" }, "bulkActions": { "delete": "Eliminar", @@ -1725,5 +1736,10 @@ "passwordRequired": "Se requiere la contraseña", "nameRequired": "El nombre es obligatorio", "required": "Este campo es obligatorio" + }, + "qrCodeModal": { + "title": "Compartir Código QR", + "description": "Escanea este código QR para acceder al enlace.", + "download": "Descargar Código QR" } } diff --git a/apps/web/messages/fr-FR.json b/apps/web/messages/fr-FR.json index 0d256bc..15f018e 100644 --- a/apps/web/messages/fr-FR.json +++ b/apps/web/messages/fr-FR.json @@ -327,7 +327,12 @@ "copyButton": "Copier le lien", "success": "Lien généré avec succès", "error": "Échec de la génération du lien", - "copied": "Lien copié dans le presse-papiers" + "copied": "Lien copié dans le presse-papiers", + "readyDescription": "Votre lien de partage est prêt. Vous pouvez scanner le QR code directement, le télécharger pour une utilisation ultérieure, ou copier le lien ci-dessous.", + "tabs": { + "link": "Lien", + "qrcode": "QR Code" + } }, "home": { "description": "L'alternative open-source à WeTransfer. Partagez des fichiers en toute sécurité, sans suivi ni limitations.", @@ -619,7 +624,8 @@ "createLink": "Créer un Lien", "delete": "Supprimer", "copyLinkTitle": "Copier le lien", - "createLinkCTA": "Créer un Lien de Réception" + "createLinkCTA": "Créer un Lien de Réception", + "viewQrCode": "Voir le QR Code" }, "status": { "active": "Actif", @@ -635,7 +641,8 @@ "viewDetails": "Voir les Détails", "edit": "Modifier", "delete": "Supprimer", - "viewFiles": "Fichiers Reçus" + "viewFiles": "Fichiers Reçus", + "viewQrCode": "Voir le QR Code" }, "empty": { "title": "Aucun lien de réception créé", @@ -1236,7 +1243,10 @@ "invalidDate": "Date invalide", "loadError": "Échec du chargement des détails du partage", "editSecurity": "Modifier la Sécurité", - "editExpiration": "Modifier l'Expiration" + "editExpiration": "Modifier l'Expiration", + "clickToEnlargeQrCode": "Cliquez pour agrandir le Code QR", + "downloadQrCode": "Télécharger le Code QR", + "qrCode": "Code QR" }, "shareExpiration": { "neverExpires": "N'expire Jamais", @@ -1423,7 +1433,8 @@ "copyLink": "Copier le Lien", "notifyRecipients": "Notifier les Destinataires", "delete": "Supprimer", - "downloadShareFiles": "Télécharger tous les fichiers" + "downloadShareFiles": "Télécharger tous les fichiers", + "viewQrCode": "Voir le QR Code" }, "bulkActions": { "delete": "Supprimer", @@ -1725,5 +1736,10 @@ "passwordRequired": "Le mot de passe est requis", "nameRequired": "Nome é obrigatório", "required": "Este campo é obrigatório" + }, + "qrCodeModal": { + "title": "Code QR de Partage", + "description": "Scannez ce code QR pour accéder au lien.", + "download": "Télécharger le Code QR" } -} +} \ No newline at end of file diff --git a/apps/web/messages/hi-IN.json b/apps/web/messages/hi-IN.json index 48cca92..7422a9d 100644 --- a/apps/web/messages/hi-IN.json +++ b/apps/web/messages/hi-IN.json @@ -327,7 +327,12 @@ "copyButton": "लिंक कॉपी करें", "success": "लिंक सफलतापूर्वक उत्पन्न हुआ", "error": "लिंक उत्पन्न करने में विफल", - "copied": "लिंक क्लिपबोर्ड में कॉपी किया गया" + "copied": "लिंक क्लिपबोर्ड में कॉपी किया गया", + "readyDescription": "आपका साझाकरण लिंक तैयार है। आप डायरेक्ट रूप से QR कोड स्कैन कर सकते हैं, इसे बाद में उपयोग के लिए डाउनलोड कर सकते हैं, या नीचे लिंक कॉपी कर सकते हैं।", + "tabs": { + "link": "लिंक", + "qrcode": "QR कोड" + } }, "home": { "description": "WeTransfer का ओपन-सोर्स विकल्प। फाइलें सुरक्षित रूप से साझा करें, बिना ट्रैकिंग या सीमाओं के।", @@ -619,7 +624,8 @@ "createLink": "लिंक बनाएं", "delete": "हटाएं", "copyLinkTitle": "लिंक कॉपी करें", - "createLinkCTA": "प्राप्ति लिंक बनाएं" + "createLinkCTA": "प्राप्ति लिंक बनाएं", + "viewQrCode": "QR कोड देखें" }, "status": { "active": "सक्रिय", @@ -635,7 +641,8 @@ "viewDetails": "विवरण देखें", "edit": "संपादित करें", "delete": "हटाएं", - "viewFiles": "प्राप्त फ़ाइलें" + "viewFiles": "प्राप्त फ़ाइलें", + "viewQrCode": "QR कोड देखें" }, "empty": { "title": "कोई प्राप्ति लिंक नहीं बनाया गया", @@ -1236,7 +1243,10 @@ "invalidDate": "अमान्य तिथि", "loadError": "साझाकरण विवरण लोड करने में विफल", "editSecurity": "सुरक्षा संपादित करें", - "editExpiration": "समाप्ति संपादित करें" + "editExpiration": "समाप्ति संपादित करें", + "clickToEnlargeQrCode": "QR कोड को बड़ा करने के लिए क्लिक करें", + "downloadQrCode": "QR कोड डाउनलोड करें", + "qrCode": "QR कोड" }, "shareExpiration": { "neverExpires": "कभी समाप्त नहीं होता", @@ -1423,7 +1433,8 @@ "copyLink": "लिंक कॉपी करें", "notifyRecipients": "प्राप्तकर्ताओं को सूचित करें", "delete": "हटाएं", - "downloadShareFiles": "सभी फ़ाइलें डाउनलोड करें" + "downloadShareFiles": "सभी फ़ाइलें डाउनलोड करें", + "viewQrCode": "QR कोड देखें" }, "bulkActions": { "delete": "हटाएं", @@ -1725,5 +1736,10 @@ "passwordRequired": "पासवर्ड आवश्यक है", "nameRequired": "नाम आवश्यक है", "required": "यह फ़ील्ड आवश्यक है" + }, + "qrCodeModal": { + "title": "QR कोड साझा करें", + "description": "इस QR कोड को स्कैन करके लिंक तक पहुंच सकते हैं।", + "download": "QR कोड डाउनलोड करें" } -} +} \ No newline at end of file diff --git a/apps/web/messages/it-IT.json b/apps/web/messages/it-IT.json index d0ec4f4..c600733 100644 --- a/apps/web/messages/it-IT.json +++ b/apps/web/messages/it-IT.json @@ -327,7 +327,12 @@ "copyButton": "Copia link", "success": "Link generato con successo", "error": "Errore nella generazione del link", - "copied": "Link copiato negli appunti" + "copied": "Link copiato negli appunti", + "readyDescription": "Il tuo link di condivisione è pronto. Puoi scansionare il codice QR direttamente, scaricarlo per un uso successivo, o copiare il link qui sotto.", + "tabs": { + "link": "Link", + "qrcode": "QR Code" + } }, "home": { "description": "L'alternativa open-source a WeTransfer. Condividi file in sicurezza, senza tracciamento o limitazioni.", @@ -619,7 +624,8 @@ "createLink": "Crea Link", "delete": "Elimina", "copyLinkTitle": "Copia link", - "createLinkCTA": "Crea Link di Ricezione" + "createLinkCTA": "Crea Link di Ricezione", + "viewQrCode": "Visualizza QR Code" }, "status": { "active": "Attivo", @@ -635,7 +641,8 @@ "viewDetails": "Vedi Dettagli", "edit": "Modifica", "delete": "Elimina", - "viewFiles": "File Ricevuti" + "viewFiles": "File Ricevuti", + "viewQrCode": "Visualizza QR Code" }, "empty": { "title": "Nessun link di ricezione creato", @@ -1236,7 +1243,10 @@ "invalidDate": "Data non valida", "loadError": "Errore nel caricamento dei dettagli della condivisione", "editSecurity": "Modifica Sicurezza", - "editExpiration": "Modifica Scadenza" + "editExpiration": "Modifica Scadenza", + "clickToEnlargeQrCode": "Clicca per ingrandire il QR Code", + "downloadQrCode": "Scarica QR Code", + "qrCode": "QR Code" }, "shareExpiration": { "neverExpires": "Non Scade Mai", @@ -1423,7 +1433,8 @@ "copyLink": "Copia Link", "notifyRecipients": "Notifica Destinatari", "delete": "Elimina", - "downloadShareFiles": "Scarica tutti i file" + "downloadShareFiles": "Scarica tutti i file", + "viewQrCode": "Visualizza QR Code" }, "bulkActions": { "delete": "Elimina", @@ -1725,5 +1736,10 @@ "passwordMinLength": "La password deve contenere almeno 6 caratteri", "nameRequired": "Il nome è obbligatorio", "required": "Questo campo è obbligatorio" + }, + "qrCodeModal": { + "title": "Condividi QR Code", + "description": "Scansiona questo codice QR per accedere al link.", + "download": "Scarica QR Code" } -} +} \ No newline at end of file diff --git a/apps/web/messages/ja-JP.json b/apps/web/messages/ja-JP.json index 3df2325..6460648 100644 --- a/apps/web/messages/ja-JP.json +++ b/apps/web/messages/ja-JP.json @@ -327,7 +327,12 @@ "copyButton": "リンクをコピー", "success": "リンクが正常に生成されました", "error": "リンクの生成に失敗しました", - "copied": "リンクがクリップボードにコピーされました" + "copied": "リンクがクリップボードにコピーされました", + "readyDescription": "共有リンクが準備できました。QRコードを直接スキャンして、後で使用するためにダウンロードするか、リンクをコピーしてください。", + "tabs": { + "link": "リンク", + "qrcode": "QRコード" + } }, "home": { "description": "WeTransferのオープンソース代替です。トラッキングや制限なしに安全にファイルを共有します。", @@ -619,7 +624,8 @@ "createLink": "リンクを作成", "delete": "削除", "copyLinkTitle": "リンクをコピー", - "createLinkCTA": "受信リンクを作成" + "createLinkCTA": "受信リンクを作成", + "viewQrCode": "QRコードを表示" }, "status": { "active": "有効", @@ -635,7 +641,8 @@ "viewDetails": "詳細を表示", "edit": "編集", "delete": "削除", - "viewFiles": "受信済みファイル" + "viewFiles": "受信済みファイル", + "viewQrCode": "QRコードを表示" }, "empty": { "title": "受信リンクが作成されていません", @@ -1236,7 +1243,10 @@ "invalidDate": "無効な日付", "loadError": "共有詳細の読み込みに失敗しました", "editSecurity": "セキュリティを編集", - "editExpiration": "期限を編集" + "editExpiration": "期限を編集", + "clickToEnlargeQrCode": "QRコードを拡大", + "downloadQrCode": "QRコードをダウンロード", + "qrCode": "QRコード" }, "shareExpiration": { "neverExpires": "期限なし", @@ -1423,7 +1433,8 @@ "copyLink": "リンクコピー", "notifyRecipients": "受信者に通知", "delete": "削除", - "downloadShareFiles": "すべてのファイルをダウンロードします" + "downloadShareFiles": "すべてのファイルをダウンロードします", + "viewQrCode": "QRコードを表示" }, "bulkActions": { "delete": "削除", @@ -1725,5 +1736,10 @@ "passwordRequired": "パスワードは必須です", "nameRequired": "名前は必須です", "required": "このフィールドは必須です" + }, + "qrCodeModal": { + "title": "QRコードを共有", + "description": "このQRコードをスキャンしてリンクにアクセスしてください。", + "download": "QRコードをダウンロード" } -} +} \ No newline at end of file diff --git a/apps/web/messages/ko-KR.json b/apps/web/messages/ko-KR.json index 60013d9..4ed9d04 100644 --- a/apps/web/messages/ko-KR.json +++ b/apps/web/messages/ko-KR.json @@ -327,7 +327,12 @@ "copyButton": "링크 복사", "success": "링크가 성공적으로 생성되었습니다", "error": "링크 생성에 실패했습니다", - "copied": "링크가 클립보드에 복사되었습니다" + "copied": "링크가 클립보드에 복사되었습니다", + "readyDescription": "공유 링크가 준비되었습니다. QR 코드를 직접 스캔하여 링크에 접근하거나, 나중에 사용하기 위해 다운로드하거나, 아래 링크를 복사할 수 있습니다.", + "tabs": { + "link": "링크", + "qrcode": "QR 코드" + } }, "home": { "description": "WeTransfer의 오픈소스 대안입니다. 추적이나 제한 없이 파일을 안전하게 공유하세요.", @@ -619,7 +624,8 @@ "createLink": "링크 생성", "delete": "삭제", "copyLinkTitle": "링크 복사", - "createLinkCTA": "수신 링크 생성" + "createLinkCTA": "수신 링크 생성", + "viewQrCode": "QR 코드 보기" }, "status": { "active": "활성", @@ -635,7 +641,8 @@ "viewDetails": "상세 보기", "edit": "편집", "delete": "삭제", - "viewFiles": "받은 파일" + "viewFiles": "받은 파일", + "viewQrCode": "QR 코드 보기" }, "empty": { "title": "생성된 수신 링크 없음", @@ -1236,7 +1243,10 @@ "invalidDate": "잘못된 날짜", "loadError": "공유 세부 정보 로드에 실패했습니다", "editSecurity": "보안 편집", - "editExpiration": "만료 편집" + "editExpiration": "만료 편집", + "clickToEnlargeQrCode": "QR 코드 확대", + "downloadQrCode": "QR 코드 다운로드", + "qrCode": "QR 코드" }, "shareExpiration": { "neverExpires": "만료되지 않음", @@ -1423,7 +1433,8 @@ "copyLink": "링크 복사", "notifyRecipients": "받는 사람에게 알림", "delete": "삭제", - "downloadShareFiles": "모든 파일을 다운로드하십시오" + "downloadShareFiles": "모든 파일을 다운로드하십시오", + "viewQrCode": "QR 코드 보기" }, "bulkActions": { "delete": "삭제", @@ -1725,5 +1736,10 @@ "passwordRequired": "비밀번호는 필수입니다", "nameRequired": "이름은 필수입니다", "required": "이 필드는 필수입니다" + }, + "qrCodeModal": { + "title": "QR 코드 공유", + "description": "이 QR 코드를 스캔하여 링크에 접근할 수 있습니다.", + "download": "QR 코드 다운로드" } -} +} \ No newline at end of file diff --git a/apps/web/messages/nl-NL.json b/apps/web/messages/nl-NL.json index 3ac924e..1e0cbae 100644 --- a/apps/web/messages/nl-NL.json +++ b/apps/web/messages/nl-NL.json @@ -327,7 +327,12 @@ "copyButton": "Link kopiëren", "success": "Link succesvol gegenereerd", "error": "Fout bij het genereren van link", - "copied": "Link gekopieerd naar klembord" + "copied": "Link gekopieerd naar klembord", + "readyDescription": "Uw deel-link is klaar. U kunt de QR-code direct scannen, downloaden voor later gebruik, of de link hieronder kopiëren.", + "tabs": { + "link": "Link", + "qrcode": "QR Code" + } }, "home": { "description": "Het open-source alternatief voor WeTransfer. Deel bestanden veilig, zonder tracking of beperkingen.", @@ -619,7 +624,8 @@ "createLink": "Link Aanmaken", "delete": "Verwijderen", "copyLinkTitle": "Link kopiëren", - "createLinkCTA": "Ontvangstlink Aanmaken" + "createLinkCTA": "Ontvangstlink Aanmaken", + "viewQrCode": "QR Code Bekijken" }, "status": { "active": "Actief", @@ -635,7 +641,8 @@ "viewDetails": "Details Bekijken", "edit": "Bewerken", "delete": "Verwijderen", - "viewFiles": "Ontvangen Bestanden" + "viewFiles": "Ontvangen Bestanden", + "viewQrCode": "QR Code Bekijken" }, "empty": { "title": "Geen ontvangstlinks aangemaakt", @@ -1236,7 +1243,10 @@ "invalidDate": "Ongeldige datum", "loadError": "Fout bij laden van delen details", "editSecurity": "Beveiliging Bewerken", - "editExpiration": "Vervaldatum Bewerken" + "editExpiration": "Vervaldatum Bewerken", + "clickToEnlargeQrCode": "Klik om QR Code te vergroten", + "downloadQrCode": "QR Code Downloaden", + "qrCode": "QR Code" }, "shareExpiration": { "neverExpires": "Verloopt Nooit", @@ -1423,7 +1433,8 @@ "copyLink": "Link Kopiëren", "notifyRecipients": "Ontvangers Informeren", "delete": "Verwijderen", - "downloadShareFiles": "Download alle bestanden" + "downloadShareFiles": "Download alle bestanden", + "viewQrCode": "QR Code Bekijken" }, "bulkActions": { "delete": "Verwijderen", @@ -1725,5 +1736,10 @@ "passwordMinLength": "Wachtwoord moet minimaal 6 tekens bevatten", "nameRequired": "Naam is verplicht", "required": "Dit veld is verplicht" + }, + "qrCodeModal": { + "title": "QR Code Delen", + "description": "Scan deze QR-code om toegang te krijgen tot de link.", + "download": "QR Code Downloaden" } -} +} \ No newline at end of file diff --git a/apps/web/messages/pl-PL.json b/apps/web/messages/pl-PL.json index 15fd625..6607ff3 100644 --- a/apps/web/messages/pl-PL.json +++ b/apps/web/messages/pl-PL.json @@ -327,7 +327,12 @@ "copyButton": "Skopiuj link", "success": "Link wygenerowany pomyślnie", "error": "Nie udało się wygenerować linku", - "copied": "Link skopiowany do schowka" + "copied": "Link skopiowany do schowka", + "readyDescription": "Twój link do udostępniania jest gotowy. Możesz skanować kod QR bezpośrednio, pobrać go do późniejszego użycia lub skopiować link poniżej.", + "tabs": { + "link": "Link", + "qrcode": "QR Code" + } }, "home": { "description": "Otwartoźródłowa alternatywa dla WeTransfer. Udostępniaj pliki bezpiecznie, bez śledzenia i ograniczeń.", @@ -619,7 +624,8 @@ "createLink": "Utwórz link", "delete": "Usuń", "copyLinkTitle": "Skopiuj link", - "createLinkCTA": "Utwórz link do odbierania" + "createLinkCTA": "Utwórz link do odbierania", + "viewQrCode": "Wyświetl kod QR" }, "status": { "active": "Aktywny", @@ -635,7 +641,8 @@ "viewDetails": "Wyświetl szczegóły", "edit": "Edytuj", "delete": "Usuń", - "viewFiles": "Odebrane pliki" + "viewFiles": "Odebrane pliki", + "viewQrCode": "Wyświetl kod QR" }, "empty": { "title": "Brak utworzonych linków do odbierania", @@ -1236,7 +1243,10 @@ "recipients": "Odbiorcy", "notAvailable": "N/A", "invalidDate": "Nieprawidłowa data", - "loadError": "Nie udało się załadować szczegółów udostępnienia" + "loadError": "Nie udało się załadować szczegółów udostępnienia", + "clickToEnlargeQrCode": "Kliknij, aby powiększyć kod QR", + "downloadQrCode": "Pobierz kod QR", + "qrCode": "Kod QR" }, "shareExpiration": { "title": "Ustawienia wygaśnięcia udostępnienia", @@ -1423,7 +1433,8 @@ "copyLink": "Skopiuj link", "notifyRecipients": "Powiadom odbiorców", "delete": "Usuń", - "downloadShareFiles": "Pobierz wszystkie pliki" + "downloadShareFiles": "Pobierz wszystkie pliki", + "viewQrCode": "Wyświetl kod QR" }, "bulkActions": { "delete": "Usuń", @@ -1725,5 +1736,10 @@ "passwordMinLength": "Hasło musi mieć co najmniej 6 znaków", "nameRequired": "Nazwa jest wymagana", "required": "To pole jest wymagane" + }, + "qrCodeModal": { + "title": "Udostępnij kod QR", + "description": "Skanuj ten kod QR, aby uzyskać dostęp do linku.", + "download": "Pobierz kod QR" } -} +} \ No newline at end of file diff --git a/apps/web/messages/pt-BR.json b/apps/web/messages/pt-BR.json index deac30d..fa70132 100644 --- a/apps/web/messages/pt-BR.json +++ b/apps/web/messages/pt-BR.json @@ -327,7 +327,12 @@ "copyButton": "Copiar link", "success": "Link gerado com sucesso", "error": "Erro ao gerar link", - "copied": "Link copiado para a área de transferência" + "copied": "Link copiado para a área de transferência", + "readyDescription": "Seu link de compartilhamento está pronto. Você pode escanear o código QR diretamente, baixá-lo para uso posterior ou copiar o link abaixo.", + "tabs": { + "link": "Link", + "qrcode": "QR Code" + } }, "home": { "description": "A alternativa open-source ao WeTransfer. Compartilhe arquivos com segurança, sem rastreamento ou limitações.", @@ -619,7 +624,8 @@ "createLink": "Criar Link", "delete": "Excluir", "copyLinkTitle": "Copiar link", - "createLinkCTA": "Criar Link de Recebimento" + "createLinkCTA": "Criar Link de Recebimento", + "viewQrCode": "Visualizar QR Code" }, "status": { "active": "Ativo", @@ -635,7 +641,8 @@ "viewDetails": "Ver Detalhes", "edit": "Editar", "delete": "Excluir", - "viewFiles": "Arquivos Recebidos" + "viewFiles": "Arquivos Recebidos", + "viewQrCode": "[TO_TRANSLATE] View QR Code" }, "empty": { "title": "Nenhum link de recebimento criado", @@ -1236,7 +1243,10 @@ "invalidDate": "Data inválida", "loadError": "Falha ao carregar detalhes do compartilhamento", "editSecurity": "Editar Segurança", - "editExpiration": "Editar Expiração" + "editExpiration": "Editar Expiração", + "clickToEnlargeQrCode": "Clique para ampliar o QR Code", + "downloadQrCode": "Baixar QR Code", + "qrCode": "QR Code" }, "shareExpiration": { "neverExpires": "Nunca Expira", @@ -1431,7 +1441,8 @@ "copyLink": "Copiar Link", "notifyRecipients": "Notificar Destinatários", "delete": "Excluir", - "downloadShareFiles": "Baixar todos os arquivos" + "downloadShareFiles": "Baixar todos os arquivos", + "viewQrCode": "Visualizar QR Code" } }, "storageUsage": { @@ -1725,5 +1736,10 @@ "lastNameRequired": "O sobrenome é necessário", "usernameLength": "O nome de usuário deve ter pelo menos 3 caracteres", "usernameSpaces": "O nome de usuário não pode conter espaços" + }, + "qrCodeModal": { + "title": "Compartilhar QR Code", + "description": "Escaneie este código QR para acessar o link.", + "download": "Baixar QR Code" } -} +} \ No newline at end of file diff --git a/apps/web/messages/ru-RU.json b/apps/web/messages/ru-RU.json index e5b14ea..614f2bf 100644 --- a/apps/web/messages/ru-RU.json +++ b/apps/web/messages/ru-RU.json @@ -327,7 +327,12 @@ "copyButton": "Копировать ссылку", "success": "Ссылка успешно создана", "error": "Ошибка при создании ссылки", - "copied": "Ссылка скопирована в буфер обмена" + "copied": "Ссылка скопирована в буфер обмена", + "readyDescription": "Ваша ссылка для обмена готова. Вы можете сканировать QR-код напрямую, скачать его для последующего использования или скопировать ссылку ниже.", + "tabs": { + "link": "Ссылка", + "qrcode": "QR-код" + } }, "home": { "description": "Открытая альтернатива WeTransfer. Делитесь файлами безопасно, без отслеживания и ограничений.", @@ -619,7 +624,8 @@ "createLink": "Создать ссылку", "delete": "Удалить", "copyLinkTitle": "Копировать ссылку", - "createLinkCTA": "Создать ссылку для получения" + "createLinkCTA": "Создать ссылку для получения", + "viewQrCode": "Просмотр QR-кода" }, "status": { "active": "Активно", @@ -635,7 +641,8 @@ "viewDetails": "Просмотр деталей", "edit": "Редактировать", "delete": "Удалить", - "viewFiles": "Полученные файлы" + "viewFiles": "Полученные файлы", + "viewQrCode": "Просмотр QR-кода" }, "empty": { "title": "Нет созданных ссылок для получения", @@ -1236,7 +1243,10 @@ "invalidDate": "Неверная дата", "loadError": "Ошибка загрузки деталей общего доступа", "editSecurity": "Изменить безопасность", - "editExpiration": "Изменить срок действия" + "editExpiration": "Изменить срок действия", + "clickToEnlargeQrCode": "Нажмите, чтобы увеличить QR-код", + "downloadQrCode": "Скачать QR-код", + "qrCode": "QR-код" }, "shareExpiration": { "neverExpires": "Никогда не истекает", @@ -1423,7 +1433,8 @@ "copyLink": "Скопировать Ссылку", "notifyRecipients": "Уведомить Получателей", "delete": "Удалить", - "downloadShareFiles": "Загрузите все файлы" + "downloadShareFiles": "Загрузите все файлы", + "viewQrCode": "Просмотр QR-кода" }, "bulkActions": { "delete": "Удалить", @@ -1725,5 +1736,10 @@ "passwordRequired": "Требуется пароль", "nameRequired": "Требуется имя", "required": "Это поле обязательно" + }, + "qrCodeModal": { + "title": "Поделиться QR-кодом", + "description": "Отсканируйте этот QR-код, чтобы получить доступ к ссылке.", + "download": "Скачать QR-код" } -} +} \ No newline at end of file diff --git a/apps/web/messages/tr-TR.json b/apps/web/messages/tr-TR.json index 0618b6d..59b1b32 100644 --- a/apps/web/messages/tr-TR.json +++ b/apps/web/messages/tr-TR.json @@ -327,7 +327,12 @@ "copyButton": "Bağlantıyı Kopyala", "success": "Bağlantı başarıyla oluşturuldu", "error": "Bağlantı oluşturulamadı", - "copied": "Bağlantı panoya kopyalandı" + "copied": "Bağlantı panoya kopyalandı", + "readyDescription": "Paylaşım bağlantınız hazır. QR kodu doğrudan tarayabilir, daha sonra kullanmak için indirebilir veya aşağıdaki bağlantıyı kopyalayabilirsiniz.", + "tabs": { + "link": "Bağlantı", + "qrcode": "QR Kodu" + } }, "home": { "description": "WeTransfer'e açık kaynaklı alternatif. Takip veya kısıtlama olmadan dosyalarınızı güvenle paylaşın.", @@ -619,7 +624,8 @@ "createLink": "Bağlantı Oluştur", "delete": "Sil", "copyLinkTitle": "Bağlantıyı kopyala", - "createLinkCTA": "Alma Bağlantısı Oluştur" + "createLinkCTA": "Alma Bağlantısı Oluştur", + "viewQrCode": "QR Kodu Görüntüle" }, "status": { "active": "Aktif", @@ -635,7 +641,8 @@ "viewDetails": "Detayları Görüntüle", "edit": "Düzenle", "delete": "Sil", - "viewFiles": "Alınan Dosyalar" + "viewFiles": "Alınan Dosyalar", + "viewQrCode": "QR Kodu Görüntüle" }, "empty": { "title": "Alma bağlantısı oluşturulmadı", @@ -1236,7 +1243,10 @@ "invalidDate": "Geçersiz tarih", "loadError": "Paylaşım detaylarını yükleme başarısız", "editSecurity": "Güvenlik Düzenle", - "editExpiration": "Son Kullanma Düzenle" + "editExpiration": "Son Kullanma Düzenle", + "clickToEnlargeQrCode": "QR Kodu Büyüt", + "downloadQrCode": "QR Kodu İndir", + "qrCode": "QR Kodu" }, "shareExpiration": { "neverExpires": "Asla Sona Ermez", @@ -1423,7 +1433,8 @@ "copyLink": "Bağlantıyı Kopyala", "notifyRecipients": "Alıcıları Bilgilendir", "delete": "Sil", - "downloadShareFiles": "Tüm dosyaları indirin" + "downloadShareFiles": "Tüm dosyaları indirin", + "viewQrCode": "QR Kodu Görüntüle" }, "bulkActions": { "delete": "Sil", @@ -1725,5 +1736,10 @@ "passwordRequired": "Şifre gerekli", "nameRequired": "İsim gereklidir", "required": "Bu alan zorunludur" + }, + "qrCodeModal": { + "title": "QR Kodu Paylaş", + "description": "Bu QR kodu tarayarak bağlantıya erişebilirsiniz.", + "download": "QR Kodu İndir" } -} +} \ No newline at end of file diff --git a/apps/web/messages/zh-CN.json b/apps/web/messages/zh-CN.json index e7220de..485e7ad 100644 --- a/apps/web/messages/zh-CN.json +++ b/apps/web/messages/zh-CN.json @@ -327,7 +327,12 @@ "copyButton": "复制链接", "success": "链接生成成功", "error": "链接生成失败", - "copied": "链接已复制到剪贴板" + "copied": "链接已复制到剪贴板", + "readyDescription": "您的分享链接已准备就绪:", + "tabs": { + "link": "链接", + "qrcode": "QR Code" + } }, "home": { "description": "WeTransfer的开源替代方案。安全分享文件,无需跟踪或限制。", @@ -619,7 +624,8 @@ "createLink": "创建链接", "delete": "删除", "copyLinkTitle": "复制链接", - "createLinkCTA": "创建接收链接" + "createLinkCTA": "创建接收链接", + "viewQrCode": "查看QR Code" }, "status": { "active": "活动", @@ -635,7 +641,8 @@ "viewDetails": "查看详情", "edit": "编辑", "delete": "删除", - "viewFiles": "已接收文件" + "viewFiles": "已接收文件", + "viewQrCode": "查看QR Code" }, "empty": { "title": "未创建接收链接", @@ -1236,7 +1243,10 @@ "description": "描述", "linkCopied": "链接已复制到剪贴板", "editSecurity": "编辑安全", - "editExpiration": "编辑过期" + "editExpiration": "编辑过期", + "clickToEnlargeQrCode": "点击放大QR Code", + "downloadQrCode": "下载QR Code", + "qrCode": "QR Code" }, "shareExpiration": { "neverExpires": "永不过期", @@ -1423,7 +1433,8 @@ "copyLink": "复制链接", "notifyRecipients": "通知收件人", "delete": "删除", - "downloadShareFiles": "下载所有文件" + "downloadShareFiles": "下载所有文件", + "viewQrCode": "查看QR Code" }, "bulkActions": { "delete": "删除", @@ -1489,7 +1500,11 @@ "copyToClipboard": "复制到剪贴板", "savedMessage": "我已保存备用码", "available": "可用备用码:{count}个", - "instructions": ["• 将这些代码保存在安全的位置", "• 每个备用码只能使用一次", "• 您可以随时生成新的备用码"] + "instructions": [ + "• 将这些代码保存在安全的位置", + "• 每个备用码只能使用一次", + "• 您可以随时生成新的备用码" + ] }, "verification": { "title": "双重认证", @@ -1721,5 +1736,10 @@ "passwordRequired": "密码为必填项", "nameRequired": "名称为必填项", "required": "此字段为必填项" + }, + "qrCodeModal": { + "title": "分享QR Code", + "description": "扫描此QR Code以访问链接。", + "download": "下载QR Code" } -} +} \ No newline at end of file From 236f94247a75ab3d0b82192e2aec89eb3206b902 Mon Sep 17 00:00:00 2001 From: Daniel Luiz Alves Date: Fri, 18 Jul 2025 11:14:56 -0300 Subject: [PATCH 4/4] feat: add QR code download functionality to share modals - Integrated QR code generation and download options in both ShareFileModal and ShareMultipleFilesModal. - Updated UI components to include a download button for QR codes, enhancing user experience. - Improved icon usage by adding download functionality alongside existing share options. --- .../components/modals/share-file-modal.tsx | 41 +++++++++++++++--- .../modals/share-multiple-files-modal.tsx | 42 ++++++++++++++++--- 2 files changed, 73 insertions(+), 10 deletions(-) diff --git a/apps/web/src/components/modals/share-file-modal.tsx b/apps/web/src/components/modals/share-file-modal.tsx index 54a83de..e4de6b4 100644 --- a/apps/web/src/components/modals/share-file-modal.tsx +++ b/apps/web/src/components/modals/share-file-modal.tsx @@ -1,8 +1,9 @@ "use client"; import { useEffect, useState } from "react"; -import { IconCalendar, IconCopy, IconEye, IconLink, IconLock, IconShare } from "@tabler/icons-react"; +import { IconCalendar, IconCopy, IconDownload, IconEye, IconLink, IconLock, IconShare } from "@tabler/icons-react"; import { useTranslations } from "next-intl"; +import QRCode from "react-qr-code"; import { toast } from "sonner"; import { Button } from "@/components/ui/button"; @@ -123,6 +124,18 @@ export function ShareFileModal({ isOpen, file, onClose, onSuccess }: ShareFileMo toast.success(t("generateShareLink.copied")); }; + const downloadQRCode = () => { + const canvas = document.getElementById("share-file-qr-code") as HTMLCanvasElement; + if (canvas) { + const link = document.createElement("a"); + link.download = "share-file-qr-code.png"; + link.href = canvas.toDataURL("image/png"); + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + } + }; + const handleClose = () => { onClose(); setTimeout(() => { @@ -259,8 +272,26 @@ export function ShareFileModal({ isOpen, file, onClose, onSuccess }: ShareFileMo ) : ( <> +
+
+ {/* For SSR safety */} + +
+

{t("shareFile.linkReady")}

- +
+ + +
)} @@ -294,9 +325,9 @@ export function ShareFileModal({ isOpen, file, onClose, onSuccess }: ShareFileMo - )} diff --git a/apps/web/src/components/modals/share-multiple-files-modal.tsx b/apps/web/src/components/modals/share-multiple-files-modal.tsx index ad01f6e..695a704 100644 --- a/apps/web/src/components/modals/share-multiple-files-modal.tsx +++ b/apps/web/src/components/modals/share-multiple-files-modal.tsx @@ -1,8 +1,9 @@ "use client"; import { useEffect, useState } from "react"; -import { IconCalendar, IconCopy, IconEye, IconLink, IconLock, IconShare } from "@tabler/icons-react"; +import { IconCalendar, IconCopy, IconDownload, IconEye, IconLink, IconLock, IconShare } from "@tabler/icons-react"; import { useTranslations } from "next-intl"; +import QRCode from "react-qr-code"; import { toast } from "sonner"; import { Button } from "@/components/ui/button"; @@ -115,6 +116,19 @@ export function ShareMultipleFilesModal({ files, isOpen, onClose, onSuccess }: S toast.success(t("generateShareLink.copied")); }; + const downloadQRCode = () => { + const qrCodeElement = document.getElementById("share-multiple-files-qr-code"); + if (qrCodeElement) { + const canvas = qrCodeElement.querySelector("canvas"); + if (canvas) { + const link = document.createElement("a"); + link.download = "share-multiple-files-qr-code.png"; + link.href = canvas.toDataURL("image/png"); + link.click(); + } + } + }; + const handleClose = () => { onClose(); setTimeout(() => { @@ -282,8 +296,26 @@ export function ShareMultipleFilesModal({ files, isOpen, onClose, onSuccess }: S ) : ( <> +
+
+ {/* For SSR safety */} + +
+

{t("shareFile.linkReady")}

- +
+ + +
)} @@ -323,9 +355,9 @@ export function ShareMultipleFilesModal({ files, isOpen, onClose, onSuccess }: S - )}