1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-09-20 17:38:20 +03:00

web demo fixes

This commit is contained in:
Eugene Pankov 2021-02-13 12:14:14 +01:00
parent 5fa056751d
commit 9734830a74
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
3 changed files with 14 additions and 4 deletions

View File

@ -85,6 +85,7 @@ $side-tab-width: 200px;
cursor: pointer;
display: flex;
align-items: center;
padding: 0 15px;
flex: 0 0 auto;
border-bottom: 2px solid transparent;

View File

@ -44,8 +44,11 @@ import 'ng2-dnd/bundles/style.css'
// PerfectScrollbar fix
import { fromEvent } from 'rxjs/internal/observable/fromEvent'
import { merge } from 'rxjs/internal/observable/merge'
require('rxjs').fromEvent = fromEvent
require('rxjs').merge = merge
try {
require('rxjs').fromEvent = fromEvent
require('rxjs').merge = merge
} catch {}
const PROVIDERS = [
{ provide: HotkeyProvider, useClass: AppHotkeyProvider, multi: true },

View File

@ -1,11 +1,13 @@
import { Injectable } from '@angular/core'
import { ElectronService } from './electron.service'
import * as winston from 'winston'
import type * as winston from 'winston'
import * as fs from 'fs'
import * as path from 'path'
const initializeWinston = (electron: ElectronService) => {
const logDirectory = electron.app.getPath('userData')
// eslint-disable-next-line
const winston = require('winston')
if (!fs.existsSync(logDirectory)) {
fs.mkdirSync(logDirectory)
@ -64,7 +66,11 @@ export class LogService {
/** @hidden */
private constructor (electron: ElectronService) {
this.log = initializeWinston(electron)
if (!process.env.XWEB) {
this.log = initializeWinston(electron)
} else {
this.log = console as any
}
}
create (name: string): Logger {