mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-10-30 09:43:43 -04:00
docs/update outline (#471)
* docs update * reorganize * plausible analytics Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
@@ -110,15 +110,19 @@ export default {
|
||||
this.$refs.deleteRecipieConfirm.open();
|
||||
break;
|
||||
case "share":
|
||||
if (navigator.share){
|
||||
navigator.share({
|
||||
title: this.name,
|
||||
text: this.recipeText,
|
||||
url: this.recipeURL,
|
||||
})
|
||||
.then(() => console.log('Successful share'))
|
||||
.catch((error) => console.log('WebShareAPI not supported', error))
|
||||
} else this.updateClipboard();
|
||||
if (navigator.share) {
|
||||
navigator
|
||||
.share({
|
||||
title: this.name,
|
||||
text: this.recipeText,
|
||||
url: this.recipeURL,
|
||||
})
|
||||
.then(() => console.log("Successful share"))
|
||||
.catch(error => {
|
||||
console.log("WebShareAPI not supported", error);
|
||||
this.updateClipboard();
|
||||
});
|
||||
} else this.updateClipboard();
|
||||
break;
|
||||
case "edit":
|
||||
this.$router.push(`/recipe/${this.slug}` + "?edit=true");
|
||||
@@ -138,10 +142,13 @@ export default {
|
||||
updateClipboard() {
|
||||
const copyText = this.recipeURL;
|
||||
navigator.clipboard.writeText(copyText).then(
|
||||
() => { console.log("Copied to Clipboard", copyText);
|
||||
utils.notify.success("Copied to Clipboard");},
|
||||
() => console.log("Copied Failed", copyText));
|
||||
() => {
|
||||
console.log("Copied to Clipboard", copyText);
|
||||
utils.notify.success("Copied to Clipboard");
|
||||
},
|
||||
() => console.log("Copied Failed", copyText)
|
||||
);
|
||||
},
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user