mirror of https://gitee.com/answerdev/answer.git
Merge branch 'feat/ui-1.0.3' into 'test'
Feat/ui 1.0.3 See merge request opensource/answer!415
This commit is contained in:
commit
a07fd7d4e9
|
@ -1267,14 +1267,14 @@ ui:
|
|||
branding:
|
||||
page_title: Branding
|
||||
logo:
|
||||
label: Logo
|
||||
label: Logo (optional)
|
||||
msg: Logo cannot be empty.
|
||||
text: The logo image at the top left of your site. Use a wide rectangular image with a height of 56 and an aspect ratio greater than 3:1. If left blank, the site title text will be shown.
|
||||
mobile_logo:
|
||||
label: Mobile Logo (optional)
|
||||
text: The logo used on mobile version of your site. Use a wide rectangular image with a height of 56. If left blank, the image from the “logo” setting will be used.
|
||||
square_icon:
|
||||
label: Square Icon
|
||||
label: Square Icon (optional)
|
||||
msg: Square icon cannot be empty.
|
||||
text: Image used as the base for metadata icons. Should ideally be larger than 512x512.
|
||||
favicon:
|
||||
|
|
|
@ -102,6 +102,7 @@ export interface ModifyUserReq {
|
|||
}
|
||||
|
||||
export interface UserInfoBase {
|
||||
id?: string;
|
||||
avatar: any;
|
||||
username: string;
|
||||
display_name: string;
|
||||
|
|
|
@ -14,12 +14,16 @@ const usePageUsers = () => {
|
|||
getUsers,
|
||||
setUsers: (data: Types.PageUser | Types.PageUser[]) => {
|
||||
if (data instanceof Array) {
|
||||
if (data.length === 0) {
|
||||
return;
|
||||
}
|
||||
setUsers(uniqBy([...users, ...data], 'userName'));
|
||||
globalUsers = uniqBy([...globalUsers, ...data], 'userName');
|
||||
} else {
|
||||
setUsers(uniqBy([...users, data], 'userName'));
|
||||
globalUsers = uniqBy([...globalUsers, data], 'userName');
|
||||
}
|
||||
console.log('users', globalUsers);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
|
|
@ -18,10 +18,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
:root {
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
padding: 0;
|
||||
|
|
|
@ -104,9 +104,24 @@ const Index = () => {
|
|||
const res = await questionDetail(qid);
|
||||
if (res) {
|
||||
setUsers([
|
||||
res.user_info,
|
||||
res?.update_user_info,
|
||||
res?.last_answered_user_info,
|
||||
{
|
||||
id: res.user_info.id,
|
||||
displayName: res.user_info.display_name,
|
||||
userName: res.user_info.username,
|
||||
avatar_url: res.user_info.avatar,
|
||||
},
|
||||
{
|
||||
id: res?.update_user_info?.id,
|
||||
displayName: res?.update_user_info?.display_name,
|
||||
userName: res?.update_user_info?.username,
|
||||
avatar_url: res?.update_user_info?.avatar,
|
||||
},
|
||||
{
|
||||
id: res?.last_answered_user_info?.id,
|
||||
displayName: res?.last_answered_user_info?.display_name,
|
||||
userName: res?.last_answered_user_info?.username,
|
||||
avatar_url: res?.last_answered_user_info?.avatar,
|
||||
},
|
||||
]);
|
||||
setQuestion(res);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue