1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-03 07:55:36 +00:00

Fix sys admin in no Pro version (#7336)

* fix repo history is less than 0

* fix setting button icon is green

* fix admin statistic time lang

* fix statistics traffic list when change page
This commit is contained in:
Michael An
2025-01-08 15:57:38 +08:00
committed by GitHub
parent cd9780dac1
commit 5a8c9149b9
5 changed files with 23 additions and 19 deletions

View File

@@ -50,11 +50,9 @@ class SysAdminLibHistorySettingDialog extends React.Component {
days = this.state.expireDays;
}
let repoID = this.props.repoID;
let reg = /^-?\d+$/;
let flag = reg.test(days);
if (flag) {
if (Number(days) > 0) {
let message = gettext('Successfully set library history.');
systemAdminAPI.sysAdminUpdateRepoHistorySetting(repoID, days).then(res => {
systemAdminAPI.sysAdminUpdateRepoHistorySetting(repoID, parseInt(days)).then(res => {
toaster.success(message);
this.setState({ keepDays: res.data.keep_days });
this.props.toggleDialog();