2020-05-09 15:07:42 +00:00
|
|
|
let angApp = require(__dirname+'/../init')
|
|
|
|
|
2021-02-13 02:52:49 +00:00
|
|
|
angApp.controller('LoginController', function($scope, DesktopService, CredentialsService) {
|
2020-05-11 18:26:51 +00:00
|
|
|
|
2020-06-07 14:32:09 +00:00
|
|
|
$scope.help = {}
|
|
|
|
|
|
|
|
$scope.showHelp = (item) => {
|
|
|
|
$scope.help[item] = typeof $scope.help[item] === 'undefined' ? true : !$scope.help[item];
|
|
|
|
}
|
|
|
|
|
2020-05-09 15:07:42 +00:00
|
|
|
$scope.addAccountAndLoginAction = () => {
|
2021-02-13 02:52:49 +00:00
|
|
|
CredentialsService.addCredentials($scope.credentials.connectionManager,
|
2020-05-11 18:26:51 +00:00
|
|
|
$scope.credentials.login,
|
|
|
|
$scope.credentials.password
|
2020-05-09 15:07:42 +00:00
|
|
|
)
|
2020-08-07 11:53:57 +00:00
|
|
|
DesktopService.getCredentialsAndLogin()
|
2020-05-11 18:26:51 +00:00
|
|
|
$scope.accountForm.$setPristine()
|
|
|
|
$scope.accountForm.$setUntouched()
|
|
|
|
$scope.credentials = {}
|
2020-05-09 15:07:42 +00:00
|
|
|
}
|
2020-05-13 20:00:36 +00:00
|
|
|
})
|