Skip to content

Commit c8ffb6d

Browse files
committed
Bump version to v1.4.5
- Hard reload after login/password reset to clear stale caches - Relax UUID validation to accept all RFC 4122 variants - Update api-types to v1.5.4
1 parent 2bf99f5 commit c8ffb6d

6 files changed

Lines changed: 16 additions & 18 deletions

File tree

bun.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openworkers-dash",
3-
"version": "1.4.4",
3+
"version": "1.4.5",
44
"license": "MIT",
55
"scripts": {
66
"ng": "ng",

src/app/modules/login/login.page.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component } from '@angular/core';
22
import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
3-
import { Router, RouterLink } from '@angular/router';
3+
import { RouterLink } from '@angular/router';
44
import { BehaviorSubject, firstValueFrom } from 'rxjs';
55
import { AsyncPipe } from '@angular/common';
66

@@ -25,10 +25,7 @@ export class LoginPage {
2525
public readonly success$ = new BehaviorSubject<string | null>(null);
2626
public readonly loading$ = new BehaviorSubject<boolean>(false);
2727

28-
constructor(
29-
private readonly auth: AuthService,
30-
private router: Router
31-
) {
28+
constructor(private readonly auth: AuthService) {
3229
this.loginForm = new FormGroup({
3330
email: new FormControl('', [Validators.required, Validators.email]),
3431
password: new FormControl('', [Validators.required])
@@ -67,7 +64,8 @@ export class LoginPage {
6764
return;
6865
}
6966

70-
await this.router.navigate(['/workers']);
67+
// Hard reload to clear in-memory caches from previous session
68+
window.location.href = '/workers';
7169
}
7270

7371
public async submitRegister(): Promise<void> {

src/app/modules/login/reset-password.page.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component, OnInit } from '@angular/core';
22
import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
3-
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
3+
import { ActivatedRoute, RouterLink } from '@angular/router';
44
import { BehaviorSubject, firstValueFrom } from 'rxjs';
55
import { AsyncPipe } from '@angular/common';
66

@@ -23,8 +23,7 @@ export class ResetPasswordPage implements OnInit {
2323

2424
constructor(
2525
private readonly auth: AuthService,
26-
private readonly route: ActivatedRoute,
27-
private readonly router: Router
26+
private readonly route: ActivatedRoute
2827
) {
2928
this.form = new FormGroup({
3029
password: new FormControl('', [Validators.required, Validators.minLength(8)]),
@@ -60,7 +59,8 @@ export class ResetPasswordPage implements OnInit {
6059

6160
if (success) {
6261
this.state$.next('success');
63-
setTimeout(() => this.router.navigate(['/workers']), 2000);
62+
// Hard reload to clear in-memory caches from previous session
63+
setTimeout(() => (window.location.href = '/workers'), 2000);
6464
} else {
6565
this.state$.next('error');
6666
}

src/app/modules/login/set-password.page.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component, OnInit } from '@angular/core';
22
import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
3-
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
3+
import { ActivatedRoute, RouterLink } from '@angular/router';
44
import { BehaviorSubject, firstValueFrom } from 'rxjs';
55
import { AsyncPipe } from '@angular/common';
66

@@ -23,8 +23,7 @@ export class SetPasswordPage implements OnInit {
2323

2424
constructor(
2525
private readonly auth: AuthService,
26-
private readonly route: ActivatedRoute,
27-
private readonly router: Router
26+
private readonly route: ActivatedRoute
2827
) {
2928
this.form = new FormGroup({
3029
password: new FormControl('', [Validators.required, Validators.minLength(8)]),
@@ -60,7 +59,8 @@ export class SetPasswordPage implements OnInit {
6059

6160
if (success) {
6261
this.state$.next('success');
63-
setTimeout(() => this.router.navigate(['/workers']), 2000);
62+
// Hard reload to clear in-memory caches from previous session
63+
setTimeout(() => (window.location.href = '/workers'), 2000);
6464
} else {
6565
this.state$.next('error');
6666
}

src/app/utils/uuid.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export function isUUID(str: string): boolean {
2-
return /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/.test(str);
2+
return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(str);
33
}

0 commit comments

Comments
 (0)