mirror of
https://github.com/getredash/redash.git
synced 2026-03-23 22:00:10 -04:00
16 lines
513 B
JavaScript
16 lines
513 B
JavaScript
import settingsMenu from '@/lib/settings-menu';
|
|
import startsWith from 'underscore.string/startsWith';
|
|
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 = prefix => startsWith($location.path(), prefix);
|
|
this.isAvailable = permission => currentUser.hasPermission(permission);
|
|
},
|
|
});
|
|
}
|