Sync service launch links
This commit is contained in:
@@ -40,6 +40,7 @@ import {
|
||||
import type { ServiceAppRole } from "../../entities/access/types";
|
||||
import type { Client, ClientStatus, ClientType } from "../../entities/client/types";
|
||||
import type { Invite, InviteStatus } from "../../entities/invite/types";
|
||||
import { createServiceLaunchLinkPatch, getServiceLaunchLink } from "../../entities/service/links";
|
||||
import type { MediaKind, Service, ServiceMediaSource, ServiceStatus } from "../../entities/service/types";
|
||||
import type { SyncState, SyncStatus } from "../../entities/sync/types";
|
||||
import type {
|
||||
@@ -875,7 +876,7 @@ function ServicesSection({
|
||||
<th>Сервис</th>
|
||||
<th>Slug</th>
|
||||
<th>Статус</th>
|
||||
<th>URL</th>
|
||||
<th>Ссылка запуска</th>
|
||||
<th>Authentik</th>
|
||||
<th aria-label="Редактирование" />
|
||||
<th aria-label="Порядок" />
|
||||
@@ -1007,9 +1008,9 @@ function ServiceTableCells({
|
||||
<td>
|
||||
<input
|
||||
className="admin-table-input"
|
||||
value={service.url}
|
||||
onChange={(event) => onUpdateService(service.id, { url: event.target.value })}
|
||||
aria-label={`URL сервиса ${service.title}`}
|
||||
value={getServiceLaunchLink(service)}
|
||||
onChange={(event) => onUpdateService(service.id, createServiceLaunchLinkPatch(event.target.value))}
|
||||
aria-label={`Ссылка запуска сервиса ${service.title}`}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
@@ -1262,7 +1263,10 @@ function ServiceContentModal({
|
||||
<span>
|
||||
<Link2 size={14} /> Ссылка запуска
|
||||
</span>
|
||||
<input value={draft.launchUrl ?? ""} onChange={(event) => update("launchUrl", event.target.value || null)} />
|
||||
<input
|
||||
value={getServiceLaunchLink(draft)}
|
||||
onChange={(event) => setDraft((current) => ({ ...current, ...createServiceLaunchLinkPatch(event.target.value) }))}
|
||||
/>
|
||||
</label>
|
||||
|
||||
<MediaSourceField
|
||||
@@ -1331,16 +1335,17 @@ function ServiceContentModal({
|
||||
subtitle: draft.subtitle,
|
||||
description: draft.description,
|
||||
fullDescription: draft.fullDescription,
|
||||
launchUrl: draft.launchUrl,
|
||||
coverImageUrl: draft.coverImageUrl,
|
||||
coverMediaKind: draft.coverMediaKind,
|
||||
coverMediaSource: draft.coverMediaSource,
|
||||
coverMediaFileName: draft.coverMediaFileName,
|
||||
ambientVideoUrl: draft.ambientVideoUrl,
|
||||
ambientMediaKind: draft.ambientMediaKind,
|
||||
ambientMediaSource: draft.ambientMediaSource,
|
||||
ambientMediaFileName: draft.ambientMediaFileName,
|
||||
})
|
||||
url: draft.url,
|
||||
launchUrl: draft.launchUrl,
|
||||
coverImageUrl: draft.coverImageUrl,
|
||||
coverMediaKind: draft.coverMediaKind,
|
||||
coverMediaSource: draft.coverMediaSource,
|
||||
coverMediaFileName: draft.coverMediaFileName,
|
||||
ambientVideoUrl: draft.ambientVideoUrl,
|
||||
ambientMediaKind: draft.ambientMediaKind,
|
||||
ambientMediaSource: draft.ambientMediaSource,
|
||||
ambientMediaFileName: draft.ambientMediaFileName,
|
||||
})
|
||||
}
|
||||
>
|
||||
{uploadingSlot ? "Сохраняем файл" : "Сохранить"}
|
||||
|
||||
Reference in New Issue
Block a user