feat: chat layout setting

This commit is contained in:
Tristan Yang
2023-05-15 13:17:18 +08:00
parent 27204a1c11
commit a71a00d493
5 changed files with 75 additions and 15 deletions
+7
View File
@@ -170,6 +170,13 @@ export const serverApi = createApi({
}),
getSystemCommon: builder.query<SystemCommon, void>({
query: () => ({ url: `/admin/system/common` }),
transformResponse: (resp: SystemCommon) => {
let tmp = resp;
tmp.chat_layout_mode = resp.chat_layout_mode ?? "Left";
tmp.contact_verification_enable = resp.contact_verification_enable ?? false;
tmp.max_file_expiry_mode = resp.max_file_expiry_mode ?? "Off";
return tmp;
},
async onQueryStarted(data, { dispatch, queryFulfilled }) {
try {
const resp = await queryFulfilled;