diff --git a/src/backend-api/src/main/kotlin/org/icpclive/api/Settings.kt b/src/backend-api/src/main/kotlin/org/icpclive/api/Settings.kt index 784fe6c15..1117bc837 100644 --- a/src/backend-api/src/main/kotlin/org/icpclive/api/Settings.kt +++ b/src/backend-api/src/main/kotlin/org/icpclive/api/Settings.kt @@ -14,7 +14,11 @@ object UnitSettings : ObjectSettings data class AdvertisementSettings(val text: String) : ObjectSettings @Serializable -data class TitleSettings(val preset: String, val data: Map) : ObjectSettings +data class TitleSettings( + val preset: String, + val leftPreset: String? = null, + val rightPreset: String? = null, + val data: Map) : ObjectSettings @Serializable data class PictureSettings(val url: String, val name: String) : ObjectSettings diff --git a/src/frontend/admin/src/components/Title.jsx b/src/frontend/admin/src/components/Title.jsx index b8c0b8152..5444f185a 100644 --- a/src/frontend/admin/src/components/Title.jsx +++ b/src/frontend/admin/src/components/Title.jsx @@ -122,10 +122,38 @@ function TitleTableRow({ data, onShow, onEdit, onDelete }) { const [editData, onClickEdit, onSubmitEdit, onChangeField] = usePresetTableRowDataState(data, onEdit); const [previewDialogOpen, setPreviewDialogOpen] = useState(false); + const changePreset = (presetFile) => { + return function() { + const tempData = Object.assign({}, data); + tempData.settings.preset = presetFile; + onEdit(tempData); + }; + }; + return ( - + + + L + R + + +