@block-auth.io/angular 0.7.6 → 0.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -172,9 +172,15 @@ class BlockAuthRuntimeDirective {
172
172
  onError: () => this.errored.emit(),
173
173
  onLogout: () => this.loggedOut.emit(),
174
174
  });
175
+ this.client.registerRuntime({
176
+ switchAccount: this.runtime.switchAccount,
177
+ resumeSession: this.runtime.resumeSession,
178
+ });
175
179
  void this.runtime.start();
176
180
  }
177
181
  ngOnDestroy() {
182
+ if (this.runtime)
183
+ this.client.registerRuntime(null);
178
184
  this.runtime?.stop();
179
185
  this.runtime = null;
180
186
  this.wasReady = false;
@@ -4455,7 +4461,7 @@ class TxnComponent {
4455
4461
  (click)="closeLifetime()"
4456
4462
  ></div>
4457
4463
  <div
4458
- class="bal-ba-glass-popup-slot bas-absolute bas-inset-x-0 bas-top-44 bas-z-40 bas-box-border bas-px-4"
4464
+ class="bal-ba-glass-popup-slot bas-absolute bas-inset-0 bas-z-40 bas-box-border bas-items-center bas-px-4"
4459
4465
  >
4460
4466
  <div
4461
4467
  role="dialog"
@@ -4699,7 +4705,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
4699
4705
  (click)="closeLifetime()"
4700
4706
  ></div>
4701
4707
  <div
4702
- class="bal-ba-glass-popup-slot bas-absolute bas-inset-x-0 bas-top-44 bas-z-40 bas-box-border bas-px-4"
4708
+ class="bal-ba-glass-popup-slot bas-absolute bas-inset-0 bas-z-40 bas-box-border bas-items-center bas-px-4"
4703
4709
  >
4704
4710
  <div
4705
4711
  role="dialog"
@@ -10148,11 +10154,22 @@ class FlowBlockAuthComponent {
10148
10154
  effect((onCleanup) => {
10149
10155
  if (!this.isReconnectingRemembered() || !this.ui().isServiceConnected)
10150
10156
  return;
10151
- const timer = setTimeout(() => {
10157
+ let cancelled = false;
10158
+ const timer = setTimeout(async () => {
10159
+ const resumed = await this.client.resumeSession();
10160
+ if (cancelled)
10161
+ return;
10152
10162
  this.isReconnectingRemembered.set(false);
10163
+ if (resumed) {
10164
+ this.isRequestingSignin.set(false);
10165
+ return;
10166
+ }
10153
10167
  untracked(() => this.requestReturningSignin());
10154
10168
  }, REMEMBERED_SIGNIN_SETTLE_MS);
10155
- onCleanup(() => clearTimeout(timer));
10169
+ onCleanup(() => {
10170
+ cancelled = true;
10171
+ clearTimeout(timer);
10172
+ });
10156
10173
  });
10157
10174
  effect(() => {
10158
10175
  if (!this.ui().isSigning)