Merge branch 'master' into hunicus/enterprise-cta-docs

This commit is contained in:
wiz
2024-03-06 16:23:48 +09:00
committed by GitHub
496 changed files with 138224 additions and 75015 deletions

View File

@@ -1,6 +1,6 @@
import { Component, OnInit, Input, QueryList, AfterViewInit, ViewChildren } from '@angular/core';
import { Env, StateService } from '../../services/state.service';
import { Observable, merge, of, Subject } from 'rxjs';
import { Observable, merge, of, Subject, Subscription } from 'rxjs';
import { tap, takeUntil } from 'rxjs/operators';
import { ActivatedRoute } from "@angular/router";
import { faqData, restApiDocsData, wsApiDocsData } from './api-docs-data';
@@ -31,6 +31,8 @@ export class ApiDocsComponent implements OnInit, AfterViewInit {
auditEnabled: boolean;
mobileViewport: boolean = false;
showMobileEnterpriseUpsell: boolean = true;
timeLtrSubscription: Subscription;
timeLtr: boolean = this.stateService.timeLtr.value;
@ViewChildren(FaqTemplateDirective) faqTemplates: QueryList<FaqTemplateDirective>;
dict = {};
@@ -105,12 +107,17 @@ export class ApiDocsComponent implements OnInit, AfterViewInit {
this.electrsPort = 51302; break;
}
});
this.timeLtrSubscription = this.stateService.timeLtr.subscribe((ltr) => {
this.timeLtr = !!ltr;
});
}
ngOnDestroy(): void {
this.destroy$.next(true);
this.destroy$.complete();
window.removeEventListener('scroll', this.onDocScroll);
this.timeLtrSubscription.unsubscribe();
}
onDocScroll() {