mirror of
https://github.com/getredash/redash.git
synced 2026-05-09 03:03:08 -04:00
17 lines
510 B
JavaScript
17 lines
510 B
JavaScript
import settingsMenu from '@/services/settingsMenu';
|
|
import template from './settings-screen.html';
|
|
|
|
export default function init(ngModule) {
|
|
ngModule.component('settingsScreen', {
|
|
transclude: true,
|
|
template,
|
|
controller($location, currentUser) {
|
|
this.settingsMenu = settingsMenu;
|
|
this.isActive = menuItem => menuItem.isActive($location.path());
|
|
this.isAvailable = permission => permission === undefined || currentUser.hasPermission(permission);
|
|
},
|
|
});
|
|
}
|
|
|
|
init.init = true;
|