feat(web,server): external domain setting (#6146)
* feat: external domain setting * chore: open api * mobile: handle serverconfig-externalDomain --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import ControlAppBar from '$lib/components/shared-components/control-app-bar.svelte';
|
||||
import { api, copyToClipboard, SharedLinkResponseDto } from '@api';
|
||||
import { api, copyToClipboard, makeSharedLinkUrl, SharedLinkResponseDto } from '@api';
|
||||
import { goto } from '$app/navigation';
|
||||
import SharedLinkCard from '$lib/components/sharedlinks-page/shared-link-card.svelte';
|
||||
import {
|
||||
@@ -13,6 +13,7 @@
|
||||
import { handleError } from '$lib/utils/handle-error';
|
||||
import { AppRoute } from '$lib/constants';
|
||||
import { mdiArrowLeft } from '@mdi/js';
|
||||
import { serverConfig } from '$lib/stores/server-config.store';
|
||||
|
||||
let sharedLinks: SharedLinkResponseDto[] = [];
|
||||
let editSharedLink: SharedLinkResponseDto | null = null;
|
||||
@@ -49,7 +50,7 @@
|
||||
};
|
||||
|
||||
const handleCopyLink = async (key: string) => {
|
||||
await copyToClipboard(`${window.location.origin}/share/${key}`);
|
||||
await copyToClipboard(makeSharedLinkUrl($serverConfig.externalDomain, key));
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user