#768 salix.home
This commit is contained in:
parent
043454bab2
commit
5edd341127
|
@ -7,6 +7,11 @@
|
|||
class="mdl-shadow--4dp">
|
||||
<vn-icon icon="{{::mod.icon}}"></vn-icon>
|
||||
<h4 translate>{{::mod.name}}</h4>
|
||||
<span
|
||||
ng-show='mod.keyBind'
|
||||
vn-tooltip="Ctrl + Alt + {{mod.keyBind}}">
|
||||
({{::mod.keyBind}})
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,15 +1,30 @@
|
|||
import ngModule from '../../module';
|
||||
import './style.scss';
|
||||
import keybindings from '../../global-keybindings.yml';
|
||||
|
||||
export default class Home {
|
||||
constructor(modulesFactory, $state) {
|
||||
export default class Controller {
|
||||
constructor(modulesFactory, $state, $translate, $scope) {
|
||||
this.modules = modulesFactory.getModules();
|
||||
this.state = $state;
|
||||
this.$translate = $translate;
|
||||
this.$scope = $scope;
|
||||
this.keybindings = keybindings;
|
||||
}
|
||||
$onInit() {
|
||||
this.modules.map(module => {
|
||||
let keyBind = this.keybindings.find(keyBind => {
|
||||
return keyBind.sref == module.route.state;
|
||||
});
|
||||
|
||||
if (keyBind)
|
||||
module.keyBind = keyBind.key.toUpperCase();
|
||||
});
|
||||
}
|
||||
}
|
||||
Home.$inject = ['modulesFactory', '$state'];
|
||||
|
||||
Controller.$inject = ['modulesFactory', '$state', '$translate', '$scope'];
|
||||
|
||||
ngModule.component('vnHome', {
|
||||
template: require('./home.html'),
|
||||
controller: Home
|
||||
controller: Controller
|
||||
});
|
||||
|
|
|
@ -33,6 +33,11 @@ vn-home {
|
|||
& > vn-icon {
|
||||
font-size: 4em;
|
||||
}
|
||||
|
||||
& > span {
|
||||
font-size: 0.9em;
|
||||
text-align: center;
|
||||
}
|
||||
& > h4 {
|
||||
text-align: center;
|
||||
padding-top: .4em;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue