This commit is contained in:
tiago.kayaya
2021-01-26 15:35:21 +01:00
parent 845e905cb0
commit e7621c8e3d
30 changed files with 318 additions and 246 deletions
Binary file not shown.
Binary file not shown.
@@ -37,9 +37,9 @@
<sourceFolder url="file://$MODULE_DIR$/../../../capacitor-cordova-android-plugins/build/generated/aidl_source_output_dir/debug/out" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/../../../capacitor-cordova-android-plugins/build/generated/res/rs/debug" type="java-resource" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/../../../capacitor-cordova-android-plugins/build/generated/aidl_source_output_dir/debugAndroidTest/out" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/../../../capacitor-cordova-android-plugins/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/../../../capacitor-cordova-android-plugins/build/generated/renderscript_source_output_dir/debugAndroidTest/out" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/../../../capacitor-cordova-android-plugins/build/generated/ap_generated_sources/debugAndroidTest/out" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/../../../capacitor-cordova-android-plugins/build/generated/renderscript_source_output_dir/debugAndroidTest/out" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/../../../capacitor-cordova-android-plugins/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/../../../capacitor-cordova-android-plugins/build/generated/res/rs/androidTest/debug" type="java-test-resource" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/../../../capacitor-cordova-android-plugins/build/generated/ap_generated_sources/debugUnitTest/out" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/../../../capacitor-cordova-android-plugins/src/debug/res" type="java-resource" />
@@ -1,4 +1,4 @@
#Mon Jan 25 12:43:34 WAT 2021
#Tue Jan 26 15:33:16 WAT 2021
path.3=classes_1.dex
path.2=classes_0.dex
path.1=classes.dex
@@ -639,7 +639,7 @@ const environment = {
apiChatUrl: 'https://www.tabularium.pt/api/v1/',
/* apiChatUrl: 'http://chat.gabinetedigital.local:3000/api/v1/', */
domain: 'gabinetedigital.local',
defaultuser: '',
defaultuser: 'tiago.kayaya',
defaultuserpwd: 'tabteste@006'
};
/*
File diff suppressed because one or more lines are too long
@@ -782,7 +782,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
/* apiChatUrl: 'http://chat.gabinetedigital.local:3000/api/v1/', */
domain: 'gabinetedigital.local',
defaultuser: '',
defaultuser: 'tiago.kayaya',
defaultuserpwd: 'tabteste@006'
};
/*
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -146,8 +146,6 @@ let LoginPage = class LoginPage {
this.alertController = alertController;
this.username = src_environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].defaultuser;
this.password = src_environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].defaultuserpwd;
this.body = { "user": this.username, "password": this.password };
this.postData = { "user": this.username, "password": this.password };
}
ngOnInit() {
}
@@ -168,10 +166,14 @@ let LoginPage = class LoginPage {
});
}
loginRocketChat() {
this.authService.loginChat(this.postData).subscribe((res) => {
let postData = {
"user": this.username,
"password": this.password
};
this.authService.loginChat(postData).subscribe((res) => {
this.storageService.store(src_app_config_auth_constants__WEBPACK_IMPORTED_MODULE_8__["AuthConnstants"].AUTH, res.data);
console.log('Logged user \n' + res.data);
console.log('Login to Rocket chat OK');
this.presentAlert('Login to Rocket chat OK');
}, (error) => {
console.log('Network error');
this.presentAlert('Network error ' + error);
@@ -190,6 +192,7 @@ let LoginPage = class LoginPage {
BasicAuthKey: ""
};
if (yield this.authService.login(this.userattempt)) {
console.log(this.userattempt);
this.loginRocketChat();
this.router.navigate(['/home/events']);
}
File diff suppressed because one or more lines are too long
@@ -271,14 +271,6 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
this.alertController = alertController;
this.username = src_environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].defaultuser;
this.password = src_environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].defaultuserpwd;
this.body = {
"user": this.username,
"password": this.password
};
this.postData = {
"user": this.username,
"password": this.password
};
}
_createClass(LoginPage, [{
@@ -325,12 +317,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
value: function loginRocketChat() {
var _this = this;
this.authService.loginChat(this.postData).subscribe(function (res) {
var postData = {
"user": this.username,
"password": this.password
};
this.authService.loginChat(postData).subscribe(function (res) {
_this.storageService.store(src_app_config_auth_constants__WEBPACK_IMPORTED_MODULE_8__["AuthConnstants"].AUTH, res.data);
console.log('Logged user \n' + res.data);
console.log('Login to Rocket chat OK');
_this.presentAlert('Login to Rocket chat OK');
}, function (error) {
console.log('Network error');
@@ -348,7 +343,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
_context2.prev = 0;
if (!this.validateInput()) {
_context2.next = 13;
_context2.next = 14;
break;
}
@@ -363,43 +358,44 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
case 5:
if (!_context2.sent) {
_context2.next = 10;
_context2.next = 11;
break;
}
console.log(this.userattempt);
this.loginRocketChat();
this.router.navigate(['/home/events']);
_context2.next = 11;
_context2.next = 12;
break;
case 10:
case 11:
//this.toastService.presentToast('Não foi possível fazer login"');
this.presentAlert('O nome de utilizador e palavra-passe estão incorretas ou verifique a sua conexão com a internet e volte a tentar.');
case 11:
_context2.next = 14;
case 12:
_context2.next = 15;
break;
case 13:
case 14:
//this.toastService.presentToast('Preencha todos campos');
this.presentAlert('Por favor, insira o seu nome de utilizador e palavra-passe.');
case 14:
_context2.next = 20;
case 15:
_context2.next = 21;
break;
case 16:
_context2.prev = 16;
case 17:
_context2.prev = 17;
_context2.t0 = _context2["catch"](0);
_context2.t0;
this.presentAlert('Ocorreu um erro ao fazer login. Contacte o administrador de sistema. ');
case 20:
case 21:
case "end":
return _context2.stop();
}
}
}, _callee2, this, [[0, 16]]);
}, _callee2, this, [[0, 17]]);
}));
}
}]);
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -639,7 +639,7 @@ const environment = {
apiChatUrl: 'https://www.tabularium.pt/api/v1/',
/* apiChatUrl: 'http://chat.gabinetedigital.local:3000/api/v1/', */
domain: 'gabinetedigital.local',
defaultuser: 'tiagox.kayaya',
defaultuser: 'tiago.kayaya',
defaultuserpwd: 'tabteste@006'
};
/*
File diff suppressed because one or more lines are too long
@@ -782,7 +782,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
/* apiChatUrl: 'http://chat.gabinetedigital.local:3000/api/v1/', */
domain: 'gabinetedigital.local',
defaultuser: 'tiagox.kayaya',
defaultuser: 'tiago.kayaya',
defaultuserpwd: 'tabteste@006'
};
/*
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -3,9 +3,9 @@
<div class="main-header">
<div class="header-top">
<app-btn-modal-dismiss></app-btn-modal-dismiss>
<div class="middle">
<ion-label class="title" *ngFor="let users of dmUsers">{{users.name}}</ion-label>
<span *ngIf="userPresence =='online'"><ion-icon class="user-status-online" name="ellipse"></ion-icon></span>
<div class="middle" *ngFor="let users of dmUsers">
<ion-label class="title">{{users.name}}</ion-label>
<span><ion-icon class="{{users.status}}" name="ellipse"></ion-icon></span>
</div>
<div class="right">
<ion-icon (click)="openMessagesOptions()" src="assets/images/icons-menu.svg"></ion-icon>
@@ -175,6 +175,7 @@
align-self: center;
}
}
}
.text-color-blue{
@@ -189,4 +190,34 @@
color:#99e47b;
padding-left: 10px;
}
.online{
display: block;
float: left;
color:#99e47b;
padding-left: 10px;
}
.offline{
color:#cbced1;
display: block;
float: left;
padding-left: 10px;
}
.away{
color:#ffd21f;
display: block;
float: left;
padding-left: 10px;
}
.invisible{
color:#cbced1;
display: block;
float: left;
padding-left: 10px;
}
.busy{
color:#f5455c;
display: block;
float: left;
padding-left: 10px;
}