blob: 9984d76790291c04aee2795bbc8b3117460d45be [file] [log] [blame]
Matteo Scandolofb46ae62017-08-08 09:10:50 -07001/*
2 * Copyright 2017-present Open Networking Foundation
3
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7
8 * http://www.apache.org/licenses/LICENSE-2.0
9
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Matteo Scandolo5053cbe2017-01-31 17:37:56 -080017import {IXosKeyboardShortcutService, IXosKeyboardShortcutMap} from '../services/keyboard-shortcut';
18import './key-binding-panel.scss';
19
20class XosKeyBindingPanelController {
21 static $inject = ['$scope', 'XosKeyboardShortcut'];
22 public bindings: IXosKeyboardShortcutMap;
Matteo Scandolo57aee472018-06-28 15:24:42 -070023 public version: string;
Matteo Scandoloc3804aa2017-08-09 16:00:43 -070024
Matteo Scandolo5053cbe2017-01-31 17:37:56 -080025 constructor (
26 private $scope: ng.IScope,
27 private XosKeyboardShortcut: IXosKeyboardShortcutService
28 ) {
Matteo Scandolo57aee472018-06-28 15:24:42 -070029 this.version = require('../../../../package.json').version;
Matteo Scandolo5053cbe2017-01-31 17:37:56 -080030 this.bindings = this.XosKeyboardShortcut.keyMapping;
31 }
32}
33
34export const xosKeyBindingPanel: angular.IComponentOptions = {
35 template: require('./key-binding-panel.html'),
36 controllerAs: 'vm',
37 controller: XosKeyBindingPanelController
38};