aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+about/about-instance/about-instance.component.ts
diff options
context:
space:
mode:
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.ts16
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 @@
1import { ViewportScroller } from '@angular/common' 1import { ViewportScroller } from '@angular/common'
2import { AfterViewChecked, Component, ElementRef, OnInit, ViewChild } from '@angular/core' 2import { AfterViewChecked, Component, ElementRef, OnInit, ViewChild } from '@angular/core'
3import { ActivatedRoute } from '@angular/router' 3import { ActivatedRoute } from '@angular/router'
4import { ContactAdminModalComponent } from '@app/+about/about-instance/contact-admin-modal.component'
5import { Notifier, ServerService } from '@app/core' 4import { Notifier, ServerService } from '@app/core'
6import { CustomMarkupService } from '@app/shared/shared-custom-markup'
7import { InstanceService } from '@app/shared/shared-instance' 5import { InstanceService } from '@app/shared/shared-instance'
8import { About, HTMLServerConfig, ServerConfig } from '@shared/models' 6import { copyToClipboard } from '@root-helpers/utils'
9import { copyToClipboard } from '../../../root-helpers/utils' 7import { HTMLServerConfig } from '@shared/models/server'
10import { ResolverData } from './about-instance.resolver' 8import { ResolverData } from './about-instance.resolver'
9import { 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})
17export class AboutInstanceComponent implements OnInit, AfterViewChecked { 16export 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