From db86f3275b7841740d0f3539952c9c98daaa2e06 Mon Sep 17 00:00:00 2001 From: y8a5y Date: Sun, 21 Dec 2025 14:37:37 +0100 Subject: [PATCH] feature(Sharing section): add Raw Json URL card to Sharing section --- .../sidebars/right/sections/sharing.tsx | 59 ++++++++++++++++--- 1 file changed, 50 insertions(+), 9 deletions(-) diff --git a/apps/client/src/pages/builder/sidebars/right/sections/sharing.tsx b/apps/client/src/pages/builder/sidebars/right/sections/sharing.tsx index b048a5432..c19f28b28 100644 --- a/apps/client/src/pages/builder/sidebars/right/sections/sharing.tsx +++ b/apps/client/src/pages/builder/sidebars/right/sections/sharing.tsx @@ -4,6 +4,7 @@ import { Button, Input, Label, Switch, Tooltip } from "@reactive-resume/ui"; import { AnimatePresence, motion } from "framer-motion"; import { useToast } from "@/client/hooks/use-toast"; +import { axios } from "@/client/libs/axios" import { useUser } from "@/client/services/user"; import { useResumeStore } from "@/client/stores/resume"; @@ -20,6 +21,7 @@ export const SharingSection = () => { // Constants const url = `${window.location.origin}/${username}/${slug}`; + const rawJsonUrl = `${window.location.origin}${axios.defaults.baseURL}/resume/public/${username}/${slug}/stealthily`; const onCopy = async () => { await navigator.clipboard.writeText(url); @@ -31,6 +33,16 @@ export const SharingSection = () => { }); }; + const onRawJsonCopy = async () => { + await navigator.clipboard.writeText(rawJsonUrl); + + toast({ + variant: "success", + title: t`A link has been copied to your clipboard.`, + description: t`Anyone with this link can view and download the json data of the resume. This link will not count towards the resume view count.`, + }); + }; + return (
@@ -65,21 +77,50 @@ export const SharingSection = () => { {isPublic && ( - +
+ -
- +
+ - - - + + + +
+
+ +
+ + +
+ + + + + +
)}