From 98bd5e2256bfdeba6d5ab07f0421acfde1a0de26 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 14 Feb 2023 11:47:01 +0100 Subject: Refactor login redirection/button links Correctly handle external auth redirection in all cases --- .../+video-watch/shared/action-buttons/video-rate.component.ts | 2 +- .../+video-watch/shared/comment/video-comment-add.component.html | 5 +---- .../+video-watch/shared/comment/video-comment-add.component.ts | 7 ------- 3 files changed, 2 insertions(+), 12 deletions(-) (limited to 'client/src/app/+videos') diff --git a/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts b/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts index 0fef246b3..d0c138834 100644 --- a/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts +++ b/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts @@ -82,7 +82,7 @@ export class VideoRateComponent implements OnInit, OnChanges, OnDestroy { getRatePopoverText () { if (this.isUserLoggedIn) return undefined - return $localize`You need to be logged in to rate this video.` + return $localize`You need to be logged in to rate this video.` } private checkUserRating () { diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.html b/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.html index 6bc201f32..203e9ce62 100644 --- a/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.html +++ b/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.html @@ -74,10 +74,7 @@ (click)="hideModals()" (key.enter)="hideModals()" > - + diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts index 9a9bfe710..033097084 100644 --- a/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts +++ b/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts @@ -13,7 +13,6 @@ import { SimpleChanges, ViewChild } from '@angular/core' -import { Router } from '@angular/router' import { Notifier, User } from '@app/core' import { VIDEO_COMMENT_TEXT_VALIDATOR } from '@app/shared/form-validators/video-comment-validators' import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' @@ -52,7 +51,6 @@ export class VideoCommentAddComponent extends FormReactive implements OnChanges, private notifier: Notifier, private videoCommentService: VideoCommentService, private modalService: NgbModal, - private router: Router, @Inject(LOCALE_ID) private localeId: string ) { super() @@ -161,11 +159,6 @@ export class VideoCommentAddComponent extends FormReactive implements OnChanges, return window.location.href } - gotoLogin () { - this.hideModals() - this.router.navigate([ '/login' ]) - } - cancelCommentReply () { this.cancel.emit(null) this.form.value['text'] = this.textareaElement.nativeElement.value = '' -- cgit v1.2.3