Skip to content

Commit 77c3cda

Browse files
committed
fixed issue with OAuth "Sing in" button
1 parent d7a0c69 commit 77c3cda

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "deep-see-web",
3-
"version": "4.0.26",
3+
"version": "4.0.27",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve --proxy-config=proxy.conf.samples-bi.js",

src/app/components/screens/login-screen/login-screen.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<button [hidden]="model.isDesktop" class="btn btn-success" (click)="saveServer()"
2929
desktop-hidden></button>
3030
<button id="login" class="btn" (click)="onLoginClick()">{{ 'signin' | i18n }}</button>
31-
@if (model.oAuthUrl) {
31+
@if (oAuthUrl()) {
3232
<button id="btnLoginOAuth" class="btn btn-link"
3333
(click)="onLoginOAuthClick()">{{ 'signinOAuth' | i18n }}
3434
</button>

src/app/components/screens/login-screen/login-screen.component.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Component, OnInit} from '@angular/core';
1+
import {Component, OnInit, signal} from '@angular/core';
22
import {DataService} from '../../../services/data.service';
33
import {I18nPipe, I18nService} from '../../../services/i18n.service';
44
import {dsw} from '../../../../environments/dsw';
@@ -25,6 +25,7 @@ declare var cordova: any;
2525
export class LoginScreenComponent implements OnInit {
2626
public model: any;
2727
private startTime = -1;
28+
protected readonly oAuthUrl = signal('');
2829

2930
constructor(private ds: DataService,
3031
private i18n: I18nService,
@@ -72,8 +73,7 @@ export class LoginScreenComponent implements OnInit {
7273
login: '',
7374
password: '',
7475
namespace: '', // localStorage.namespace || 'Samples',
75-
error: '',
76-
oAuthUrl: ''
76+
error: ''
7777
};
7878
}
7979

@@ -102,9 +102,9 @@ export class LoginScreenComponent implements OnInit {
102102
try {
103103
if (typeof d === 'string') {
104104
const o = JSON.parse(d);
105-
this.model.oAuthUrl = o.url || '';
105+
this.oAuthUrl.set(o.url || '');
106106
} else {
107-
this.model.oAuthUrl = d.url || '';
107+
this.oAuthUrl.set(d.url || '');
108108
}
109109
} catch (e) {
110110
}
@@ -192,7 +192,7 @@ export class LoginScreenComponent implements OnInit {
192192
* Login with intersystems oauth
193193
*/
194194
onLoginOAuthClick() {
195-
window.location.href = this.model.oAuthUrl;
195+
window.location.href = this.oAuthUrl();
196196
}
197197

198198
/**

src/changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#### 4.0.27
2+
* fixed issue with OAuth "Sing in" button
3+
14
#### 4.0.26
25
* fixed issue with percentage calculation when both(row and column) totals exists (#459)
36

0 commit comments

Comments
 (0)