aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-07-15 15:30:14 +0200
committerChocobozzz <me@florianbigard.com>2022-07-18 11:37:18 +0200
commit42b40636991b97fe818007fab19091764fc5db73 (patch)
treedb431787c06ce898d22e91ff771f795219274fc6 /client/src/app/shared/shared-main
parent654d4ede7fa4d0faa71e49bcfab6b65a686397b2 (diff)
downloadPeerTube-42b40636991b97fe818007fab19091764fc5db73.tar.gz
PeerTube-42b40636991b97fe818007fab19091764fc5db73.tar.zst
PeerTube-42b40636991b97fe818007fab19091764fc5db73.zip
Add ability for client to create server logs
Diffstat (limited to 'client/src/app/shared/shared-main')
-rw-r--r--client/src/app/shared/shared-main/angular/defer-loading.directive.ts4
-rw-r--r--client/src/app/shared/shared-main/misc/list-overflow.component.ts6
-rw-r--r--client/src/app/shared/shared-main/users/user-notification.model.ts3
3 files changed, 7 insertions, 6 deletions
diff --git a/client/src/app/shared/shared-main/angular/defer-loading.directive.ts b/client/src/app/shared/shared-main/angular/defer-loading.directive.ts
index 9a10e90e3..53d6e70ba 100644
--- a/client/src/app/shared/shared-main/angular/defer-loading.directive.ts
+++ b/client/src/app/shared/shared-main/angular/defer-loading.directive.ts
@@ -13,7 +13,7 @@ import {
13 ViewContainerRef 13 ViewContainerRef
14} from '@angular/core' 14} from '@angular/core'
15 15
16const logger = debug('peertube:main:DeferLoadingDirective') 16const debugLogger = debug('peertube:main:DeferLoadingDirective')
17 17
18@Directive({ 18@Directive({
19 selector: '[myDeferLoading]' 19 selector: '[myDeferLoading]'
@@ -52,7 +52,7 @@ export class DeferLoadingDirective implements AfterViewInit, OnDestroy {
52 load () { 52 load () {
53 if (this.isLoaded()) return 53 if (this.isLoaded()) return
54 54
55 logger('Loading component') 55 debugLogger('Loading component')
56 56
57 this.viewContainer.clear() 57 this.viewContainer.clear()
58 this.view = this.viewContainer.createEmbeddedView(this.template, {}, 0) 58 this.view = this.viewContainer.createEmbeddedView(this.template, {}, 0)
diff --git a/client/src/app/shared/shared-main/misc/list-overflow.component.ts b/client/src/app/shared/shared-main/misc/list-overflow.component.ts
index 541991f74..7e4e1b1d1 100644
--- a/client/src/app/shared/shared-main/misc/list-overflow.component.ts
+++ b/client/src/app/shared/shared-main/misc/list-overflow.component.ts
@@ -17,7 +17,7 @@ import { ScreenService } from '@app/core'
17import { NgbDropdown, NgbModal } from '@ng-bootstrap/ng-bootstrap' 17import { NgbDropdown, NgbModal } from '@ng-bootstrap/ng-bootstrap'
18import * as debug from 'debug' 18import * as debug from 'debug'
19 19
20const logger = debug('peertube:main:ListOverflowItem') 20const debugLogger = debug('peertube:main:ListOverflowItem')
21 21
22export interface ListOverflowItem { 22export interface ListOverflowItem {
23 label: string 23 label: string
@@ -66,7 +66,7 @@ export class ListOverflowComponent<T extends ListOverflowItem> implements AfterV
66 let showItemsUntilIndexExcluded: number 66 let showItemsUntilIndexExcluded: number
67 let accWidth = 0 67 let accWidth = 0
68 68
69 logger('Parent width is %d', parentWidth) 69 debugLogger('Parent width is %d', parentWidth)
70 70
71 for (const [ index, el ] of this.itemsRendered.toArray().entries()) { 71 for (const [ index, el ] of this.itemsRendered.toArray().entries()) {
72 accWidth += el.nativeElement.getBoundingClientRect().width 72 accWidth += el.nativeElement.getBoundingClientRect().width
@@ -79,7 +79,7 @@ export class ListOverflowComponent<T extends ListOverflowItem> implements AfterV
79 e.style.visibility = shouldBeVisible ? 'inherit' : 'hidden' 79 e.style.visibility = shouldBeVisible ? 'inherit' : 'hidden'
80 } 80 }
81 81
82 logger('Accumulated children width is %d so exclude index is %d', accWidth, showItemsUntilIndexExcluded) 82 debugLogger('Accumulated children width is %d so exclude index is %d', accWidth, showItemsUntilIndexExcluded)
83 83
84 this.showItemsUntilIndexExcluded = showItemsUntilIndexExcluded 84 this.showItemsUntilIndexExcluded = showItemsUntilIndexExcluded
85 this.cdr.markForCheck() 85 this.cdr.markForCheck()
diff --git a/client/src/app/shared/shared-main/users/user-notification.model.ts b/client/src/app/shared/shared-main/users/user-notification.model.ts
index a2367166e..bf8870a79 100644
--- a/client/src/app/shared/shared-main/users/user-notification.model.ts
+++ b/client/src/app/shared/shared-main/users/user-notification.model.ts
@@ -2,6 +2,7 @@ import { AuthUser } from '@app/core'
2import { Account } from '@app/shared/shared-main/account/account.model' 2import { Account } from '@app/shared/shared-main/account/account.model'
3import { Actor } from '@app/shared/shared-main/account/actor.model' 3import { Actor } from '@app/shared/shared-main/account/actor.model'
4import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model' 4import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
5import { logger } from '@root-helpers/logger'
5import { 6import {
6 AbuseState, 7 AbuseState,
7 ActorInfo, 8 ActorInfo,
@@ -234,7 +235,7 @@ export class UserNotification implements UserNotificationServer {
234 } 235 }
235 } catch (err) { 236 } catch (err) {
236 this.type = null 237 this.type = null
237 console.error(err) 238 logger.error(err)
238 } 239 }
239 } 240 }
240 241