reimplemented copy inline url button after merging upstream changes
This commit is contained in:
parent
f89435c068
commit
9ad0141524
@ -12,6 +12,7 @@
|
|||||||
<th>{{ $t("settings.shareDuration") }}</th>
|
<th>{{ $t("settings.shareDuration") }}</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr v-for="link in links" :key="link.hash">
|
<tr v-for="link in links" :key="link.hash">
|
||||||
@ -32,6 +33,16 @@
|
|||||||
<i class="material-icons">content_paste</i>
|
<i class="material-icons">content_paste</i>
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
|
<td class="small">
|
||||||
|
<button
|
||||||
|
class="action copy-clipboard"
|
||||||
|
:aria-label="$t('buttons.copyInlineToClipboard')"
|
||||||
|
:title="$t('buttons.copyInlineToClipboard')"
|
||||||
|
@click="copyToClipboard(buildInlineLink(link))"
|
||||||
|
>
|
||||||
|
<i class="material-icons">insert_link</i>
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
<td class="small">
|
<td class="small">
|
||||||
<button
|
<button
|
||||||
class="action"
|
class="action"
|
||||||
@ -136,6 +147,7 @@ import { share as api } from "@/api";
|
|||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import { useLayoutStore } from "@/stores/layout";
|
import { useLayoutStore } from "@/stores/layout";
|
||||||
import { copy } from "@/utils/clipboard";
|
import { copy } from "@/utils/clipboard";
|
||||||
|
import { createURL } from "@/api/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "share",
|
name: "share",
|
||||||
@ -247,6 +259,9 @@ export default {
|
|||||||
buildLink(share) {
|
buildLink(share) {
|
||||||
return api.getShareURL(share);
|
return api.getShareURL(share);
|
||||||
},
|
},
|
||||||
|
buildInlineLink(share) {
|
||||||
|
return createURL("api/public/dl/" + share.hash, { inline: "true" });
|
||||||
|
},
|
||||||
sort() {
|
sort() {
|
||||||
this.links = this.links.sort((a, b) => {
|
this.links = this.links.sort((a, b) => {
|
||||||
if (a.expire === 0) return -1;
|
if (a.expire === 0) return -1;
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
"copy": "Copy",
|
"copy": "Copy",
|
||||||
"copyFile": "Copy file",
|
"copyFile": "Copy file",
|
||||||
"copyToClipboard": "Copy to clipboard",
|
"copyToClipboard": "Copy to clipboard",
|
||||||
|
"copyInlineToClipboard": "Copy inline link to clipboard",
|
||||||
"copyDownloadLinkToClipboard": "Copy download link to clipboard",
|
"copyDownloadLinkToClipboard": "Copy download link to clipboard",
|
||||||
"create": "Create",
|
"create": "Create",
|
||||||
"delete": "Delete",
|
"delete": "Delete",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user