add groups feature

This commit is contained in:
Denis barbaron
2019-06-12 10:29:07 +02:00
parent 6fd750dad5
commit 7f5dc4c152
119 changed files with 12416 additions and 402 deletions

View File

@@ -1,5 +1,17 @@
module.exports = function MenuCtrl($scope, $rootScope, SettingsService,
$location) {
/**
* Copyright © 2019 contains code contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
**/
module.exports = function MenuCtrl(
$scope
, $rootScope
, SettingsService
, $location
, $http
, CommonService
, socket
, $cookies
, $window) {
SettingsService.bind($scope, {
target: 'lastUsedDevice'
@@ -14,4 +26,21 @@ module.exports = function MenuCtrl($scope, $rootScope, SettingsService,
$scope.isControlRoute = $location.path().search('/control') !== -1
})
$scope.mailToSupport = function() {
CommonService.url('mailto:' + $scope.contactEmail)
}
$http.get('/auth/contact').then(function(response) {
$scope.contactEmail = response.data.contact.email
})
$scope.logout = function() {
$cookies.remove('XSRF-TOKEN', {path: '/'})
$cookies.remove('ssid', {path: '/'})
$cookies.remove('ssid.sig', {path: '/'})
$window.location = '/'
setTimeout(function() {
socket.disconnect()
}, 100)
}
}