Merge branch 'codex/profile-mobile-ui-reference'
This commit is contained in:
@@ -251,6 +251,9 @@ fn map_admin_creation_entry_type_config(
|
||||
visible: entry.visible,
|
||||
open: entry.open,
|
||||
sort_order: entry.sort_order,
|
||||
category_id: entry.category_id,
|
||||
category_label: entry.category_label,
|
||||
category_sort_order: entry.category_sort_order,
|
||||
updated_at_micros: entry.updated_at_micros,
|
||||
}
|
||||
}
|
||||
@@ -275,6 +278,9 @@ fn validate_admin_creation_entry_config(
|
||||
visible: payload.visible,
|
||||
open: payload.open,
|
||||
sort_order: payload.sort_order,
|
||||
category_id: payload.category_id.trim().to_string(),
|
||||
category_label: payload.category_label.trim().to_string(),
|
||||
category_sort_order: payload.category_sort_order,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -143,6 +143,15 @@ pub(crate) fn default_creation_entry_config_response() -> CreationEntryConfigRes
|
||||
title: module_runtime::DEFAULT_CREATION_ENTRY_MODAL_TITLE.to_string(),
|
||||
description: module_runtime::DEFAULT_CREATION_ENTRY_MODAL_DESCRIPTION.to_string(),
|
||||
},
|
||||
event_banner: module_runtime::CreationEntryEventBannerSnapshot {
|
||||
title: module_runtime::DEFAULT_CREATION_ENTRY_EVENT_TITLE.to_string(),
|
||||
description: module_runtime::DEFAULT_CREATION_ENTRY_EVENT_DESCRIPTION.to_string(),
|
||||
cover_image_src: module_runtime::DEFAULT_CREATION_ENTRY_EVENT_COVER_IMAGE_SRC
|
||||
.to_string(),
|
||||
prize_pool_mud_points: module_runtime::DEFAULT_CREATION_ENTRY_EVENT_PRIZE_POOL_MUD_POINTS,
|
||||
starts_at_text: module_runtime::DEFAULT_CREATION_ENTRY_EVENT_STARTS_AT_TEXT.to_string(),
|
||||
ends_at_text: module_runtime::DEFAULT_CREATION_ENTRY_EVENT_ENDS_AT_TEXT.to_string(),
|
||||
},
|
||||
creation_types: module_runtime::default_creation_entry_type_snapshots(0),
|
||||
updated_at_micros: 0,
|
||||
})
|
||||
@@ -259,5 +268,8 @@ mod tests {
|
||||
assert!(baby_object_match.open);
|
||||
assert_eq!(baby_object_match.badge, "\u{53ef}\u{521b}\u{5efa}");
|
||||
assert_eq!(baby_object_match.sort_order, 90);
|
||||
assert_eq!(baby_object_match.category_id, "character");
|
||||
assert_eq!(baby_object_match.category_label, "\u{89d2}\u{8272}\u{521b}\u{4f5c}");
|
||||
assert_eq!(baby_object_match.category_sort_order, 40);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -516,6 +516,10 @@ impl AppState {
|
||||
visible: enabled,
|
||||
open: enabled,
|
||||
sort_order: i32::try_from(config.creation_types.len()).unwrap_or(i32::MAX),
|
||||
category_id: module_runtime::DEFAULT_CREATION_ENTRY_CATEGORY_ID.to_string(),
|
||||
category_label: module_runtime::DEFAULT_CREATION_ENTRY_CATEGORY_LABEL
|
||||
.to_string(),
|
||||
category_sort_order: 0,
|
||||
updated_at_micros: 0,
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user