converse-desktop/app/controllers/login-controller.js

15 lines
586 B
JavaScript
Raw Normal View History

2020-05-09 15:07:42 +00:00
let angApp = require(__dirname+'/../init')
2020-05-11 18:26:51 +00:00
angApp.controller('LoginController', function($scope, ChimeVerseService, CredentialsServise) {
2020-05-09 15:07:42 +00:00
$scope.addAccountAndLoginAction = () => {
2020-05-11 18:26:51 +00:00
CredentialsServise.addCredentials($scope.credentials.bosh,
$scope.credentials.login,
$scope.credentials.password
2020-05-09 15:07:42 +00:00
)
2020-05-11 18:26:51 +00:00
ChimeVerseService.initConverse($scope.credentials.bosh, $scope.credentials.login, $scope.credentials.password)
$scope.accountForm.$setPristine()
$scope.accountForm.$setUntouched()
$scope.credentials = {}
2020-05-09 15:07:42 +00:00
}
});