mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-14 04:20:07 +02:00
support secondary public server URL
This commit is contained in:
@@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { useShareItem } from '/@/renderer/features/sharing/mutations/share-item-mutation';
|
||||
import { useCurrentServer } from '/@/renderer/store';
|
||||
import { getServerUrl } from '/@/renderer/utils/normalize-server-url';
|
||||
import { DateTimePicker } from '/@/shared/components/date-time-picker/date-time-picker';
|
||||
import { Group } from '/@/shared/components/group/group';
|
||||
import { ModalButton } from '/@/shared/components/modal/model-shared';
|
||||
@@ -69,7 +70,9 @@ export const ShareItemContextModal = ({
|
||||
if (!server) throw new Error('Server not found');
|
||||
if (!_data?.id) throw new Error('Failed to share item');
|
||||
|
||||
const shareUrl = `${server.url}/share/${_data.id}`;
|
||||
const serverUrl = getServerUrl(server, true);
|
||||
if (!serverUrl) throw new Error('Server URL not found');
|
||||
const shareUrl = `${serverUrl}/share/${_data.id}`;
|
||||
|
||||
navigator.clipboard.writeText(shareUrl);
|
||||
toast.success({
|
||||
|
||||
Reference in New Issue
Block a user