mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-23 13:13:49 +03:00
web demo fixes
This commit is contained in:
parent
5fa056751d
commit
9734830a74
@ -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;
|
||||
|
@ -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 },
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user