This commit is contained in:
Carlos Jimenez 2018-11-07 12:41:22 +01:00
parent 043454bab2
commit 5edd341127
4 changed files with 4108 additions and 3752 deletions

View File

@ -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>

View File

@ -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
});

View File

@ -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;

7825
package-lock.json generated

File diff suppressed because it is too large Load Diff