Matteo Scandolo | fb46ae6 | 2017-08-08 09:10:50 -0700 | [diff] [blame] | 1 | /* |
| 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 Scandolo | 5053cbe | 2017-01-31 17:37:56 -0800 | [diff] [blame] | 17 | import {IXosKeyboardShortcutService, IXosKeyboardShortcutMap} from '../services/keyboard-shortcut'; |
| 18 | import './key-binding-panel.scss'; |
| 19 | |
| 20 | class XosKeyBindingPanelController { |
| 21 | static $inject = ['$scope', 'XosKeyboardShortcut']; |
| 22 | public bindings: IXosKeyboardShortcutMap; |
Matteo Scandolo | 57aee47 | 2018-06-28 15:24:42 -0700 | [diff] [blame] | 23 | public version: string; |
Matteo Scandolo | c3804aa | 2017-08-09 16:00:43 -0700 | [diff] [blame] | 24 | |
Matteo Scandolo | 5053cbe | 2017-01-31 17:37:56 -0800 | [diff] [blame] | 25 | constructor ( |
| 26 | private $scope: ng.IScope, |
| 27 | private XosKeyboardShortcut: IXosKeyboardShortcutService |
| 28 | ) { |
Matteo Scandolo | 57aee47 | 2018-06-28 15:24:42 -0700 | [diff] [blame] | 29 | this.version = require('../../../../package.json').version; |
Matteo Scandolo | 5053cbe | 2017-01-31 17:37:56 -0800 | [diff] [blame] | 30 | this.bindings = this.XosKeyboardShortcut.keyMapping; |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | export const xosKeyBindingPanel: angular.IComponentOptions = { |
| 35 | template: require('./key-binding-panel.html'), |
| 36 | controllerAs: 'vm', |
| 37 | controller: XosKeyBindingPanelController |
| 38 | }; |