feat(types): add image types and enhance Post/Comment interfaces
Some checks failed
Admin CI / build-and-push-web (push) Failing after 2m17s
Some checks failed
Admin CI / build-and-push-web (push) Failing after 2m17s
Add PostImage and CommentImage types for handling post/comment images. Update Post interface with likes_count, comments_count, views_count, and images. Update Comment interface with likes_count, replies_count, and images. Add display_name and priority to Role type. Include dynamic color CSS utilities and UI enhancements for Comments/Posts pages. Add defensive empty array fallback for subjects data.
This commit is contained in:
@@ -105,10 +105,12 @@ export default function Users() {
|
||||
const response = await rolesApi.getRoles()
|
||||
const roles = response.data.data || []
|
||||
setAllRoles(roles.map(r => ({
|
||||
id: r.name, // 使用 name 作为 id
|
||||
id: r.name,
|
||||
name: r.name,
|
||||
display_name: r.display_name,
|
||||
description: r.description,
|
||||
created_at: '', // 后端列表接口不返回这些字段
|
||||
priority: r.priority,
|
||||
created_at: '',
|
||||
updated_at: '',
|
||||
})))
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user