Add EnableExtraPages
This commit is contained in:
parent
fb87ef67a3
commit
f89602338e
|
@ -276,41 +276,38 @@ class App extends Component {
|
|||
</Link>
|
||||
</Menu.Item>
|
||||
);
|
||||
res.push(
|
||||
<Menu.Item key="/resources">
|
||||
<a target="_blank" rel="noreferrer" href={Setting.getMyProfileUrl(this.state.account).replace("/account", "/permissions")}>
|
||||
{i18next.t("general:Permissions")}
|
||||
</a>
|
||||
</Menu.Item>
|
||||
);
|
||||
// res.push(
|
||||
// <Menu.Item key="/clustering">
|
||||
// <Link to="/clustering">
|
||||
// {i18next.t("general:Clustering")}
|
||||
// </Link>
|
||||
// </Menu.Item>
|
||||
// );
|
||||
res.push(
|
||||
<Menu.Item key="/wordsets">
|
||||
<Link to="/wordsets">
|
||||
{i18next.t("general:Wordsets")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
);
|
||||
res.push(
|
||||
<Menu.Item key="/factorsets">
|
||||
<Link to="/factorsets">
|
||||
{i18next.t("general:Factorsets")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
);
|
||||
res.push(
|
||||
<Menu.Item key="/videos">
|
||||
<Link to="/videos">
|
||||
{i18next.t("general:Videos")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
);
|
||||
|
||||
if (Conf.EnableExtraPages) {
|
||||
res.push(
|
||||
<Menu.Item key="/clustering">
|
||||
<Link to="/clustering">
|
||||
{i18next.t("general:Clustering")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
);
|
||||
res.push(
|
||||
<Menu.Item key="/wordsets">
|
||||
<Link to="/wordsets">
|
||||
{i18next.t("general:Wordsets")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
);
|
||||
res.push(
|
||||
<Menu.Item key="/factorsets">
|
||||
<Link to="/factorsets">
|
||||
{i18next.t("general:Factorsets")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
);
|
||||
res.push(
|
||||
<Menu.Item key="/videos">
|
||||
<Link to="/videos">
|
||||
{i18next.t("general:Videos")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
);
|
||||
}
|
||||
|
||||
res.push(
|
||||
<Menu.Item key="/providers">
|
||||
<Link to="/providers">
|
||||
|
@ -325,12 +322,19 @@ class App extends Component {
|
|||
</Link>
|
||||
</Menu.Item>
|
||||
);
|
||||
res.push(
|
||||
<Menu.Item key="/permissions">
|
||||
<a target="_blank" rel="noreferrer" href={Setting.getMyProfileUrl(this.state.account).replace("/account", "/permissions")}>
|
||||
{i18next.t("general:Permissions")}
|
||||
</a>
|
||||
</Menu.Item>
|
||||
);
|
||||
|
||||
if (Setting.isLocalAdminUser(this.state.account)) {
|
||||
res.push(
|
||||
<Menu.Item key="/records">
|
||||
<Menu.Item key="/logs">
|
||||
<a target="_blank" rel="noreferrer" href={Setting.getMyProfileUrl(this.state.account).replace("/account", "/records")}>
|
||||
{i18next.t("general:Records")}
|
||||
{i18next.t("general:Logs")}
|
||||
</a>
|
||||
</Menu.Item>
|
||||
);
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
// Copyright 2023 The casbin Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Copyright 2023 The casbin Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
export const AuthConfig = {
|
||||
// serverUrl: "https://door.casdoor.com",
|
||||
serverUrl: "http://localhost:7001",
|
||||
|
@ -24,6 +24,8 @@ export const AuthConfig = {
|
|||
export const DefaultOwner = "admin";
|
||||
export const DefaultWordsetName = "word";
|
||||
|
||||
export const EnableExtraPages = false;
|
||||
|
||||
export const ForceLanguage = "";
|
||||
export const DefaultLanguage = "en";
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"No.": "No.",
|
||||
"Permissions": "Permissions",
|
||||
"Preview": "Preview",
|
||||
"Records": "Records",
|
||||
"Logs": "Logs",
|
||||
"Result": "Result",
|
||||
"Save": "Save",
|
||||
"Stores": "Stores",
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"No.": "序号",
|
||||
"Permissions": "我的权限",
|
||||
"Preview": "预览",
|
||||
"Records": "我的日志",
|
||||
"Logs": "我的日志",
|
||||
"Result": "结果",
|
||||
"Save": "保存",
|
||||
"Stores": "我的数据仓库",
|
||||
|
|
Loading…
Reference in New Issue