actually follow correct pattern
This commit is contained in:
@@ -55,9 +55,9 @@ fetch('/api/export/${userId}')
|
|||||||
.catch((e)=>{e.text().then((text)=>{alert(text);});})
|
.catch((e)=>{e.text().then((text)=>{alert(text);});})
|
||||||
.then((r)=>{r.text().then((text)=>{alert(text);});});
|
.then((r)=>{r.text().then((text)=>{alert(text);});});
|
||||||
}
|
}
|
||||||
function openPlan(planId){window.open(\`${config.api.publicDomain}/share/\${planId}\`);}
|
function openPlan(planId){window.open(\`${config.api.publicDomain}/share#\${planId}\`);}
|
||||||
async function sharePlan(planId){
|
async function sharePlan(planId){
|
||||||
const link=\`${config.api.publicDomain}/share/\${planId}\`;
|
const link=\`${config.api.publicDomain}/share#\${planId}\`;
|
||||||
try{await navigator.clipboard.writeText(link);alert('Link copied to clipboard');}
|
try{await navigator.clipboard.writeText(link);alert('Link copied to clipboard');}
|
||||||
catch (error){prompt('Failed to copy to clipboard, please select and copy the link below:',link);}
|
catch (error){prompt('Failed to copy to clipboard, please select and copy the link below:',link);}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user