Compare commits

...

14 Commits

Author SHA1 Message Date
LinkinStars 81d9eb136d style(sideNav): update ASF header 2025-12-11 11:44:21 +08:00
LinkinStars f4b6caea77 docs(Makefile): upgrade version to 1.7.1 2025-12-11 11:39:32 +08:00
LinkinStars 570ee76979 Merge branch 'feat/1.7.1/answer' into test
# Conflicts:
#	internal/service/content/answer_service.go
2025-12-11 10:51:51 +08:00
LinkinStars 48fc64d22f Merge remote-tracking branch 'origin/dev' into test 2025-12-11 10:51:32 +08:00
shuai 5358650e12 fix: The page tag selector exceeds the page height, causing the page to scroll. 2025-12-10 12:04:10 +08:00
shuai c514731c8e Merge branch 'test' of github.com:apache/answer into test 2025-12-05 11:13:11 +08:00
shuai ab759755ec fix: When the input box's type is set to number, the result is forcibly converted to the number type. #1425 2025-12-05 11:12:58 +08:00
LinkinStars 26ded22131 Merge remote-tracking branch 'origin/dev' into test 2025-12-05 10:47:34 +08:00
shuai d67c7e2c60 fix: footer layout adjustment 2025-12-01 12:28:16 +08:00
shuai b54e734e60 fix: footer layout adjustment 2025-12-01 11:37:48 +08:00
shuai 5c2c63f852 Merge branch 'dev' into test 2025-12-01 11:00:11 +08:00
LinkinStars da27577d9c fix(answer): update QuestionID handling in answer update process 2025-11-28 10:49:10 +08:00
shuai 59b2198499 fix: Optimization of request parameters 2025-11-18 11:12:12 +08:00
shuai 1295b09ecb fix: fix the issue where the comment_id parameter is forcibly converted to a string, causing a 500 error in the PostgreSQL database interface. #1426 2025-11-18 10:55:11 +08:00
17 changed files with 83 additions and 65 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
.PHONY: build clean ui
VERSION=1.7.0
VERSION=1.7.1
BIN=answer
DIR_SRC=./cmd/answer
DOCKER_CMD=docker
+1 -1
View File
@@ -23,7 +23,7 @@ To learn more about the project, visit [answer.apache.org](https://answer.apache
### Running with docker
```bash
docker run -d -p 9080:80 -v answer-data:/data --name answer apache/answer:1.7.0
docker run -d -p 9080:80 -v answer-data:/data --name answer apache/answer:1.7.1
```
For more information, see [Installation](https://answer.apache.org/docs/installation).
+2 -3
View File
@@ -1208,9 +1208,7 @@ ui:
search:
placeholder: Search
footer:
build_on: >-
Powered by <1> Apache Answer </1>- the open-source software that powers Q&A
communities.<br />Made with love © {{cc}}.
build_on: Powered by <1> Apache Answer </1>
upload_img:
name: Change
loading: loading...
@@ -1807,6 +1805,7 @@ ui:
branding: Branding
legal: Legal
write: Write
terms: Terms
tos: Terms of Service
privacy: Privacy
seo: SEO
+2 -2
View File
@@ -1190,8 +1190,7 @@ ui:
search:
placeholder: 搜索
footer:
build_on: >-
由 <1>Apache Answer</1> 提供动力 - 驱动问答社区的开源软件。<br />用爱制造 © {{cc}}.
build_on: 由 <1>Apache Answer</1> 提供动力
upload_img:
name: 更改
loading: 加载中...
@@ -1768,6 +1767,7 @@ ui:
branding: 品牌
legal: 法律条款
write: 撰写
terms: 服务条款
tos: 服务条款
privacy: 隐私政策
seo: SEO
+6 -3
View File
@@ -17,12 +17,15 @@
* under the License.
*/
.answer-container {
.main-mx-with {
width: 100%;
min-height: calc(100vh - 95px - 62px);
max-width: 1072px;
}
.answer-container {
min-height: calc(100vh - 53px - 62px);
}
.page-right-side {
flex: none;
width: 300px;
@@ -31,7 +34,7 @@
// lg
@media screen and (max-width: 1199.9px) {
.answer-container {
.main-mx-with {
padding-left: 12px;
padding-right: 12px;
}
+1 -1
View File
@@ -53,7 +53,7 @@ import './index.scss';
interface IProps {
objectId: string;
mode?: 'answer' | 'question';
commentId?: string;
commentId?: string | null;
children?: React.ReactNode;
}
+29 -25
View File
@@ -21,6 +21,7 @@ import React from 'react';
import { Link } from 'react-router-dom';
import { Trans, useTranslation } from 'react-i18next';
import Row from 'react-bootstrap/Row';
import dayjs from 'dayjs';
import { siteInfoStore } from '@/stores';
@@ -29,34 +30,37 @@ const Index = () => {
const { t } = useTranslation('translation', { keyPrefix: 'footer' }); // Scoped translations for footer
const fullYear = dayjs().format('YYYY');
const siteName = siteInfoStore((state) => state.siteInfo.name);
const cc = `${fullYear} ${siteName}`;
const cc = `${siteName} © ${fullYear}`;
return (
<footer className="py-3 w-100">
<p className="text-center mb-0 small">
{/* Link to Terms of Service with right margin */}
<Link to="/tos" className="me-3">
{t('label', { keyPrefix: 'admin.legal.terms_of_service' })}
</Link>
<Row>
<footer className="py-3 d-flex flex-wrap align-items-center justify-content-between text-secondary small">
<div className="d-flex align-items-center">
<div className="me-3">{cc}</div>
{/* Link to Privacy Policy with right margin for spacing */}
<Link to="/privacy">
{t('label', { keyPrefix: 'admin.legal.privacy_policy' })}
</Link>
</p>
<p className="text-center mb-0 small">
<Trans i18nKey="footer.build_on" values={{ cc }}>
Powered by
{/* eslint-disable-next-line react/jsx-no-target-blank */}
<a href="https://answer.apache.org" target="_blank">
Apache Answer
</a>
- the open-source software that powers Q&A communities.
<br />
Made with love. © 2022 Answer.
</Trans>
</p>
</footer>
<Link to="/tos" className="me-3 link-secondary">
{t('terms', { keyPrefix: 'nav_menus' })}
</Link>
{/* Link to Privacy Policy with right margin for spacing */}
<Link to="/privacy" className="link-secondary">
{t('privacy', { keyPrefix: 'nav_menus' })}
</Link>
</div>
<div>
<Trans i18nKey="footer.build_on" values={{ cc }}>
Powered by
<a
href="https://answer.apache.org"
target="_blank"
className="link-secondary"
rel="noreferrer">
Apache Answer
</a>
</Trans>
</div>
</footer>
</Row>
);
};
@@ -64,7 +64,7 @@ const Index: FC<Props> = ({
...formData,
[name]: {
...formData[name],
value,
value: type === 'number' ? Number(value) : value,
isInvalid: false,
},
};
+3 -3
View File
@@ -53,7 +53,9 @@ img[src=''] {
}
.page-main {
overflow-x: auto;
min-width: 0;
overflow-wrap: break-word;
word-break: break-word;
}
.btn-link {
@@ -127,8 +129,6 @@ img[src=''] {
margin-top: auto !important;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
padding-left: 12px !important;
padding-right: 12px !important;
}
.bg-f5 {
+1 -1
View File
@@ -52,7 +52,7 @@ const Badges: FC = () => {
const { data, isLoading, mutate } = useQueryBadges({
page: curPage,
page_size: PAGE_SIZE,
q: curQuery,
...(curQuery ? { q: curQuery } : {}),
...(curFilter === 'all' ? {} : { status: curFilter }),
});
+2 -2
View File
@@ -59,7 +59,7 @@ const Smtp: FC = () => {
enumNames: ['TLS', 'SSL', 'None'],
},
smtp_port: {
type: 'string',
type: 'number',
title: t('smtp_port.label'),
description: t('smtp_port.text'),
},
@@ -160,7 +160,7 @@ const Smtp: FC = () => {
from_name: formData.from_name.value,
smtp_host: formData.smtp_host.value,
encryption: formData.encryption.value,
smtp_port: Number(formData.smtp_port.value),
smtp_port: formData.smtp_port.value,
smtp_authentication: formData.smtp_authentication.value,
...(formData.smtp_authentication.value
? { smtp_username: formData.smtp_username.value }
+6 -2
View File
@@ -54,7 +54,7 @@ const Index: FC = () => {
</div>
<div className="flex-fill w-100">
<div className="d-flex justify-content-center px-0 px-md-4">
<div className="answer-container">
<div className="answer-container main-mx-with">
<Row className="py-4">
<Col className="page-main flex-auto">
<Outlet />
@@ -65,7 +65,11 @@ const Index: FC = () => {
</Row>
</div>
</div>
<Footer />
<div className="d-flex justify-content-center px-0 px-md-4">
<div className="main-mx-with">
<Footer />
</div>
</div>
</div>
</div>
);
@@ -169,7 +169,7 @@ const Index: FC<Props> = ({
<Comment
objectId={data.id}
mode="answer"
commentId={String(searchParams.get('commentId'))}>
commentId={searchParams.get('commentId')}>
<Operate
qid={data.question_id}
aid={data.id}
@@ -189,7 +189,7 @@ const Index: FC<Props> = ({ data, initPage, hasAnswer, isLogged }) => {
<Comment
objectId={data?.id}
mode="question"
commentId={String(searchParams.get('commentId'))}>
commentId={searchParams.get('commentId')}>
<Operate
qid={data?.id}
type="question"
+6 -2
View File
@@ -34,11 +34,15 @@ const Index: FC = () => {
</div>
<div className="flex-fill w-100 overflow-x-hidden">
<div className="d-flex justify-content-center px-0 px-md-4">
<div className="answer-container">
<div className="answer-container main-mx-with">
<Outlet />
</div>
</div>
<Footer />
<div className="d-flex justify-content-center">
<div className="main-mx-with">
<Footer />
</div>
</div>
</div>
</div>
);
+1 -1
View File
@@ -24,7 +24,7 @@ import request from '@/utils/request';
import type * as Type from '@/common/interface';
export const useQueryBadges = (params) => {
const apiUrl = `/answer/admin/api/badges?${qs.stringify(params)}`;
const apiUrl = `/answer/admin/api/badges?${qs.stringify(params, { skipNulls: true })}`;
const { data, error, mutate } = useSWR<
Type.ListResult<Type.AdminBadgeListItem>,
Error
+19 -15
View File
@@ -19,21 +19,25 @@
-->
{{define "footer"}}
<footer class="py-3 bg-light w-100">
<p class="text-center mb-0 small">
<a class="me-3" href="{{$.baseURL}}/tos" data-discover="true">
{{translator $.language "ui.admin.legal.terms_of_service.label"}}
</a>
<a href="{{$.baseURL}}/privacy" data-discover="true">
{{translator $.language "ui.admin.legal.privacy_policy.label"}}
</a>
</p>
<p class="text-center mb-0 small text-secondary">
{{$cc := (join " " .siteinfo.Year .siteinfo.General.Name) -}}
{{- $ft := translator $.language "ui.footer.build_on" "cc" $cc -}}
{{templateHTML (replaceHTMLTag $ft "<a href=\"https://answer.apache.org/\" target=\"_blank\"> Answer </a>")}}
</p>
</footer>
<div class="main-mx-with">
<div class="row">
<footer class="py-3 d-flex flex-wrap align-items-center justify-content-between text-secondary small">
<div class="d-flex align-items-center">
{{$cc := (join " " .siteinfo.General.Name .siteinfo.Year)}}
<div className="me-3">{{- $ft := translator $.language "ui.footer.build_on" "cc" $cc -}}</div>
<a class="me-3" href="{{$.baseURL}}/tos" data-discover="true" class="link-secondary">
{{translator $.language "ui.admin.legal.terms_of_service.label"}}
</a>
<a href="{{$.baseURL}}/privacy" data-discover="true" class="link-secondary">
{{translator $.language "ui.admin.legal.privacy_policy.label"}}
</a>
</div>
<div class="text-center mb-0 small text-secondary link-secondary">
{{templateHTML (replaceHTMLTag $ft "<a href=\"https://answer.apache.org/\" target=\"_blank\"> Answer </a>")}}
</div>
</footer>
</div>
</div>
</div>
</div>
</div>