diff options
author | Chocobozzz <me@florianbigard.com> | 2021-05-27 16:12:41 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-05-27 16:12:41 +0200 |
commit | 8f608a4cb22ab232cfab20665050764b38bac9c7 (patch) | |
tree | 6a6785aae79bf5939ad7b7a50a1bd8031268d2b4 /client/src/app/+home/home.component.ts | |
parent | 030ccfce59a8cb8f2fee6ea8dd363ba635c5c5c2 (diff) | |
parent | c215e627b575d2c4085ccb222f4ca8d0237b7552 (diff) | |
download | PeerTube-8f608a4cb22ab232cfab20665050764b38bac9c7.tar.gz PeerTube-8f608a4cb22ab232cfab20665050764b38bac9c7.tar.zst PeerTube-8f608a4cb22ab232cfab20665050764b38bac9c7.zip |
Merge branch 'develop' into shorter-URLs-channels-accounts
Diffstat (limited to 'client/src/app/+home/home.component.ts')
-rw-r--r-- | client/src/app/+home/home.component.ts | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/client/src/app/+home/home.component.ts b/client/src/app/+home/home.component.ts new file mode 100644 index 000000000..16d3a6df7 --- /dev/null +++ b/client/src/app/+home/home.component.ts | |||
@@ -0,0 +1,26 @@ | |||
1 | |||
2 | import { Component, ElementRef, OnInit, ViewChild } from '@angular/core' | ||
3 | import { CustomMarkupService } from '@app/shared/shared-custom-markup' | ||
4 | import { CustomPageService } from '@app/shared/shared-main/custom-page' | ||
5 | |||
6 | @Component({ | ||
7 | templateUrl: './home.component.html', | ||
8 | styleUrls: [ './home.component.scss' ] | ||
9 | }) | ||
10 | |||
11 | export class HomeComponent implements OnInit { | ||
12 | @ViewChild('contentWrapper') contentWrapper: ElementRef<HTMLInputElement> | ||
13 | |||
14 | constructor ( | ||
15 | private customMarkupService: CustomMarkupService, | ||
16 | private customPageService: CustomPageService | ||
17 | ) { } | ||
18 | |||
19 | async ngOnInit () { | ||
20 | this.customPageService.getInstanceHomepage() | ||
21 | .subscribe(async ({ content }) => { | ||
22 | const element = await this.customMarkupService.buildElement(content) | ||
23 | this.contentWrapper.nativeElement.appendChild(element) | ||
24 | }) | ||
25 | } | ||
26 | } | ||