diff options
author | Chocobozzz <me@florianbigard.com> | 2022-07-15 15:30:14 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-07-18 11:37:18 +0200 |
commit | 42b40636991b97fe818007fab19091764fc5db73 (patch) | |
tree | db431787c06ce898d22e91ff771f795219274fc6 /client/src/app/app.component.ts | |
parent | 654d4ede7fa4d0faa71e49bcfab6b65a686397b2 (diff) | |
download | PeerTube-42b40636991b97fe818007fab19091764fc5db73.tar.gz PeerTube-42b40636991b97fe818007fab19091764fc5db73.tar.zst PeerTube-42b40636991b97fe818007fab19091764fc5db73.zip |
Add ability for client to create server logs
Diffstat (limited to 'client/src/app/app.component.ts')
-rw-r--r-- | client/src/app/app.component.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index 8fdab0c40..a2ad4806c 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Hotkey, HotkeysService } from 'angular2-hotkeys' | 1 | import { Hotkey, HotkeysService } from 'angular2-hotkeys' |
2 | import { forkJoin, delay } from 'rxjs' | 2 | import { delay, forkJoin } from 'rxjs' |
3 | import { filter, first, map } from 'rxjs/operators' | 3 | import { filter, first, map } from 'rxjs/operators' |
4 | import { DOCUMENT, getLocaleDirection, PlatformLocation } from '@angular/common' | 4 | import { DOCUMENT, getLocaleDirection, PlatformLocation } from '@angular/common' |
5 | import { AfterViewInit, Component, Inject, LOCALE_ID, OnInit, ViewChild } from '@angular/core' | 5 | import { AfterViewInit, Component, Inject, LOCALE_ID, OnInit, ViewChild } from '@angular/core' |
@@ -20,18 +20,19 @@ import { | |||
20 | import { HooksService } from '@app/core/plugins/hooks.service' | 20 | import { HooksService } from '@app/core/plugins/hooks.service' |
21 | import { PluginService } from '@app/core/plugins/plugin.service' | 21 | import { PluginService } from '@app/core/plugins/plugin.service' |
22 | import { AccountSetupWarningModalComponent } from '@app/modal/account-setup-warning-modal.component' | 22 | import { AccountSetupWarningModalComponent } from '@app/modal/account-setup-warning-modal.component' |
23 | import { AdminWelcomeModalComponent } from '@app/modal/admin-welcome-modal.component' | ||
23 | import { CustomModalComponent } from '@app/modal/custom-modal.component' | 24 | import { CustomModalComponent } from '@app/modal/custom-modal.component' |
24 | import { InstanceConfigWarningModalComponent } from '@app/modal/instance-config-warning-modal.component' | 25 | import { InstanceConfigWarningModalComponent } from '@app/modal/instance-config-warning-modal.component' |
25 | import { AdminWelcomeModalComponent } from '@app/modal/admin-welcome-modal.component' | ||
26 | import { NgbConfig, NgbModal } from '@ng-bootstrap/ng-bootstrap' | 26 | import { NgbConfig, NgbModal } from '@ng-bootstrap/ng-bootstrap' |
27 | import { LoadingBarService } from '@ngx-loading-bar/core' | 27 | import { LoadingBarService } from '@ngx-loading-bar/core' |
28 | import { logger } from '@root-helpers/logger' | ||
28 | import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' | 29 | import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' |
29 | import { getShortLocale } from '@shared/core-utils/i18n' | 30 | import { getShortLocale } from '@shared/core-utils/i18n' |
30 | import { BroadcastMessageLevel, HTMLServerConfig, UserRole } from '@shared/models' | 31 | import { BroadcastMessageLevel, HTMLServerConfig, UserRole } from '@shared/models' |
31 | import { MenuService } from './core/menu/menu.service' | 32 | import { MenuService } from './core/menu/menu.service' |
32 | import { POP_STATE_MODAL_DISMISS } from './helpers' | 33 | import { POP_STATE_MODAL_DISMISS } from './helpers' |
33 | import { InstanceService } from './shared/shared-instance' | ||
34 | import { GlobalIconName } from './shared/shared-icons' | 34 | import { GlobalIconName } from './shared/shared-icons' |
35 | import { InstanceService } from './shared/shared-instance' | ||
35 | 36 | ||
36 | @Component({ | 37 | @Component({ |
37 | selector: 'my-app', | 38 | selector: 'my-app', |
@@ -221,7 +222,7 @@ export class AppComponent implements OnInit, AfterViewInit { | |||
221 | /* eslint-disable no-eval */ | 222 | /* eslint-disable no-eval */ |
222 | eval(this.serverConfig.instance.customizations.javascript) | 223 | eval(this.serverConfig.instance.customizations.javascript) |
223 | } catch (err) { | 224 | } catch (err) { |
224 | console.error('Cannot eval custom JavaScript.', err) | 225 | logger.error('Cannot eval custom JavaScript.', err) |
225 | } | 226 | } |
226 | } | 227 | } |
227 | } | 228 | } |