mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
Copy markdown reference
This commit is contained in:
parent
05cf2cbefc
commit
3e3ef0fda8
1 changed files with 20 additions and 3 deletions
|
@ -24,9 +24,14 @@
|
||||||
>
|
>
|
||||||
<v-icon> mdi-download</v-icon>
|
<v-icon> mdi-download</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<v-btn v-else color="error" icon @click="deleteAsset(i)" top>
|
<div v-else>
|
||||||
<v-icon>mdi-delete</v-icon>
|
<v-btn color="error" icon @click="deleteAsset(i)" top>
|
||||||
</v-btn>
|
<v-icon>mdi-delete</v-icon>
|
||||||
|
</v-btn>
|
||||||
|
<v-btn color="primary" icon @click="copyLink(item.name, item.fileName)" top>
|
||||||
|
<v-icon>mdi-content-copy</v-icon>
|
||||||
|
</v-btn>
|
||||||
|
</div>
|
||||||
</v-list-item-action>
|
</v-list-item-action>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
</v-list>
|
</v-list>
|
||||||
|
@ -107,6 +112,11 @@ export default {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
baseURL() {
|
||||||
|
return window.location.origin;
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setFileObject(obj) {
|
setFileObject(obj) {
|
||||||
this.fileObject = obj;
|
this.fileObject = obj;
|
||||||
|
@ -124,6 +134,13 @@ export default {
|
||||||
deleteAsset(index) {
|
deleteAsset(index) {
|
||||||
this.value.splice(index, 1);
|
this.value.splice(index, 1);
|
||||||
},
|
},
|
||||||
|
copyLink(name, fileName) {
|
||||||
|
const copyText = ``;
|
||||||
|
navigator.clipboard.writeText(copyText).then(
|
||||||
|
() => console.log("Copied", copyText),
|
||||||
|
() => console.log("Copied Failed", copyText)
|
||||||
|
);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue