Skip to content

Commit

Permalink
Скрытие дашборда из настроек, если не активирован
Browse files Browse the repository at this point in the history
  • Loading branch information
Sominemo committed Jun 30, 2020
1 parent 099cc53 commit 65fe8b1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/app/loaders/UI/SettingsLayoutLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,15 @@ CoreLoader.registerTask({
}

settingsMain
.createItem({ dom: SettingsActLink, options: [() => { Navigation.url = { module: "dashboard", params: ["settings"] } }, sideLogo("dashboard", $$("dashboard"), $("settings/descriptions/dashboard"))], id: "dashboard-link" })
.createItem({
dom: SettingsActLink,
options: [() => { Navigation.url = { module: "dashboard", params: ["settings"] } }, sideLogo("dashboard", $$("dashboard"), $("settings/descriptions/dashboard"))],
id: "dashboard-link",
display() {
const nextState = CoreLoader.getResult("dashboard_module")
return nextState.type === 0 && nextState.state === 0
},
})
.createItem({ dom: SettingsActLink, options: ["storage", sideLogo("storage", $$("settings/storage"), $("settings/descriptions/storage"))], id: "storage-link" })
.createItem({ dom: SettingsActLink, options: ["language", sideLogo("translate", $$("settings/language"), $("settings/descriptions/language"))], id: "language-link" })
.createItem({ dom: SettingsActLink, options: ["privacy", sideLogo("https", $$("settings/privacy"), $("settings/privacy/info"))], id: "privacy-link" })
Expand Down

0 comments on commit 65fe8b1

Please sign in to comment.