platform/lms-adm-fe release promotion snapshot
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
export type InstructorPlatform = {
|
||||
camera?: { url: string; password: string };
|
||||
id: string;
|
||||
masterPlatformId: string;
|
||||
name: string;
|
||||
@@ -190,6 +191,8 @@ export async function updateInstructorPlatform(
|
||||
algorithms: PlatformAlgorithms,
|
||||
controlDurationMinutes: number,
|
||||
controlWarningMinutes: number,
|
||||
cameraViewUrl: string,
|
||||
cameraPassword: string,
|
||||
): Promise<InstructorPlatformsResponse> {
|
||||
const response = await fetch(`${LMS_API_BASE_URL}/instructor/platforms/${platformId}`, {
|
||||
method: 'PUT',
|
||||
@@ -207,6 +210,8 @@ export async function updateInstructorPlatform(
|
||||
algorithms,
|
||||
controlDurationMinutes,
|
||||
controlWarningMinutes,
|
||||
cameraViewUrl,
|
||||
cameraPassword,
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
@@ -86,6 +86,8 @@ export function PlatformsPage({ session }: { session: AuthSession }) {
|
||||
});
|
||||
const [settingsControlDurationMinutes, setSettingsControlDurationMinutes] = useState(30);
|
||||
const [settingsControlWarningMinutes, setSettingsControlWarningMinutes] = useState(5);
|
||||
const [settingsCameraUrl, setSettingsCameraUrl] = useState('');
|
||||
const [settingsCameraPassword, setSettingsCameraPassword] = useState('');
|
||||
const [saving, setSaving] = useState(false);
|
||||
const [deletingPlatformId, setDeletingPlatformId] = useState<string | null>(null);
|
||||
const [deleteTarget, setDeleteTarget] = useState<InstructorPlatform | null>(null);
|
||||
@@ -195,6 +197,8 @@ export function PlatformsPage({ session }: { session: AuthSession }) {
|
||||
setSettingsAlgorithms(settingsTarget?.algorithms ?? defaultAlgorithms);
|
||||
setSettingsControlDurationMinutes(settingsTarget?.controlDurationMinutes ?? 30);
|
||||
setSettingsControlWarningMinutes(settingsTarget?.controlWarningMinutes ?? 5);
|
||||
setSettingsCameraUrl(settingsTarget?.camera?.url ?? '');
|
||||
setSettingsCameraPassword(settingsTarget?.camera?.password ?? '');
|
||||
}, [settingsTarget]);
|
||||
|
||||
const handlePageSizeChange = (nextPageSize: number) => {
|
||||
@@ -379,6 +383,8 @@ export function PlatformsPage({ session }: { session: AuthSession }) {
|
||||
settingsAlgorithms,
|
||||
settingsControlDurationMinutes,
|
||||
settingsControlWarningMinutes,
|
||||
settingsCameraUrl,
|
||||
settingsCameraPassword,
|
||||
);
|
||||
applyPayload(payload);
|
||||
showToast({ title: '플랫폼 설정이 저장되었습니다.', message: nextName });
|
||||
@@ -855,6 +861,19 @@ export function PlatformsPage({ session }: { session: AuthSession }) {
|
||||
|
||||
</div>
|
||||
|
||||
<SettingsSection title="주행장 카메라">
|
||||
<div className="grid min-w-0 gap-3">
|
||||
<SettingsField label="VDO.Ninja 시청 URL">
|
||||
<input type="url" value={settingsCameraUrl} onChange={(event) => setSettingsCameraUrl(event.target.value)}
|
||||
placeholder="https://vdo.ninja/?scene&room=ROOM&view=STREAM"
|
||||
className="h-10 w-full min-w-0 rounded-md border border-[#d1d9e6] px-3 text-[13px] outline-none focus:border-[#2563eb]" />
|
||||
</SettingsField>
|
||||
<SettingsField label="방 비밀번호">
|
||||
<input type="password" autoComplete="new-password" value={settingsCameraPassword} onChange={(event) => setSettingsCameraPassword(event.target.value)}
|
||||
className="h-10 w-full min-w-0 rounded-md border border-[#d1d9e6] px-3 text-[13px] outline-none focus:border-[#2563eb]" />
|
||||
</SettingsField>
|
||||
</div>
|
||||
</SettingsSection>
|
||||
<SettingsSection title="제어 시간 설정">
|
||||
<div className="grid gap-3 md:grid-cols-2">
|
||||
<SettingsField label="1회 제어 시간 (분)">
|
||||
|
||||
Reference in New Issue
Block a user