diff options
Diffstat (limited to 'web/app/view/device')
-rw-r--r-- | web/app/view/device/Device.js | 5 | ||||
-rw-r--r-- | web/app/view/device/DeviceController.js | 17 |
2 files changed, 21 insertions, 1 deletions
diff --git a/web/app/view/device/Device.js b/web/app/view/device/Device.js index a166cb573..25c067242 100644 --- a/web/app/view/device/Device.js +++ b/web/app/view/device/Device.js @@ -54,6 +54,11 @@ Ext.define('Traccar.view.device.Device', { disabled: true, handler: 'onServerClick', reference: 'settingsServerButton' + }, { + text: strings.device_settings_users, + disabled: true, + handler: 'onUsersClick', + reference: 'settingsUsersButton' }] }, { text: strings.device_logout, diff --git a/web/app/view/device/DeviceController.js b/web/app/view/device/DeviceController.js index 451b6bbf3..f45f348b6 100644 --- a/web/app/view/device/DeviceController.js +++ b/web/app/view/device/DeviceController.js @@ -21,12 +21,14 @@ Ext.define('Traccar.view.device.DeviceController', { requires: [ 'Traccar.view.device.DeviceDialog', 'Traccar.view.user.UserDialog', - 'Traccar.view.admin.ServerDialog' + 'Traccar.view.admin.ServerDialog', + 'Traccar.view.user.User' ], init: function() { if (Traccar.getApplication().getUser().get('admin')) { this.lookupReference('settingsServerButton').setDisabled(false); + this.lookupReference('settingsUsersButton').setDisabled(false); } }, @@ -86,6 +88,19 @@ Ext.define('Traccar.view.device.DeviceController', { var dialog = Ext.create('Traccar.view.admin.ServerDialog'); dialog.down('form').loadRecord(server); dialog.show(); + }, + + onUsersClick: function() { + Ext.create('Ext.window.Window', { + title: strings.login_users_title, + width: styles.window_width, + height: styles.window_height, + layout: 'fit', + modal: true, + items: { + xtype: 'user-view' + } + }).show(); } }); |