reimplemented copy inline url button after merging upstream changes

This commit is contained in:
Kosmos 2025-11-17 06:14:12 +01:00
parent f89435c068
commit 9ad0141524
2 changed files with 16 additions and 0 deletions

View File

@ -12,6 +12,7 @@
<th>{{ $t("settings.shareDuration") }}</th>
<th></th>
<th></th>
<th></th>
</tr>
<tr v-for="link in links" :key="link.hash">
@ -32,6 +33,16 @@
<i class="material-icons">content_paste</i>
</button>
</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">
<button
class="action"
@ -136,6 +147,7 @@ import { share as api } from "@/api";
import dayjs from "dayjs";
import { useLayoutStore } from "@/stores/layout";
import { copy } from "@/utils/clipboard";
import { createURL } from "@/api/utils";
export default {
name: "share",
@ -247,6 +259,9 @@ export default {
buildLink(share) {
return api.getShareURL(share);
},
buildInlineLink(share) {
return createURL("api/public/dl/" + share.hash, { inline: "true" });
},
sort() {
this.links = this.links.sort((a, b) => {
if (a.expire === 0) return -1;

View File

@ -7,6 +7,7 @@
"copy": "Copy",
"copyFile": "Copy file",
"copyToClipboard": "Copy to clipboard",
"copyInlineToClipboard": "Copy inline link to clipboard",
"copyDownloadLinkToClipboard": "Copy download link to clipboard",
"create": "Create",
"delete": "Delete",