From 100d9ce23bb7c5186132607e4c444f9cba5002a4 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 29 Mar 2021 15:56:01 +0200 Subject: Add support button in channel page --- client/src/app/+video-channels/video-channels.component.html | 7 +++++++ client/src/app/+video-channels/video-channels.component.scss | 4 ++++ client/src/app/+video-channels/video-channels.component.ts | 6 ++++++ client/src/app/+video-channels/video-channels.module.ts | 4 +++- 4 files changed, 20 insertions(+), 1 deletion(-) (limited to 'client/src/app/+video-channels') diff --git a/client/src/app/+video-channels/video-channels.component.html b/client/src/app/+video-channels/video-channels.component.html index 9f9c1f2ca..b9ac13f09 100644 --- a/client/src/app/+video-channels/video-channels.component.html +++ b/client/src/app/+video-channels/video-channels.component.html @@ -7,6 +7,11 @@ + + @@ -112,3 +117,5 @@ + + diff --git a/client/src/app/+video-channels/video-channels.component.scss b/client/src/app/+video-channels/video-channels.component.scss index fb71844bd..ec8f67a7e 100644 --- a/client/src/app/+video-channels/video-channels.component.scss +++ b/client/src/app/+video-channels/video-channels.component.scss @@ -36,6 +36,10 @@ @include avatar-row-responsive(var(--myChannelImgMargin), var(--myGreyChannelFontSize)); } +.support-button { + @include button-with-icon(21px, 0, -1px); +} + .channel-description { grid-column: 1; } diff --git a/client/src/app/+video-channels/video-channels.component.ts b/client/src/app/+video-channels/video-channels.component.ts index 4fcc42103..a8ca3d6ff 100644 --- a/client/src/app/+video-channels/video-channels.component.ts +++ b/client/src/app/+video-channels/video-channels.component.ts @@ -5,6 +5,7 @@ import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core' import { ActivatedRoute } from '@angular/router' import { AuthService, MarkdownService, Notifier, RestExtractor, ScreenService } from '@app/core' import { ListOverflowItem, VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main' +import { SupportModalComponent } from '@app/shared/shared-support-modal' import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription' import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' @@ -14,6 +15,7 @@ import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes' }) export class VideoChannelsComponent implements OnInit, OnDestroy { @ViewChild('subscribeButton') subscribeButton: SubscribeButtonComponent + @ViewChild('supportModal') supportModal: SupportModalComponent videoChannel: VideoChannel hotkeys: Hotkey[] @@ -101,6 +103,10 @@ export class VideoChannelsComponent implements OnInit, OnDestroy { this.notifier.success($localize`Username copied`) } + showSupportModal () { + this.supportModal.show() + } + private loadChannelVideosCount () { this.videoService.getVideoChannelVideos({ videoChannel: this.videoChannel, diff --git a/client/src/app/+video-channels/video-channels.module.ts b/client/src/app/+video-channels/video-channels.module.ts index 1b58a1d92..408f86225 100644 --- a/client/src/app/+video-channels/video-channels.module.ts +++ b/client/src/app/+video-channels/video-channels.module.ts @@ -2,6 +2,7 @@ import { NgModule } from '@angular/core' import { SharedFormModule } from '@app/shared/shared-forms' import { SharedGlobalIconModule } from '@app/shared/shared-icons' import { SharedMainModule } from '@app/shared/shared-main' +import { SharedSupportModal } from '@app/shared/shared-support-modal' import { SharedUserSubscriptionModule } from '@app/shared/shared-user-subscription' import { SharedVideoMiniatureModule } from '@app/shared/shared-video-miniature' import { SharedVideoPlaylistModule } from '@app/shared/shared-video-playlist' @@ -19,7 +20,8 @@ import { VideoChannelsComponent } from './video-channels.component' SharedVideoPlaylistModule, SharedVideoMiniatureModule, SharedUserSubscriptionModule, - SharedGlobalIconModule + SharedGlobalIconModule, + SharedSupportModal ], declarations: [ -- cgit v1.2.3