ActivityPub-federated video streaming platform using P2P directly in your web browser
More reliable config wizard fragment detection
Chocobozzz49da883f7eed
diff --git a/client/src/app/modal/admin-config-wizard/admin-config-wizard-modal.component.ts b/client/src/app/modal/admin-config-wizard/admin-config-wizard-modal.component.tsindex 16cfcedd1c..1a38f78881 100644--- a/client/src/app/modal/admin-config-wizard/admin-config-wizard-modal.component.ts+++ b/client/src/app/modal/admin-config-wizard/admin-config-wizard-modal.component.ts@@ -1,7 +1,6 @@import { CdkStepperModule } from '@angular/cdk/stepper'import { CommonModule } from '@angular/common'import { Component, ElementRef, OnInit, inject, output, viewChild } from '@angular/core'-import { ActivatedRoute } from '@angular/router'import { User } from '@app/core'import { NgbModal } from '@ng-bootstrap/ng-bootstrap'import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage'@@ -31,7 +30,6 @@ import { UsageType } from './steps/usage-type/usage-type.model'})export class AdminConfigWizardModalComponent implements OnInit {private modalService = inject(NgbModal)- private route = inject(ActivatedRoute)readonly modal = viewChild<ElementRef>('modal')readonly stepper = viewChild<AdminConfigWizardStepperComponent>('stepper')@@ -50,8 +48,8 @@ export class AdminConfigWizardModalComponent implements OnInit {shouldAutoOpen (user: User) {if (this.modalService.hasOpenModals()) return false- if (this.route.snapshot.fragment === 'admin-welcome-wizard') return true- if (this.route.snapshot.fragment === 'admin-welcome-wizard-test') return true+ if (this.getFragment() === '#admin-welcome-wizard') return true+ if (this.getFragment() === '#admin-welcome-wizard-test') return trueif (user.noWelcomeModal === true) return falseif (peertubeLocalStorage.getItem(getNoWelcomeModalLocalStorageKey()) === 'true') return false@@ -60,7 +58,7 @@ export class AdminConfigWizardModalComponent implements OnInit {show ({ showWelcome }: { showWelcome: boolean }) {this.showWelcome = showWelcome- this.dryRun = this.route.snapshot.fragment === 'admin-welcome-wizard-test'+ this.dryRun = this.getFragment() === '#admin-welcome-wizard-test'this.modalService.open(this.modal(), {centered: true,@@ -91,4 +89,8 @@ export class AdminConfigWizardModalComponent implements OnInit {return totalSteps}++ private getFragment () {+ return window.location.hash+ }}