diff options
Diffstat (limited to 'client/src/app/+about/about-instance/about-instance.component.ts')
-rw-r--r-- | client/src/app/+about/about-instance/about-instance.component.ts | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/client/src/app/+about/about-instance/about-instance.component.ts b/client/src/app/+about/about-instance/about-instance.component.ts index ffb4294ab..f86df5b67 100644 --- a/client/src/app/+about/about-instance/about-instance.component.ts +++ b/client/src/app/+about/about-instance/about-instance.component.ts | |||
@@ -1,13 +1,12 @@ | |||
1 | import { ViewportScroller } from '@angular/common' | 1 | import { ViewportScroller } from '@angular/common' |
2 | import { AfterViewChecked, Component, ElementRef, OnInit, ViewChild } from '@angular/core' | 2 | import { AfterViewChecked, Component, ElementRef, OnInit, ViewChild } from '@angular/core' |
3 | import { ActivatedRoute } from '@angular/router' | 3 | import { ActivatedRoute } from '@angular/router' |
4 | import { ContactAdminModalComponent } from '@app/+about/about-instance/contact-admin-modal.component' | ||
5 | import { Notifier, ServerService } from '@app/core' | 4 | import { Notifier, ServerService } from '@app/core' |
6 | import { CustomMarkupService } from '@app/shared/shared-custom-markup' | ||
7 | import { InstanceService } from '@app/shared/shared-instance' | 5 | import { InstanceService } from '@app/shared/shared-instance' |
8 | import { About, HTMLServerConfig, ServerConfig } from '@shared/models' | 6 | import { copyToClipboard } from '@root-helpers/utils' |
9 | import { copyToClipboard } from '../../../root-helpers/utils' | 7 | import { HTMLServerConfig } from '@shared/models/server' |
10 | import { ResolverData } from './about-instance.resolver' | 8 | import { ResolverData } from './about-instance.resolver' |
9 | import { ContactAdminModalComponent } from './contact-admin-modal.component' | ||
11 | 10 | ||
12 | @Component({ | 11 | @Component({ |
13 | selector: 'my-about-instance', | 12 | selector: 'my-about-instance', |
@@ -16,6 +15,7 @@ import { ResolverData } from './about-instance.resolver' | |||
16 | }) | 15 | }) |
17 | export class AboutInstanceComponent implements OnInit, AfterViewChecked { | 16 | export class AboutInstanceComponent implements OnInit, AfterViewChecked { |
18 | @ViewChild('descriptionWrapper') descriptionWrapper: ElementRef<HTMLInputElement> | 17 | @ViewChild('descriptionWrapper') descriptionWrapper: ElementRef<HTMLInputElement> |
18 | @ViewChild('contactAdminModal', { static: true }) contactAdminModal: ContactAdminModalComponent | ||
19 | 19 | ||
20 | shortDescription = '' | 20 | shortDescription = '' |
21 | descriptionContent: string | 21 | descriptionContent: string |
@@ -65,6 +65,14 @@ export class AboutInstanceComponent implements OnInit, AfterViewChecked { | |||
65 | 65 | ||
66 | this.serverConfig = this.serverService.getHTMLConfig() | 66 | this.serverConfig = this.serverService.getHTMLConfig() |
67 | 67 | ||
68 | this.route.data.subscribe(data => { | ||
69 | if (!data?.isContact) return | ||
70 | |||
71 | const prefill = this.route.snapshot.queryParams | ||
72 | |||
73 | this.contactAdminModal.show(prefill) | ||
74 | }) | ||
75 | |||
68 | this.languages = languages | 76 | this.languages = languages |
69 | this.categories = categories | 77 | this.categories = categories |
70 | 78 | ||