mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-20 21:59:40 +02:00
docs/update outline (#471)
* docs update * reorganize * plausible analytics Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
parent
95b6ab86d0
commit
a75de6d1cf
29 changed files with 104 additions and 78 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue