mirror of
https://github.com/casdoor/casdoor.git
synced 2025-09-09 07:42:56 +08:00
Add EnableChatPages to Conf
This commit is contained in:
@@ -343,9 +343,11 @@ class App extends Component {
|
|||||||
items.push(Setting.getItem(<><SettingOutlined /> {i18next.t("account:My Account")}</>,
|
items.push(Setting.getItem(<><SettingOutlined /> {i18next.t("account:My Account")}</>,
|
||||||
"/account"
|
"/account"
|
||||||
));
|
));
|
||||||
items.push(Setting.getItem(<><CommentOutlined /> {i18next.t("account:Chats & Messages")}</>,
|
if (Conf.EnableChatPages) {
|
||||||
"/chat"
|
items.push(Setting.getItem(<><CommentOutlined /> {i18next.t("account:Chats & Messages")}</>,
|
||||||
));
|
"/chat"
|
||||||
|
));
|
||||||
|
}
|
||||||
items.push(Setting.getItem(<><LogoutOutlined /> {i18next.t("account:Logout")}</>,
|
items.push(Setting.getItem(<><LogoutOutlined /> {i18next.t("account:Logout")}</>,
|
||||||
"/logout"));
|
"/logout"));
|
||||||
|
|
||||||
@@ -411,6 +413,14 @@ class App extends Component {
|
|||||||
res.push(Setting.getItem(<Link to="/">{i18next.t("general:Home")}</Link>, "/"));
|
res.push(Setting.getItem(<Link to="/">{i18next.t("general:Home")}</Link>, "/"));
|
||||||
|
|
||||||
if (Setting.isLocalAdminUser(this.state.account)) {
|
if (Setting.isLocalAdminUser(this.state.account)) {
|
||||||
|
if (Conf.ShowGithubCorner) {
|
||||||
|
res.push(Setting.getItem(<a href={"https://casdoor.com"}>
|
||||||
|
<span style={{fontWeight: "bold", backgroundColor: "rgba(87,52,211,0.4)", marginTop: "12px", paddingLeft: "5px", paddingRight: "5px", display: "flex", alignItems: "center", height: "40px", borderRadius: "5px"}}>
|
||||||
|
🚀 SaaS Hosting 🔥
|
||||||
|
</span>
|
||||||
|
</a>, "#"));
|
||||||
|
}
|
||||||
|
|
||||||
res.push(Setting.getItem(<Link to="/organizations">{i18next.t("general:Organizations")}</Link>,
|
res.push(Setting.getItem(<Link to="/organizations">{i18next.t("general:Organizations")}</Link>,
|
||||||
"/organizations"));
|
"/organizations"));
|
||||||
|
|
||||||
@@ -449,13 +459,15 @@ class App extends Component {
|
|||||||
"/providers"
|
"/providers"
|
||||||
));
|
));
|
||||||
|
|
||||||
res.push(Setting.getItem(<Link to="/chats">{i18next.t("general:Chats")}</Link>,
|
if (Conf.EnableChatPages) {
|
||||||
"/chats"
|
res.push(Setting.getItem(<Link to="/chats">{i18next.t("general:Chats")}</Link>,
|
||||||
));
|
"/chats"
|
||||||
|
));
|
||||||
|
|
||||||
res.push(Setting.getItem(<Link to="/messages">{i18next.t("general:Messages")}</Link>,
|
res.push(Setting.getItem(<Link to="/messages">{i18next.t("general:Messages")}</Link>,
|
||||||
"/messages"
|
"/messages"
|
||||||
));
|
));
|
||||||
|
}
|
||||||
|
|
||||||
res.push(Setting.getItem(<Link to="/resources">{i18next.t("general:Resources")}</Link>,
|
res.push(Setting.getItem(<Link to="/resources">{i18next.t("general:Resources")}</Link>,
|
||||||
"/resources"
|
"/resources"
|
||||||
@@ -476,7 +488,6 @@ class App extends Component {
|
|||||||
res.push(Setting.getItem(<Link to="/subscriptions">{i18next.t("general:Subscriptions")}</Link>,
|
res.push(Setting.getItem(<Link to="/subscriptions">{i18next.t("general:Subscriptions")}</Link>,
|
||||||
"/subscriptions"
|
"/subscriptions"
|
||||||
));
|
));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Setting.isLocalAdminUser(this.state.account)) {
|
if (Setting.isLocalAdminUser(this.state.account)) {
|
||||||
@@ -501,7 +512,6 @@ class App extends Component {
|
|||||||
));
|
));
|
||||||
|
|
||||||
if (Conf.EnableExtraPages) {
|
if (Conf.EnableExtraPages) {
|
||||||
|
|
||||||
res.push(Setting.getItem(<Link to="/products">{i18next.t("general:Products")}</Link>,
|
res.push(Setting.getItem(<Link to="/products">{i18next.t("general:Products")}</Link>,
|
||||||
"/products"
|
"/products"
|
||||||
));
|
));
|
||||||
@@ -510,8 +520,8 @@ class App extends Component {
|
|||||||
"/payments"
|
"/payments"
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Setting.isAdminUser(this.state.account)) {
|
if (Setting.isAdminUser(this.state.account)) {
|
||||||
res.push(Setting.getItem(<Link to="/sysinfo">{i18next.t("general:System Info")}</Link>,
|
res.push(Setting.getItem(<Link to="/sysinfo">{i18next.t("general:System Info")}</Link>,
|
||||||
"/sysinfo"
|
"/sysinfo"
|
||||||
|
@@ -21,6 +21,8 @@ export const DefaultLanguage = "en";
|
|||||||
|
|
||||||
export const EnableExtraPages = true;
|
export const EnableExtraPages = true;
|
||||||
|
|
||||||
|
export const EnableChatPages = true;
|
||||||
|
|
||||||
export const InitThemeAlgorithm = true;
|
export const InitThemeAlgorithm = true;
|
||||||
export const ThemeDefault = {
|
export const ThemeDefault = {
|
||||||
themeType: "default",
|
themeType: "default",
|
||||||
|
Reference in New Issue
Block a user