diff --git a/src/client/web/src/components/pane_admin.tsx b/src/client/web/src/components/pane_admin.tsx
index eb1b775..01df2bd 100644
--- a/src/client/web/src/components/pane_admin.tsx
+++ b/src/client/web/src/components/pane_admin.tsx
@@ -268,20 +268,6 @@ export class UserForm extends React.Component<
-
- {this.props.msg.pkg.get("action.reindex.desc")},
- ,
- ])}
- childrenStyles={List([{}, { justifyContent: "flex-end" }])}
- />
-
-
-
-
{
}
};
- reindex = async () => {
- return updater().reindex();
- }
-
addUser = async () => {
if (this.state.newUserPwd1 !== this.state.newUserPwd2) {
Env().alertMsg(this.props.msg.pkg.get("settings.pwd.notSame"));
@@ -876,6 +858,13 @@ export class SiteCfg extends React.Component {
this.props.update(updater().updateUI);
};
+ reindex = async () => {
+ if (!Env().confirmMsg(this.props.msg.pkg.get("action.reindex.confirm"))) {
+ return;
+ }
+ return updater().reindex();
+ };
+
render() {
return (
@@ -1050,6 +1039,17 @@ export class SiteCfg extends React.Component {
/>
+
+
+
+
+
+ {this.props.msg.pkg.get("action.reindex.desc")}
+
+
+
);
}
diff --git a/src/client/web/src/i18n/en_US.ts b/src/client/web/src/i18n/en_US.ts
index a5ef387..1f5b94b 100644
--- a/src/client/web/src/i18n/en_US.ts
+++ b/src/client/web/src/i18n/en_US.ts
@@ -160,5 +160,6 @@ export const msgs: Map = Map({
"action.go": "Go",
"hint.keywords": "Please input keyword(s), separated by spaces",
"action.reindex": "Reindex",
- "action.reindex.desc": "Reconstruct the searching index",
+ "action.reindex.desc": "Reconstruct the search index",
+ "action.reindex.confirm": "If there are a lot of files and folders, rebuilding index may take some time.",
});
diff --git a/src/client/web/src/i18n/zh_CN.ts b/src/client/web/src/i18n/zh_CN.ts
index f06976e..7c762ea 100644
--- a/src/client/web/src/i18n/zh_CN.ts
+++ b/src/client/web/src/i18n/zh_CN.ts
@@ -158,4 +158,5 @@ export const msgs: Map = Map({
"hint.keywords": "请输入关键字,以空格分隔",
"action.reindex": "重新索引",
"action.reindex.desc": "重新建立搜索索引",
+ "action.reindex.confirm": "当文件数量较多,重新建立索引将可能花费一些时间",
});