11import * as Common from "@frontend/common" ;
22import { SendAndArchive } from "@mui/icons-material" ;
3- import { Box , Button , Divider , SelectChangeEvent , Stack , Typography } from "@mui/material" ;
3+ import { Box , Button , Divider , SelectChangeEvent , Stack , TextField , Typography } from "@mui/material" ;
44import { ErrorBoundary , Suspense } from "@suspensive/react" ;
55import { enqueueSnackbar , OptionsObject } from "notistack" ;
66import * as React from "react" ;
77import { Link , Navigate , useParams } from "react-router-dom" ;
88
99import { useAppContext } from "../../contexts/app_context" ;
1010import { SubmitConfirmDialog } from "../dialogs/submit_confirm" ;
11+ import { BlockQuote } from "../elements/blockquote" ;
1112import { ErrorPage } from "../elements/error_page" ;
1213import { LoadingPage } from "../elements/loading_page" ;
1314import { MultiLanguageField , MultiLanguageMarkdownField } from "../elements/multilang_field" ;
@@ -25,6 +26,7 @@ type SessionUpdateSchema = {
2526 summary_en : string ;
2627 description_ko : string ;
2728 description_en : string ;
29+ slideshow_url : string | null ;
2830 image : string | null ;
2931
3032 speakers : {
@@ -62,6 +64,7 @@ export const SessionEditorForm: React.FC<SessionEditorFormProps> = ({ disabled,
6264 const setTitle = ( value : string | undefined , lang : "ko" | "en" ) => setFormState ( ( ps ) => ( { ...ps , [ `title_${ lang } ` ] : value } ) ) ;
6365 const setSummary = ( value : string | undefined , lang : "ko" | "en" ) => setFormState ( ( ps ) => ( { ...ps , [ `summary_${ lang } ` ] : value } ) ) ;
6466 const setDescription = ( value : string | undefined , lang : "ko" | "en" ) => setFormState ( ( ps ) => ( { ...ps , [ `description_${ lang } ` ] : value } ) ) ;
67+ const setSlideshowUrl = ( slideshow_url : string ) => setFormState ( ( ps ) => ( { ...ps , slideshow_url } ) ) ;
6568 const setImage = ( image : string | null ) => setFormState ( ( ps ) => ( { ...ps , image } ) ) ;
6669 const setSpeakerImage = ( image : string | null ) => setFormState ( ( ps ) => ( { ...ps , speakers : [ { ...speaker , image } ] } ) ) ;
6770 const setSpeakerBiography = ( value : string | undefined , lang : "ko" | "en" ) =>
@@ -75,6 +78,17 @@ export const SessionEditorForm: React.FC<SessionEditorFormProps> = ({ disabled,
7578 const speaker = formState . speakers [ 0 ] ;
7679
7780 const titleStr = language === "ko" ? "발표 정보 수정" : "Edit Session Information" ;
81+ const slideShowStr = language === "ko" ? "발표 슬라이드쇼 URL" : "Session Slideshow URL" ;
82+ const slideShowDescription =
83+ language === "ko" ? (
84+ < Typography variant = "body2" color = "textSecondary" >
85+ 발표 중에 사용할 슬라이드 자료 URL을 입력해주세요. (선택 사항)
86+ </ Typography >
87+ ) : (
88+ < Typography variant = "body2" color = "textSecondary" >
89+ Please enter the URL of the slideshow material to be used during the session. (Optional)
90+ </ Typography >
91+ ) ;
7892 const sessionEditDescription =
7993 language === "ko" ? (
8094 < Typography variant = "body2" color = "textSecondary" >
@@ -124,6 +138,17 @@ export const SessionEditorForm: React.FC<SessionEditorFormProps> = ({ disabled,
124138 disabled = { disabled }
125139 fullWidth
126140 />
141+ < Common . Components . Fieldset legend = { slideShowStr } >
142+ < BlockQuote children = { slideShowDescription } />
143+ < TextField
144+ label = { slideShowStr }
145+ value = { formState . slideshow_url || "" }
146+ onChange = { ( e ) => setSlideshowUrl ( e . target . value ) }
147+ disabled = { disabled }
148+ sx = { { mt : 2 } }
149+ fullWidth
150+ />
151+ </ Common . Components . Fieldset >
127152 < MultiLanguageField
128153 label = { { ko : "발표 요약" , en : "Session Summary" } }
129154 description = { { ko : "발표를 짧게 요약해주세요." , en : "Please enter the short session summary." } }
@@ -135,7 +160,7 @@ export const SessionEditorForm: React.FC<SessionEditorFormProps> = ({ disabled,
135160 fullWidth
136161 />
137162 < MultiLanguageMarkdownField
138- label = { { ko : "발표 내용 " , en : "Session Description" } }
163+ label = { { ko : "발표 상세 " , en : "Session Description" } }
139164 description = { {
140165 ko : "발표의 상세 내용을 입력해주세요.\n상세 설명은 마크다운 문법을 지원합니다." ,
141166 en : "Please enter the description of the session.\nDetailed descriptions support Markdown syntax." ,
0 commit comments