mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-24 17:55:13 +02:00
add groups feature
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user