Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix: resolve conflict

shuaif4212e2cd048
diff --cc i18n/en_US.yaml
index 0818309a,b4121379..db294d2e
--- a/i18n/en_US.yaml
+++ b/i18n/en_US.yaml
@@@ -296,7 -301,8 +301,9 @@@ ui
upgrade: Answer Upgrade
maintenance: Website Maintenance
users: Users
+ oauth_callback: Processing
+ http_404: HTTP Error 404
+ http_50X: HTTP Error 500
notifications:
title: Notifications
inbox: Inbox
diff --cc ui/src/common/interface.ts
index 2f6d5b75,507f16a5..d352573b
--- a/ui/src/common/interface.ts
+++ b/ui/src/common/interface.ts
@@@ -129,9 -132,7 +134,8 @@@ export interface UserInfoRes extends Us
*/
mail_status: number;
language: string;
- is_admin: boolean;
e_mail?: string;
+ have_password: boolean;
[prop: string]: any;
}
diff --cc ui/src/components/index.ts
index 99c78e6b,aee1a19a..30ab0ee5
--- a/ui/src/components/index.ts
+++ b/ui/src/components/index.ts
@@@ -32,8 -32,9 +32,10 @@@ import CustomizeTheme from './Customize
import PageTags from './PageTags';
import QuestionListLoader from './QuestionListLoader';
import TagsLoader from './TagsLoader';
+import WelcomeTitle from './WelcomeTitle';
import Counts from './Counts';
+ import QuestionList from './QuestionList';
+ import HotQuestions from './HotQuestions';
export {
Avatar,
@@@ -72,7 -73,8 +74,9 @@@
PageTags,
QuestionListLoader,
TagsLoader,
+ WelcomeTitle,
Counts,
+ QuestionList,
+ HotQuestions,
};
export type { EditorRef, JSONSchema, UISchema };
diff --cc ui/src/pages/Admin/Interface/index.tsx
index 36f173ca,eeed4612..f251d702
--- a/ui/src/pages/Admin/Interface/index.tsx
+++ b/ui/src/pages/Admin/Interface/index.tsx
@@@ -42,8 -45,14 +46,15 @@@ const Interface: FC = () =>
type: 'string',
title: t('time_zone.label'),
description: t('time_zone.text'),
+ default: setting?.time_zone || DEFAULT_TIMEZONE,
},
+ default_avatar: {
+ type: 'string',
+ title: t('avatar.label'),
+ description: t('avatar.text'),
+ enum: SYSTEM_AVATAR_OPTIONS?.map((v) => v.value),
+ enumNames: SYSTEM_AVATAR_OPTIONS?.map((v) => v.label),
+ },
},
};
diff --cc ui/src/pages/Questions/index.tsx
index e688ed91,8c5a1957..a55c7873
--- a/ui/src/pages/Questions/index.tsx
+++ b/ui/src/pages/Questions/index.tsx
@@@ -11,8 -11,16 +11,17 @@@ import * as Type from '@/common/interfa
const Questions: FC = () => {
const { t } = useTranslation('translation', { keyPrefix: 'question' });
+ const { t: t2 } = useTranslation('translation');
const { user: loggedUser } = loggedUserInfoStore((_) => _);
+ const [urlSearchParams] = useSearchParams();
+ const curPage = Number(urlSearchParams.get('page')) || 1;
+ const curOrder = urlSearchParams.get('order') || 'newest';
+ const reqParams: Type.QueryQuestionsReq = {
+ page_size: 20,
+ page: curPage,
+ order: curOrder as Type.QuestionOrderBy,
+ };
+ const { data: listData, isLoading: listLoading } = useQuestionList(reqParams);
const isIndexPage = useMatch('/');
let pageTitle = t('questions', { keyPrefix: 'page_title' });
let slogan = '';
diff --cc ui/src/pages/Users/Register/components/SignUpForm/index.tsx
index cdbc641e,ea856a4f..51b90d25
--- a/ui/src/pages/Users/Register/components/SignUpForm/index.tsx
+++ b/ui/src/pages/Users/Register/components/SignUpForm/index.tsx
@@@ -12,7 -12,7 +12,7 @@@ import
useLegalTos,
useLegalPrivacy,
} from '@/services';
--import userStore from '@/stores/userInfo';
++import userStore from '@/stores/loggedUserInfoStore';
import { handleFormError } from '@/utils';
interface Props {
diff --cc ui/src/stores/index.ts
index 47dc0712,a6c3b143..bae33cd5
--- a/ui/src/stores/index.ts
+++ b/ui/src/stores/index.ts
@@@ -2,7 -2,7 +2,7 @@@ import loginSettingStore from '@/stores
import seoSettingStore from '@/stores/seoSetting';
import toastStore from './toast';
--import loggedUserInfoStore from './userInfo';
++import loggedUserInfoStore from './loggedUserInfoStore';
import siteInfoStore from './siteInfo';
import interfaceStore from './interface';
import brandingStore from './branding';
diff --cc ui/src/stores/loggedUserInfoStore.ts
index 5f24a1fa,52976253..42ec4773
--- a/ui/src/stores/loggedUserInfoStore.ts
+++ b/ui/src/stores/loggedUserInfoStore.ts
@@@ -26,8 -26,7 +26,9 @@@ const initUser: UserInfoRes =
status: '',
mail_status: 1,
language: 'Default',
+ is_admin: false,
+ have_password: true,
+ role_id: 1,
};
const loggedUserInfoStore = create<UserInfoStore>((set) => ({