mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-21 19:07:59 +00:00
wip
This commit is contained in:
@@ -48,6 +48,7 @@
|
|||||||
"@types/node": "18.7.23",
|
"@types/node": "18.7.23",
|
||||||
"atomically": "^1.7.0",
|
"atomically": "^1.7.0",
|
||||||
"filesize": "^9",
|
"filesize": "^9",
|
||||||
|
"@ngx-translate/core": "^14.0.0",
|
||||||
"ngx-filesize": "^3.0.1"
|
"ngx-filesize": "^3.0.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
@@ -9,13 +9,13 @@ import { ToastrModule } from 'ngx-toastr'
|
|||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [CommonModule],
|
imports: [CommonModule],
|
||||||
selector: 'root',
|
selector: 'root',
|
||||||
template: '<div *ngIf="true">Hi</div>',
|
template: '',
|
||||||
})
|
})
|
||||||
export class RootComponent {
|
export class RootComponent {
|
||||||
static bootstrapComponent: any
|
static bootstrapComponent: any
|
||||||
constructor (private viewContainerRef: ViewContainerRef) { }
|
constructor (private viewContainerRef: ViewContainerRef) { }
|
||||||
ngAfterViewInit () {
|
ngAfterViewInit () {
|
||||||
// this.viewContainerRef.createComponent(RootComponent.bootstrapComponent)
|
this.viewContainerRef.createComponent(RootComponent.bootstrapComponent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ export function getRootModule (plugins: any[]) {
|
|||||||
BrowserModule,
|
BrowserModule,
|
||||||
// CommonModule,
|
// CommonModule,
|
||||||
// ...plugins,
|
// ...plugins,
|
||||||
// NgbModule,
|
NgbModule,
|
||||||
ToastrModule.forRoot({
|
ToastrModule.forRoot({
|
||||||
positionClass: 'toast-bottom-center',
|
positionClass: 'toast-bottom-center',
|
||||||
toastClass: 'toast',
|
toastClass: 'toast',
|
||||||
|
@@ -8,9 +8,9 @@ import './toastr.scss'
|
|||||||
// Importing before @angular/*
|
// Importing before @angular/*
|
||||||
import { findPlugins, initModuleLookup, loadPlugins } from './plugins'
|
import { findPlugins, initModuleLookup, loadPlugins } from './plugins'
|
||||||
|
|
||||||
import { enableProdMode, NgModuleRef, ApplicationRef, importProvidersFrom } from '@angular/core'
|
import { enableProdMode, NgModuleRef, ApplicationRef, importProvidersFrom, CompilerFactory, COMPILER_OPTIONS } from '@angular/core'
|
||||||
import { bootstrapApplication, enableDebugTools } from '@angular/platform-browser'
|
import { bootstrapApplication, enableDebugTools } from '@angular/platform-browser'
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
|
import { JitCompilerFactory, platformBrowserDynamic } from '@angular/platform-browser-dynamic'
|
||||||
import { ipcRenderer } from 'electron'
|
import { ipcRenderer } from 'electron'
|
||||||
|
|
||||||
import { getRootModule, RootComponent } from './app.module'
|
import { getRootModule, RootComponent } from './app.module'
|
||||||
@@ -41,8 +41,6 @@ async function bootstrap (bootstrapData: BootstrapData, plugins: PluginInfo[], s
|
|||||||
(document.querySelector('.progress .bar') as HTMLElement).style.width = `${100 * current / total}%` // eslint-disable-line
|
(document.querySelector('.progress .bar') as HTMLElement).style.width = `${100 * current / total}%` // eslint-disable-line
|
||||||
})
|
})
|
||||||
|
|
||||||
pluginModules.splice(0, 999)
|
|
||||||
|
|
||||||
window['pluginModules'] = pluginModules
|
window['pluginModules'] = pluginModules
|
||||||
|
|
||||||
const providers = [
|
const providers = [
|
||||||
|
@@ -1,8 +1,19 @@
|
|||||||
|
import * as fs from 'fs'
|
||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
import wp from 'webpack'
|
import wp from 'webpack'
|
||||||
const __dirname = path.dirname(new URL(import.meta.url).pathname)
|
const __dirname = path.dirname(new URL(import.meta.url).pathname)
|
||||||
import { AngularWebpackPlugin } from '@ngtools/webpack'
|
import { AngularWebpackPlugin } from '@ngtools/webpack'
|
||||||
import linkerPlugin from '@angular/compiler-cli/linker/babel'
|
import { createEs2015LinkerPlugin } from '@angular/compiler-cli/linker/babel'
|
||||||
|
const linkerPlugin = createEs2015LinkerPlugin({
|
||||||
|
linkerJitMode: true,
|
||||||
|
fileSystem: {
|
||||||
|
resolve: path.resolve,
|
||||||
|
exists: fs.existsSync,
|
||||||
|
dirname: path.dirname,
|
||||||
|
relative: path.relative,
|
||||||
|
readFile: fs.readFileSync,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
export default () => ({
|
export default () => ({
|
||||||
name: 'tabby',
|
name: 'tabby',
|
||||||
@@ -75,7 +86,7 @@ export default () => ({
|
|||||||
new AngularWebpackPlugin({
|
new AngularWebpackPlugin({
|
||||||
tsconfig: path.resolve(__dirname, 'tsconfig.json'),
|
tsconfig: path.resolve(__dirname, 'tsconfig.json'),
|
||||||
directTemplateLoading: false,
|
directTemplateLoading: false,
|
||||||
jitMode: false,
|
jitMode: true,
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
@@ -16,6 +16,13 @@
|
|||||||
update-notifier "^2.2.0"
|
update-notifier "^2.2.0"
|
||||||
yargs "^8.0.2"
|
yargs "^8.0.2"
|
||||||
|
|
||||||
|
"@ngx-translate/core@^14.0.0":
|
||||||
|
version "14.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@ngx-translate/core/-/core-14.0.0.tgz#af421d0e1a28376843f0fed375cd2fae7630a5ff"
|
||||||
|
integrity sha512-UevdwNCXMRCdJv//0kC8h2eSfmi02r29xeE8E9gJ1Al4D4jEJ7eiLPdjslTMc21oJNGguqqWeEVjf64SFtvw2w==
|
||||||
|
dependencies:
|
||||||
|
tslib "^2.3.0"
|
||||||
|
|
||||||
"@serialport/binding-abstract@^9.0.2":
|
"@serialport/binding-abstract@^9.0.2":
|
||||||
version "9.2.3"
|
version "9.2.3"
|
||||||
resolved "https://registry.yarnpkg.com/@serialport/binding-abstract/-/binding-abstract-9.2.3.tgz#e7dd273357b6a698af7ad58db6f57f62443a0acb"
|
resolved "https://registry.yarnpkg.com/@serialport/binding-abstract/-/binding-abstract-9.2.3.tgz#e7dd273357b6a698af7ad58db6f57f62443a0acb"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
"author": "Eugene Pankov",
|
"author": "Eugene Pankov",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ngx-translate/core": "^14.0.0",
|
|
||||||
"bootstrap": "^5.3.0-alpha.1",
|
"bootstrap": "^5.3.0-alpha.1",
|
||||||
"deepmerge": "^4.1.1",
|
"deepmerge": "^4.1.1",
|
||||||
"fuzzy-search": "^3.2.1",
|
"fuzzy-search": "^3.2.1",
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
div Hello
|
|
||||||
div there
|
|
||||||
div(*ngFor='let x of [1,2,3]') there
|
|
@@ -55,8 +55,8 @@ function makeTabAnimation (dimension: string, size: number) {
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
templateUrl: './1.pug',
|
templateUrl: './appRoot.component.pug',
|
||||||
styles: [require('./appRoot.component.scss')],
|
styleUrls: ['./appRoot.component.scss'],
|
||||||
animations: [
|
animations: [
|
||||||
trigger('animateTab', makeTabAnimation('width', 200)),
|
trigger('animateTab', makeTabAnimation('width', 200)),
|
||||||
],
|
],
|
||||||
@@ -90,6 +90,7 @@ export class AppRootComponent {
|
|||||||
ngbModal: NgbModal,
|
ngbModal: NgbModal,
|
||||||
_themes: ThemesService,
|
_themes: ThemesService,
|
||||||
) {
|
) {
|
||||||
|
document.querySelector('app-root')?.remove()
|
||||||
this.logger = log.create('main')
|
this.logger = log.create('main')
|
||||||
this.logger.info('v', platform.getAppVersion())
|
this.logger.info('v', platform.getAppVersion())
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import { Component } from '@angular/core'
|
||||||
import { Observable, Subscription, Subject } from 'rxjs'
|
import { Observable, Subscription, Subject } from 'rxjs'
|
||||||
|
|
||||||
interface CancellableEvent {
|
interface CancellableEvent {
|
||||||
@@ -41,6 +42,7 @@ export class SubscriptionContainer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Component({ template: '' })
|
||||||
export class BaseComponent {
|
export class BaseComponent {
|
||||||
protected get destroyed$ (): Observable<void> { return this._destroyed }
|
protected get destroyed$ (): Observable<void> { return this._destroyed }
|
||||||
private _destroyed = new Subject<void>()
|
private _destroyed = new Subject<void>()
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Observable, Subject, distinctUntilChanged, filter, debounceTime } from 'rxjs'
|
import { Observable, Subject, distinctUntilChanged, filter, debounceTime } from 'rxjs'
|
||||||
import { EmbeddedViewRef, Injector, ViewContainerRef, ViewRef } from '@angular/core'
|
import { Component, EmbeddedViewRef, Injector, ViewContainerRef, ViewRef } from '@angular/core'
|
||||||
import { RecoveryToken } from '../api/tabRecovery'
|
import { RecoveryToken } from '../api/tabRecovery'
|
||||||
import { BaseComponent } from './base.component'
|
import { BaseComponent } from './base.component'
|
||||||
import { ConfigService } from '../services/config.service'
|
import { ConfigService } from '../services/config.service'
|
||||||
@@ -19,6 +19,7 @@ export interface GetRecoveryTokenOptions {
|
|||||||
/**
|
/**
|
||||||
* Abstract base class for custom tab components
|
* Abstract base class for custom tab components
|
||||||
*/
|
*/
|
||||||
|
// @Component({ template: '' })
|
||||||
export abstract class BaseTabComponent extends BaseComponent {
|
export abstract class BaseTabComponent extends BaseComponent {
|
||||||
/**
|
/**
|
||||||
* Parent tab (usually a SplitTabComponent)
|
* Parent tab (usually a SplitTabComponent)
|
||||||
|
@@ -5,5 +5,5 @@ i.icon(
|
|||||||
)
|
)
|
||||||
.icon(
|
.icon(
|
||||||
[fastHtmlBind]='icon',
|
[fastHtmlBind]='icon',
|
||||||
*ngIf='isHTML'
|
*ngIf='isHTML && icon'
|
||||||
)
|
)
|
||||||
|
@@ -5,8 +5,8 @@ import { BaseComponent } from './base.component'
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'profile-icon',
|
selector: 'profile-icon',
|
||||||
template: require('./profileIcon.component.pug'),
|
templateUrl:'./profileIcon.component.pug',
|
||||||
styles: [require('./profileIcon.component.scss')],
|
styleUrls: ['./profileIcon.component.scss'],
|
||||||
})
|
})
|
||||||
export class ProfileIconComponent extends BaseComponent {
|
export class ProfileIconComponent extends BaseComponent {
|
||||||
@Input() icon?: string
|
@Input() icon?: string
|
||||||
|
@@ -3,10 +3,11 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
|
|||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./promptModal.component.pug'),
|
templateUrl:'./promptModal.component.pug',
|
||||||
})
|
})
|
||||||
export class PromptModalComponent {
|
export class PromptModalComponent {
|
||||||
@Input() value: string
|
@Input() value: string
|
||||||
|
@Input() prompt: string|undefined
|
||||||
@Input() password: boolean
|
@Input() password: boolean
|
||||||
@Input() remember: boolean
|
@Input() remember: boolean
|
||||||
@Input() showRememberCheckbox: boolean
|
@Input() showRememberCheckbox: boolean
|
||||||
|
@@ -5,7 +5,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'rename-tab-modal',
|
selector: 'rename-tab-modal',
|
||||||
template: require('./renameTabModal.component.pug'),
|
templateUrl:'./renameTabModal.component.pug',
|
||||||
})
|
})
|
||||||
export class RenameTabModalComponent {
|
export class RenameTabModalComponent {
|
||||||
@Input() value: string
|
@Input() value: string
|
||||||
|
@@ -3,7 +3,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
|
|||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./safeModeModal.component.pug'),
|
templateUrl:'./safeModeModal.component.pug',
|
||||||
})
|
})
|
||||||
export class SafeModeModalComponent {
|
export class SafeModeModalComponent {
|
||||||
@Input() error: Error
|
@Input() error: Error
|
||||||
|
@@ -7,8 +7,8 @@ import { SelectorOption } from '../api/selector'
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'selector-modal',
|
selector: 'selector-modal',
|
||||||
template: require('./selectorModal.component.pug'),
|
templateUrl:'./selectorModal.component.pug',
|
||||||
styles: [require('./selectorModal.component.scss')],
|
styleUrls: ['./selectorModal.component.scss'],
|
||||||
})
|
})
|
||||||
export class SelectorModalComponent<T> {
|
export class SelectorModalComponent<T> {
|
||||||
@Input() options: SelectorOption<T>[]
|
@Input() options: SelectorOption<T>[]
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
import { HostBinding, ElementRef } from '@angular/core'
|
import { HostBinding, ElementRef, Component } from '@angular/core'
|
||||||
import { BaseComponent } from './base.component'
|
import { BaseComponent } from './base.component'
|
||||||
|
|
||||||
|
@Component({ template: '' })
|
||||||
export abstract class SelfPositioningComponent extends BaseComponent {
|
export abstract class SelfPositioningComponent extends BaseComponent {
|
||||||
@HostBinding('style.left') cssLeft: string
|
@HostBinding('style.left') cssLeft: string
|
||||||
@HostBinding('style.top') cssTop: string
|
@HostBinding('style.top') cssTop: string
|
||||||
|
@@ -186,7 +186,7 @@ export type SplitDropZoneInfo = {
|
|||||||
>
|
>
|
||||||
</split-tab-pane-label>
|
</split-tab-pane-label>
|
||||||
`,
|
`,
|
||||||
styles: [require('./splitTab.component.scss')],
|
styleUrls: ['./splitTab.component.scss'],
|
||||||
})
|
})
|
||||||
export class SplitTabComponent extends BaseTabComponent implements AfterViewInit, OnDestroy {
|
export class SplitTabComponent extends BaseTabComponent implements AfterViewInit, OnDestroy {
|
||||||
static DIRECTIONS: SplitDirection[] = ['t', 'r', 'b', 'l']
|
static DIRECTIONS: SplitDirection[] = ['t', 'r', 'b', 'l']
|
||||||
|
@@ -18,7 +18,7 @@ import { SplitDropZoneInfo, SplitTabComponent } from './splitTab.component'
|
|||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
styles: [require('./splitTabDropZone.component.scss')],
|
styleUrls: ['./splitTabDropZone.component.scss'],
|
||||||
})
|
})
|
||||||
export class SplitTabDropZoneComponent extends SelfPositioningComponent {
|
export class SplitTabDropZoneComponent extends SelfPositioningComponent {
|
||||||
@Input() dropZone: SplitDropZoneInfo
|
@Input() dropZone: SplitDropZoneInfo
|
||||||
|
@@ -19,7 +19,7 @@ import { SelfPositioningComponent } from './selfPositioning.component'
|
|||||||
<label>{{tab.title}}</label>
|
<label>{{tab.title}}</label>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
styles: [require('./splitTabPaneLabel.component.scss')],
|
styleUrls: ['./splitTabPaneLabel.component.scss'],
|
||||||
})
|
})
|
||||||
export class SplitTabPaneLabelComponent extends SelfPositioningComponent {
|
export class SplitTabPaneLabelComponent extends SelfPositioningComponent {
|
||||||
@Input() tab: BaseTabComponent
|
@Input() tab: BaseTabComponent
|
||||||
|
@@ -7,7 +7,7 @@ import { SplitContainer } from './splitTab.component'
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'split-tab-spanner',
|
selector: 'split-tab-spanner',
|
||||||
template: '',
|
template: '',
|
||||||
styles: [require('./splitTabSpanner.component.scss')],
|
styleUrls: ['./splitTabSpanner.component.scss'],
|
||||||
})
|
})
|
||||||
export class SplitTabSpannerComponent extends SelfPositioningComponent {
|
export class SplitTabSpannerComponent extends SelfPositioningComponent {
|
||||||
@Input() container: SplitContainer
|
@Input() container: SplitContainer
|
||||||
|
@@ -7,8 +7,8 @@ import { Command, CommandLocation } from '../api/commands'
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'start-page',
|
selector: 'start-page',
|
||||||
template: require('./startPage.component.pug'),
|
templateUrl:'./startPage.component.pug',
|
||||||
styles: [require('./startPage.component.scss')],
|
styleUrls: ['./startPage.component.scss'],
|
||||||
})
|
})
|
||||||
export class StartPageComponent {
|
export class StartPageComponent {
|
||||||
version: string
|
version: string
|
||||||
@@ -28,7 +28,7 @@ export class StartPageComponent {
|
|||||||
return this.domSanitizer.bypassSecurityTrustHtml(icon ?? '')
|
return this.domSanitizer.bypassSecurityTrustHtml(icon ?? '')
|
||||||
}
|
}
|
||||||
|
|
||||||
buttonsTrackBy (btn: Command): any {
|
buttonsTrackBy (_, btn: Command): any {
|
||||||
return btn.label + btn.icon
|
return btn.label + btn.icon
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -8,9 +8,9 @@ import { BaseTabComponent } from '../components/baseTab.component'
|
|||||||
template: `
|
template: `
|
||||||
<ng-template #placeholder></ng-template>
|
<ng-template #placeholder></ng-template>
|
||||||
`,
|
`,
|
||||||
styles: [
|
styleUrls: [
|
||||||
require('./tabBody.component.scss'),
|
'./tabBody.component.scss',
|
||||||
require('./tabBody.deep.component.css'),
|
'./tabBody.deep.component.css',
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class TabBodyComponent implements OnChanges {
|
export class TabBodyComponent implements OnChanges {
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
profile-icon(
|
profile-icon(
|
||||||
*ngIf='config.store.terminal.showTabProfileIcon && tab.icon',
|
*ngIf='config.store.terminal.showTabProfileIcon && tab.icon',
|
||||||
[icon]='tab.icon',
|
[icon]='tab.icon',
|
||||||
[color]='tab.color'
|
[color]='tab.color ?? undefined'
|
||||||
)
|
)
|
||||||
|
|
||||||
.name(
|
.name(
|
||||||
|
@@ -15,8 +15,8 @@ import { PlatformService } from '../api/platform'
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'tab-header',
|
selector: 'tab-header',
|
||||||
template: require('./tabHeader.component.pug'),
|
templateUrl:'./tabHeader.component.pug',
|
||||||
styles: [require('./tabHeader.component.scss')],
|
styleUrls: ['./tabHeader.component.scss'],
|
||||||
})
|
})
|
||||||
export class TabHeaderComponent extends BaseComponent {
|
export class TabHeaderComponent extends BaseComponent {
|
||||||
@Input() index: number
|
@Input() index: number
|
||||||
|
@@ -1,2 +1,2 @@
|
|||||||
.title((dblclick)='hostApp.toggleMaximize()') Tabby
|
.title((dblclick)='hostWindow.toggleMaximize()') Tabby
|
||||||
window-controls
|
window-controls
|
||||||
|
@@ -1,9 +1,12 @@
|
|||||||
import { Component } from '@angular/core'
|
import { Component } from '@angular/core'
|
||||||
|
import { HostWindowService } from '../api'
|
||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'title-bar',
|
selector: 'title-bar',
|
||||||
template: require('./titleBar.component.pug'),
|
templateUrl:'./titleBar.component.pug',
|
||||||
styles: [require('./titleBar.component.scss')],
|
styleUrls: ['./titleBar.component.scss'],
|
||||||
})
|
})
|
||||||
export class TitleBarComponent { } // eslint-disable-line @typescript-eslint/no-extraneous-class
|
export class TitleBarComponent {
|
||||||
|
constructor (public hostWindow: HostWindowService) { }
|
||||||
|
}
|
||||||
|
@@ -11,7 +11,7 @@ import { CheckboxComponent } from './checkbox.component'
|
|||||||
<label class="cform-check-label"></label>
|
<label class="cform-check-label"></label>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
styles: [require('./toggle.component.scss')],
|
styleUrls: ['./toggle.component.scss'],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: NG_VALUE_ACCESSOR, useExisting: ToggleComponent, multi: true },
|
{ provide: NG_VALUE_ACCESSOR, useExisting: ToggleComponent, multi: true },
|
||||||
],
|
],
|
||||||
|
@@ -5,8 +5,8 @@ import { FileDownload, FileTransfer, PlatformService } from '../api/platform'
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'transfers-menu',
|
selector: 'transfers-menu',
|
||||||
template: require('./transfersMenu.component.pug'),
|
templateUrl:'./transfersMenu.component.pug',
|
||||||
styles: [require('./transfersMenu.component.scss')],
|
styleUrls: ['./transfersMenu.component.scss'],
|
||||||
})
|
})
|
||||||
export class TransfersMenuComponent {
|
export class TransfersMenuComponent {
|
||||||
@Input() transfers: FileTransfer[]
|
@Input() transfers: FileTransfer[]
|
||||||
|
@@ -3,7 +3,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
|
|||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./unlockVaultModal.component.pug'),
|
templateUrl:'./unlockVaultModal.component.pug',
|
||||||
})
|
})
|
||||||
export class UnlockVaultModalComponent {
|
export class UnlockVaultModalComponent {
|
||||||
passphrase: string
|
passphrase: string
|
||||||
|
@@ -8,8 +8,8 @@ import { LocaleService } from '../services/locale.service'
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'welcome-page',
|
selector: 'welcome-page',
|
||||||
template: require('./welcomeTab.component.pug'),
|
templateUrl:'./welcomeTab.component.pug',
|
||||||
styles: [require('./welcomeTab.component.scss')],
|
styleUrls: ['./welcomeTab.component.scss'],
|
||||||
})
|
})
|
||||||
export class WelcomeTabComponent extends BaseTabComponent {
|
export class WelcomeTabComponent extends BaseTabComponent {
|
||||||
enableGlobalHotkey = true
|
enableGlobalHotkey = true
|
||||||
|
@@ -6,8 +6,8 @@ import { AppService } from '../services/app.service'
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'window-controls',
|
selector: 'window-controls',
|
||||||
template: require('./windowControls.component.pug'),
|
templateUrl:'./windowControls.component.pug',
|
||||||
styles: [require('./windowControls.component.scss')],
|
styleUrls: ['./windowControls.component.scss'],
|
||||||
})
|
})
|
||||||
export class WindowControlsComponent {
|
export class WindowControlsComponent {
|
||||||
constructor (public hostWindow: HostWindowService, public app: AppService) { }
|
constructor (public hostWindow: HostWindowService, public app: AppService) { }
|
||||||
|
@@ -12,7 +12,7 @@ export class CommandService {
|
|||||||
private app: AppService,
|
private app: AppService,
|
||||||
private translate: TranslateService,
|
private translate: TranslateService,
|
||||||
@Optional() @Inject(TabContextMenuItemProvider) protected contextMenuProviders: TabContextMenuItemProvider[],
|
@Optional() @Inject(TabContextMenuItemProvider) protected contextMenuProviders: TabContextMenuItemProvider[],
|
||||||
@Inject(ToolbarButtonProvider) private toolbarButtonProviders: ToolbarButtonProvider[],
|
@Optional() @Inject(ToolbarButtonProvider) private toolbarButtonProviders: ToolbarButtonProvider[],
|
||||||
@Inject(CommandProvider) private commandProviders: CommandProvider[],
|
@Inject(CommandProvider) private commandProviders: CommandProvider[],
|
||||||
) {
|
) {
|
||||||
this.contextMenuProviders.sort((a, b) => a.weight - b.weight)
|
this.contextMenuProviders.sort((a, b) => a.weight - b.weight)
|
||||||
|
@@ -236,7 +236,10 @@ export class ConfigService {
|
|||||||
*
|
*
|
||||||
* @typeparam T Base provider type
|
* @typeparam T Base provider type
|
||||||
*/
|
*/
|
||||||
enabledServices<T extends object> (services: T[]): T[] { // eslint-disable-line @typescript-eslint/ban-types
|
enabledServices<T extends object> (services: T[]|undefined): T[] { // eslint-disable-line @typescript-eslint/ban-types
|
||||||
|
if (!services) {
|
||||||
|
return []
|
||||||
|
}
|
||||||
if (!this.servicesCache) {
|
if (!this.servicesCache) {
|
||||||
this.servicesCache = {}
|
this.servicesCache = {}
|
||||||
for (const imp of window['pluginModules']) {
|
for (const imp of window['pluginModules']) {
|
||||||
|
@@ -156,21 +156,21 @@ export class ProfilesService {
|
|||||||
callback: () => resolve(p),
|
callback: () => resolve(p),
|
||||||
}))]
|
}))]
|
||||||
|
|
||||||
try {
|
// TODO try {
|
||||||
const { SettingsTabComponent } = window['nodeRequire']('tabby-settings')
|
// const { SettingsTabComponent } = window['nodeRequire']('tabby-settings')
|
||||||
options.push({
|
// options.push({
|
||||||
name: this.translate.instant('Manage profiles'),
|
// name: this.translate.instant('Manage profiles'),
|
||||||
icon: 'fas fa-window-restore',
|
// icon: 'fas fa-window-restore',
|
||||||
weight: 10,
|
// weight: 10,
|
||||||
callback: () => {
|
// callback: () => {
|
||||||
this.app.openNewTabRaw({
|
// this.app.openNewTabRaw({
|
||||||
type: SettingsTabComponent,
|
// type: SettingsTabComponent,
|
||||||
inputs: { activeTab: 'profiles' },
|
// inputs: { activeTab: 'profiles' },
|
||||||
})
|
// })
|
||||||
resolve(null)
|
// resolve(null)
|
||||||
},
|
// },
|
||||||
})
|
// })
|
||||||
} catch { }
|
// } catch { }
|
||||||
|
|
||||||
if (this.getProviders().some(x => x.supportsQuickConnect)) {
|
if (this.getProviders().some(x => x.supportsQuickConnect)) {
|
||||||
options.push({
|
options.push({
|
||||||
|
@@ -2,13 +2,6 @@
|
|||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@ngx-translate/core@^14.0.0":
|
|
||||||
version "14.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@ngx-translate/core/-/core-14.0.0.tgz#af421d0e1a28376843f0fed375cd2fae7630a5ff"
|
|
||||||
integrity sha512-UevdwNCXMRCdJv//0kC8h2eSfmi02r29xeE8E9gJ1Al4D4jEJ7eiLPdjslTMc21oJNGguqqWeEVjf64SFtvw2w==
|
|
||||||
dependencies:
|
|
||||||
tslib "^2.3.0"
|
|
||||||
|
|
||||||
abort-controller@^3.0.0:
|
abort-controller@^3.0.0:
|
||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392"
|
resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392"
|
||||||
@@ -163,11 +156,6 @@ tslib@^1.10.0:
|
|||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
|
||||||
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
|
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
|
||||||
|
|
||||||
tslib@^2.3.0:
|
|
||||||
version "2.3.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01"
|
|
||||||
integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==
|
|
||||||
|
|
||||||
uuid@^9.0.0:
|
uuid@^9.0.0:
|
||||||
version "9.0.0"
|
version "9.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5"
|
resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5"
|
||||||
|
@@ -6,7 +6,7 @@ import { SessionOptions } from '../api'
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'command-line-editor',
|
selector: 'command-line-editor',
|
||||||
template: require('./commandLineEditor.component.pug'),
|
templateUrl:'./commandLineEditor.component.pug',
|
||||||
})
|
})
|
||||||
export class CommandLineEditorComponent {
|
export class CommandLineEditorComponent {
|
||||||
@Input() argvMode = false
|
@Input() argvMode = false
|
||||||
|
@@ -5,8 +5,8 @@ import { Subject } from 'rxjs'
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'environment-editor',
|
selector: 'environment-editor',
|
||||||
template: require('./environmentEditor.component.pug'),
|
templateUrl:'./environmentEditor.component.pug',
|
||||||
styles: [require('./environmentEditor.component.scss')],
|
styleUrls: ['./environmentEditor.component.scss'],
|
||||||
})
|
})
|
||||||
export class EnvironmentEditorComponent {
|
export class EnvironmentEditorComponent {
|
||||||
@Output() modelChange = new Subject<any>()
|
@Output() modelChange = new Subject<any>()
|
||||||
|
@@ -8,7 +8,7 @@ import { ProfileSettingsComponent } from 'tabby-core'
|
|||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./localProfileSettings.component.pug'),
|
templateUrl:'./localProfileSettings.component.pug',
|
||||||
})
|
})
|
||||||
export class LocalProfileSettingsComponent implements ProfileSettingsComponent<LocalProfile> {
|
export class LocalProfileSettingsComponent implements ProfileSettingsComponent<LocalProfile> {
|
||||||
profile: LocalProfile
|
profile: LocalProfile
|
||||||
|
@@ -3,7 +3,7 @@ import { WIN_BUILD_CONPTY_SUPPORTED, WIN_BUILD_CONPTY_STABLE, isWindowsBuild, Co
|
|||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./shellSettingsTab.component.pug'),
|
templateUrl:'./shellSettingsTab.component.pug',
|
||||||
})
|
})
|
||||||
export class ShellSettingsTabComponent {
|
export class ShellSettingsTabComponent {
|
||||||
isConPTYAvailable: boolean
|
isConPTYAvailable: boolean
|
||||||
|
@@ -15,8 +15,8 @@ _('Search plugins')
|
|||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./pluginsSettingsTab.component.pug'),
|
templateUrl:'./pluginsSettingsTab.component.pug',
|
||||||
styles: [require('./pluginsSettingsTab.component.scss')],
|
styleUrls: ['./pluginsSettingsTab.component.scss'],
|
||||||
})
|
})
|
||||||
export class PluginsSettingsTabComponent {
|
export class PluginsSettingsTabComponent {
|
||||||
BusyState = BusyState
|
BusyState = BusyState
|
||||||
|
@@ -7,7 +7,7 @@ import { SerialService } from '../services/serial.service'
|
|||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./serialProfileSettings.component.pug'),
|
templateUrl:'./serialProfileSettings.component.pug',
|
||||||
})
|
})
|
||||||
export class SerialProfileSettingsComponent implements ProfileSettingsComponent<SerialProfile> {
|
export class SerialProfileSettingsComponent implements ProfileSettingsComponent<SerialProfile> {
|
||||||
profile: SerialProfile
|
profile: SerialProfile
|
||||||
|
@@ -11,7 +11,7 @@ import { SerialSession, BAUD_RATES, SerialProfile } from '../api'
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'serial-tab',
|
selector: 'serial-tab',
|
||||||
template: `${BaseTerminalTabComponent.template} ${require('./serialTab.component.pug')}`,
|
template: `${BaseTerminalTabComponent.template} ${require('./serialTab.component.pug')}`,
|
||||||
styles: [require('./serialTab.component.scss'), ...BaseTerminalTabComponent.styles],
|
styleUrls: ['./serialTab.component.scss', ...BaseTerminalTabComponent.styles],
|
||||||
animations: BaseTerminalTabComponent.animations,
|
animations: BaseTerminalTabComponent.animations,
|
||||||
})
|
})
|
||||||
export class SerialTabComponent extends BaseTerminalTabComponent<SerialProfile> {
|
export class SerialTabComponent extends BaseTerminalTabComponent<SerialProfile> {
|
||||||
|
@@ -8,7 +8,7 @@ import { Config, ConfigSyncService } from '../services/configSync.service'
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'config-sync-settings-tab',
|
selector: 'config-sync-settings-tab',
|
||||||
template: require('./configSyncSettingsTab.component.pug'),
|
templateUrl:'./configSyncSettingsTab.component.pug',
|
||||||
})
|
})
|
||||||
export class ConfigSyncSettingsTabComponent extends BaseComponent {
|
export class ConfigSyncSettingsTabComponent extends BaseComponent {
|
||||||
connectionSuccessful: boolean|null = null
|
connectionSuccessful: boolean|null = null
|
||||||
|
@@ -13,7 +13,7 @@ const iconsClassList = Object.keys(iconsData).map(
|
|||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./editProfileModal.component.pug'),
|
templateUrl:'./editProfileModal.component.pug',
|
||||||
})
|
})
|
||||||
export class EditProfileModalComponent<P extends Profile> {
|
export class EditProfileModalComponent<P extends Profile> {
|
||||||
@Input() profile: P & ConfigProxy
|
@Input() profile: P & ConfigProxy
|
||||||
|
@@ -8,8 +8,8 @@ const INPUT_TIMEOUT = 1000
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'hotkey-input-modal',
|
selector: 'hotkey-input-modal',
|
||||||
template: require('./hotkeyInputModal.component.pug'),
|
templateUrl:'./hotkeyInputModal.component.pug',
|
||||||
styles: [require('./hotkeyInputModal.component.scss')],
|
styleUrls: ['./hotkeyInputModal.component.scss'],
|
||||||
animations: [
|
animations: [
|
||||||
trigger('animateKey', [
|
trigger('animateKey', [
|
||||||
transition(':enter', [
|
transition(':enter', [
|
||||||
|
@@ -14,7 +14,7 @@ _('Search hotkeys')
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'hotkey-settings-tab',
|
selector: 'hotkey-settings-tab',
|
||||||
template: require('./hotkeySettingsTab.component.pug'),
|
templateUrl:'./hotkeySettingsTab.component.pug',
|
||||||
})
|
})
|
||||||
export class HotkeySettingsTabComponent {
|
export class HotkeySettingsTabComponent {
|
||||||
hotkeyFilter = ''
|
hotkeyFilter = ''
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
.item(*ngFor='let hotkey of hotkeys')
|
.item(*ngFor='let hotkey of hotkeys')
|
||||||
.body((click)='editItem(hotkey)')
|
.body((click)='editItem(hotkey)')
|
||||||
.stroke(*ngFor='let stroke of hotkey.strokes')
|
.stroke(*ngFor='let stroke of castAny(hotkey.strokes)')
|
||||||
span(*ngIf='!hotkey.isDuplicate') {{stroke}}
|
span(*ngIf='!hotkey.isDuplicate') {{stroke}}
|
||||||
span.duplicate(*ngIf='hotkey.isDuplicate') {{stroke}}
|
span.duplicate(*ngIf='hotkey.isDuplicate') {{stroke}}
|
||||||
.remove((click)='removeItem(hotkey)') ×
|
.remove((click)='removeItem(hotkey)') ×
|
||||||
|
@@ -7,8 +7,8 @@ import deepEqual from 'deep-equal'
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'multi-hotkey-input',
|
selector: 'multi-hotkey-input',
|
||||||
template: require('./multiHotkeyInput.component.pug'),
|
templateUrl:'./multiHotkeyInput.component.pug',
|
||||||
styles: [require('./multiHotkeyInput.component.scss')],
|
styleUrls: ['./multiHotkeyInput.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
})
|
})
|
||||||
export class MultiHotkeyInputComponent {
|
export class MultiHotkeyInputComponent {
|
||||||
@@ -45,4 +45,7 @@ export class MultiHotkeyInputComponent {
|
|||||||
private storeUpdatedHotkeys () {
|
private storeUpdatedHotkeys () {
|
||||||
this.hotkeysChange.emit(this.hotkeys)
|
this.hotkeysChange.emit(this.hotkeys)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||||
|
protected castAny = (x: any): any => x
|
||||||
}
|
}
|
||||||
|
@@ -19,8 +19,8 @@ _('Ungrouped')
|
|||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./profilesSettingsTab.component.pug'),
|
templateUrl:'./profilesSettingsTab.component.pug',
|
||||||
styles: [require('./profilesSettingsTab.component.scss')],
|
styleUrls: ['./profilesSettingsTab.component.scss'],
|
||||||
})
|
})
|
||||||
export class ProfilesSettingsTabComponent extends BaseComponent {
|
export class ProfilesSettingsTabComponent extends BaseComponent {
|
||||||
profiles: PartialProfile<Profile>[] = []
|
profiles: PartialProfile<Profile>[] = []
|
||||||
|
@@ -15,8 +15,8 @@ export interface Release {
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'release-notes-tab',
|
selector: 'release-notes-tab',
|
||||||
template: require('./releaseNotesTab.component.pug'),
|
templateUrl:'./releaseNotesTab.component.pug',
|
||||||
styles: [require('./releaseNotesTab.component.scss')],
|
styleUrls: ['./releaseNotesTab.component.scss'],
|
||||||
})
|
})
|
||||||
export class ReleaseNotesComponent extends BaseTabComponent {
|
export class ReleaseNotesComponent extends BaseTabComponent {
|
||||||
releases: Release[] = []
|
releases: Release[] = []
|
||||||
|
@@ -3,10 +3,11 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
|
|||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./setVaultPassphraseModal.component.pug'),
|
templateUrl:'./setVaultPassphraseModal.component.pug',
|
||||||
})
|
})
|
||||||
export class SetVaultPassphraseModalComponent {
|
export class SetVaultPassphraseModalComponent {
|
||||||
passphrase: string
|
passphrase: string
|
||||||
|
showPassphrase = false
|
||||||
@ViewChild('input') input: ElementRef
|
@ViewChild('input') input: ElementRef
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
|
@@ -23,9 +23,9 @@ import { ReleaseNotesComponent } from './releaseNotesTab.component'
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'settings-tab',
|
selector: 'settings-tab',
|
||||||
template: require('./settingsTab.component.pug'),
|
templateUrl:'./settingsTab.component.pug',
|
||||||
styles: [
|
styleUrls: [
|
||||||
require('./settingsTab.component.scss'),
|
'./settingsTab.component.scss',
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class SettingsTabComponent extends BaseTabComponent {
|
export class SettingsTabComponent extends BaseTabComponent {
|
||||||
@@ -48,7 +48,7 @@ export class SettingsTabComponent extends BaseTabComponent {
|
|||||||
public platform: PlatformService,
|
public platform: PlatformService,
|
||||||
public zone: NgZone,
|
public zone: NgZone,
|
||||||
public locale: LocaleService,
|
public locale: LocaleService,
|
||||||
private updater: UpdaterService,
|
public updater: UpdaterService,
|
||||||
private app: AppService,
|
private app: AppService,
|
||||||
@Inject(SettingsTabProvider) public settingsProviders: SettingsTabProvider[],
|
@Inject(SettingsTabProvider) public settingsProviders: SettingsTabProvider[],
|
||||||
translate: TranslateService,
|
translate: TranslateService,
|
||||||
|
@@ -35,21 +35,21 @@ div(*ngIf='vault.isEnabled()')
|
|||||||
button(
|
button(
|
||||||
ngbDropdownItem,
|
ngbDropdownItem,
|
||||||
*ngIf='secret.type === VAULT_SECRET_TYPE_FILE',
|
*ngIf='secret.type === VAULT_SECRET_TYPE_FILE',
|
||||||
(click)='renameFile(secret)'
|
(click)='renameFile(castAny(secret))'
|
||||||
)
|
)
|
||||||
i.fas.fa-fw.fa-pencil-alt
|
i.fas.fa-fw.fa-pencil-alt
|
||||||
span(translate) Rename
|
span(translate) Rename
|
||||||
button(
|
button(
|
||||||
ngbDropdownItem,
|
ngbDropdownItem,
|
||||||
*ngIf='secret.type === VAULT_SECRET_TYPE_FILE',
|
*ngIf='secret.type === VAULT_SECRET_TYPE_FILE',
|
||||||
(click)='replaceFileContent(secret)'
|
(click)='replaceFileContent(castAny(secret))'
|
||||||
)
|
)
|
||||||
i.fas.fa-fw.fa-file-import
|
i.fas.fa-fw.fa-file-import
|
||||||
span(translate) Replace
|
span(translate) Replace
|
||||||
button(
|
button(
|
||||||
ngbDropdownItem,
|
ngbDropdownItem,
|
||||||
*ngIf='secret.type === VAULT_SECRET_TYPE_FILE',
|
*ngIf='secret.type === VAULT_SECRET_TYPE_FILE',
|
||||||
(click)='exportFile(secret)'
|
(click)='exportFile(castAny(secret))'
|
||||||
)
|
)
|
||||||
i.fas.fa-fw.fa-file-export
|
i.fas.fa-fw.fa-file-export
|
||||||
span(translate) Export
|
span(translate) Export
|
||||||
|
@@ -8,7 +8,7 @@ import { SetVaultPassphraseModalComponent } from './setVaultPassphraseModal.comp
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'vault-settings-tab',
|
selector: 'vault-settings-tab',
|
||||||
template: require('./vaultSettingsTab.component.pug'),
|
templateUrl:'./vaultSettingsTab.component.pug',
|
||||||
})
|
})
|
||||||
export class VaultSettingsTabComponent extends BaseComponent {
|
export class VaultSettingsTabComponent extends BaseComponent {
|
||||||
vaultContents: Vault|null = null
|
vaultContents: Vault|null = null
|
||||||
@@ -148,4 +148,6 @@ export class VaultSettingsTabComponent extends BaseComponent {
|
|||||||
download.close()
|
download.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
castAny = (x: any) => x
|
||||||
}
|
}
|
||||||
|
@@ -18,7 +18,7 @@ import {
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'window-settings-tab',
|
selector: 'window-settings-tab',
|
||||||
template: require('./windowSettingsTab.component.pug'),
|
templateUrl:'./windowSettingsTab.component.pug',
|
||||||
})
|
})
|
||||||
export class WindowSettingsTabComponent extends BaseComponent {
|
export class WindowSettingsTabComponent extends BaseComponent {
|
||||||
screens: Screen[]
|
screens: Screen[]
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { NgModule } from '@angular/core'
|
import { NgModule } from '@angular/core'
|
||||||
// import { BrowserModule } from '@angular/platform-browser'
|
import { CommonModule } from '@angular/common'
|
||||||
import { FormsModule } from '@angular/forms'
|
import { FormsModule } from '@angular/forms'
|
||||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap'
|
import { NgbModule } from '@ng-bootstrap/ng-bootstrap'
|
||||||
import { InfiniteScrollModule } from 'ngx-infinite-scroll'
|
import { InfiniteScrollModule } from 'ngx-infinite-scroll'
|
||||||
@@ -30,7 +30,7 @@ import { HotkeySettingsTabProvider, WindowSettingsTabProvider, VaultSettingsTabP
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
// BrowserModule,
|
CommonModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
NgbModule,
|
NgbModule,
|
||||||
TabbyCorePlugin,
|
TabbyCorePlugin,
|
||||||
|
@@ -5,7 +5,7 @@ import { KnownHost, KnownHostSelector, SSHKnownHostsService } from '../services/
|
|||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./hostKeyPromptModal.component.pug'),
|
templateUrl:'./hostKeyPromptModal.component.pug',
|
||||||
})
|
})
|
||||||
export class HostKeyPromptModalComponent {
|
export class HostKeyPromptModalComponent {
|
||||||
@Input() selector: KnownHostSelector
|
@Input() selector: KnownHostSelector
|
||||||
|
@@ -4,8 +4,8 @@ import { KeyboardInteractivePrompt } from '../session/ssh'
|
|||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'keyboard-interactive-auth-panel',
|
selector: 'keyboard-interactive-auth-panel',
|
||||||
template: require('./keyboardInteractiveAuthPanel.component.pug'),
|
templateUrl:'./keyboardInteractiveAuthPanel.component.pug',
|
||||||
styles: [require('./keyboardInteractiveAuthPanel.component.scss')],
|
styleUrls: ['./keyboardInteractiveAuthPanel.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
})
|
})
|
||||||
export class KeyboardInteractiveAuthComponent {
|
export class KeyboardInteractiveAuthComponent {
|
||||||
|
@@ -4,7 +4,7 @@ import { BaseComponent } from 'tabby-core'
|
|||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./sftpCreateDirectoryModal.component.pug'),
|
templateUrl:'./sftpCreateDirectoryModal.component.pug',
|
||||||
})
|
})
|
||||||
export class SFTPCreateDirectoryModalComponent extends BaseComponent {
|
export class SFTPCreateDirectoryModalComponent extends BaseComponent {
|
||||||
directoryName: string
|
directoryName: string
|
||||||
|
@@ -5,7 +5,7 @@ import { SFTPFile, SFTPSession } from '../session/sftp'
|
|||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./sftpDeleteModal.component.pug'),
|
templateUrl:'./sftpDeleteModal.component.pug',
|
||||||
})
|
})
|
||||||
export class SFTPDeleteModalComponent extends BaseComponent {
|
export class SFTPDeleteModalComponent extends BaseComponent {
|
||||||
sftp: SFTPSession
|
sftp: SFTPSession
|
||||||
|
@@ -15,8 +15,8 @@ interface PathSegment {
|
|||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'sftp-panel',
|
selector: 'sftp-panel',
|
||||||
template: require('./sftpPanel.component.pug'),
|
templateUrl:'./sftpPanel.component.pug',
|
||||||
styles: [require('./sftpPanel.component.scss')],
|
styleUrls: ['./sftpPanel.component.scss'],
|
||||||
})
|
})
|
||||||
export class SFTPPanelComponent {
|
export class SFTPPanelComponent {
|
||||||
@Input() session: SSHSession
|
@Input() session: SSHSession
|
||||||
|
@@ -5,7 +5,7 @@ import { ForwardedPortConfig, PortForwardType } from '../api'
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ssh-port-forwarding-config',
|
selector: 'ssh-port-forwarding-config',
|
||||||
template: require('./sshPortForwardingConfig.component.pug'),
|
templateUrl:'./sshPortForwardingConfig.component.pug',
|
||||||
})
|
})
|
||||||
export class SSHPortForwardingConfigComponent {
|
export class SSHPortForwardingConfigComponent {
|
||||||
@Input() model: ForwardedPortConfig[]
|
@Input() model: ForwardedPortConfig[]
|
||||||
|
@@ -6,7 +6,7 @@ import { ForwardedPortConfig } from '../api'
|
|||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./sshPortForwardingModal.component.pug'),
|
templateUrl:'./sshPortForwardingModal.component.pug',
|
||||||
})
|
})
|
||||||
export class SSHPortForwardingModalComponent {
|
export class SSHPortForwardingModalComponent {
|
||||||
@Input() session: SSHSession
|
@Input() session: SSHSession
|
||||||
|
@@ -11,7 +11,7 @@ import { supportedAlgorithms } from '../algorithms'
|
|||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./sshProfileSettings.component.pug'),
|
templateUrl:'./sshProfileSettings.component.pug',
|
||||||
})
|
})
|
||||||
export class SSHProfileSettingsComponent {
|
export class SSHProfileSettingsComponent {
|
||||||
Platform = Platform
|
Platform = Platform
|
||||||
|
@@ -4,7 +4,7 @@ import { ConfigService, HostAppService, Platform } from 'tabby-core'
|
|||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./sshSettingsTab.component.pug'),
|
templateUrl:'./sshSettingsTab.component.pug',
|
||||||
})
|
})
|
||||||
export class SSHSettingsTabComponent {
|
export class SSHSettingsTabComponent {
|
||||||
Platform = Platform
|
Platform = Platform
|
||||||
|
@@ -16,7 +16,8 @@ import { SSHMultiplexerService } from '../services/sshMultiplexer.service'
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'ssh-tab',
|
selector: 'ssh-tab',
|
||||||
template: `${BaseTerminalTabComponent.template} ${require('./sshTab.component.pug')}`,
|
template: `${BaseTerminalTabComponent.template} ${require('./sshTab.component.pug')}`,
|
||||||
styles: [require('./sshTab.component.scss'), ...BaseTerminalTabComponent.styles],
|
styles: BaseTerminalTabComponent.styles,
|
||||||
|
styleUrls: ['./sshTab.component.scss'],
|
||||||
animations: BaseTerminalTabComponent.animations,
|
animations: BaseTerminalTabComponent.animations,
|
||||||
})
|
})
|
||||||
export class SSHTabComponent extends BaseTerminalTabComponent<SSHProfile> {
|
export class SSHTabComponent extends BaseTerminalTabComponent<SSHProfile> {
|
||||||
|
@@ -6,7 +6,7 @@ import { TelnetProfile } from '../session'
|
|||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./telnetProfileSettings.component.pug'),
|
templateUrl:'./telnetProfileSettings.component.pug',
|
||||||
})
|
})
|
||||||
export class TelnetProfileSettingsComponent implements ProfileSettingsComponent<TelnetProfile> {
|
export class TelnetProfileSettingsComponent implements ProfileSettingsComponent<TelnetProfile> {
|
||||||
profile: TelnetProfile
|
profile: TelnetProfile
|
||||||
|
@@ -11,7 +11,7 @@ import { TelnetProfile, TelnetSession } from '../session'
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'telnet-tab',
|
selector: 'telnet-tab',
|
||||||
template: `${BaseTerminalTabComponent.template} ${require('./telnetTab.component.pug')}`,
|
template: `${BaseTerminalTabComponent.template} ${require('./telnetTab.component.pug')}`,
|
||||||
styles: [require('./telnetTab.component.scss'), ...BaseTerminalTabComponent.styles],
|
styleUrls: ['./telnetTab.component.scss', ...BaseTerminalTabComponent.styles],
|
||||||
animations: BaseTerminalTabComponent.animations,
|
animations: BaseTerminalTabComponent.animations,
|
||||||
})
|
})
|
||||||
export class TelnetTabComponent extends BaseTerminalTabComponent<TelnetProfile> {
|
export class TelnetTabComponent extends BaseTerminalTabComponent<TelnetProfile> {
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import { Observable, Subject, first, auditTime } from 'rxjs'
|
import { Observable, Subject, first, auditTime } from 'rxjs'
|
||||||
import { Spinner } from 'cli-spinner'
|
import { Spinner } from 'cli-spinner'
|
||||||
import colors from 'ansi-colors'
|
import colors from 'ansi-colors'
|
||||||
import { NgZone, OnInit, OnDestroy, Injector, ViewChild, HostBinding, Input, ElementRef, InjectFlags } from '@angular/core'
|
import { NgZone, OnInit, OnDestroy, Injector, ViewChild, HostBinding, Input, ElementRef, InjectFlags, Component } from '@angular/core'
|
||||||
import { trigger, transition, style, animate, AnimationTriggerMetadata } from '@angular/animations'
|
import { trigger, transition, style, animate, AnimationTriggerMetadata } from '@angular/animations'
|
||||||
import { AppService, ConfigService, BaseTabComponent, HostAppService, HotkeysService, NotificationsService, Platform, LogService, Logger, TabContextMenuItemProvider, SplitTabComponent, SubscriptionContainer, MenuItemOptions, PlatformService, HostWindowService, ResettableTimeout, TranslateService } from 'tabby-core'
|
import { AppService, ConfigService, BaseTabComponent, HostAppService, HotkeysService, NotificationsService, Platform, LogService, Logger, TabContextMenuItemProvider, SplitTabComponent, SubscriptionContainer, MenuItemOptions, PlatformService, HostWindowService, ResettableTimeout, TranslateService } from 'tabby-core'
|
||||||
|
|
||||||
@@ -17,6 +17,7 @@ import { MultifocusService } from '../services/multifocus.service'
|
|||||||
/**
|
/**
|
||||||
* A class to base your custom terminal tabs on
|
* A class to base your custom terminal tabs on
|
||||||
*/
|
*/
|
||||||
|
@Component({ template: '' })
|
||||||
export class BaseTerminalTabComponent<P extends BaseTerminalProfile> extends BaseTabComponent implements OnInit, OnDestroy {
|
export class BaseTerminalTabComponent<P extends BaseTerminalProfile> extends BaseTabComponent implements OnInit, OnDestroy {
|
||||||
static template: string = require<string>('../components/baseTerminalTab.component.pug')
|
static template: string = require<string>('../components/baseTerminalTab.component.pug')
|
||||||
static styles: string[] = [require<string>('../components/baseTerminalTab.component.scss')]
|
static styles: string[] = [require<string>('../components/baseTerminalTab.component.scss')]
|
||||||
|
@@ -7,8 +7,8 @@ import { ConfigService, getCSSFontFamily, PlatformService } from 'tabby-core'
|
|||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./appearanceSettingsTab.component.pug'),
|
templateUrl:'./appearanceSettingsTab.component.pug',
|
||||||
styles: [require('./appearanceSettingsTab.component.scss')],
|
styleUrls: ['./appearanceSettingsTab.component.scss'],
|
||||||
})
|
})
|
||||||
export class AppearanceSettingsTabComponent {
|
export class AppearanceSettingsTabComponent {
|
||||||
fonts: string[] = []
|
fonts: string[] = []
|
||||||
|
@@ -3,8 +3,8 @@ import { Component, Input, Output, EventEmitter } from '@angular/core'
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'color-picker',
|
selector: 'color-picker',
|
||||||
template: require('./colorPicker.component.pug'),
|
templateUrl:'./colorPicker.component.pug',
|
||||||
styles: [require('./colorPicker.component.scss')],
|
styleUrls: ['./colorPicker.component.scss'],
|
||||||
})
|
})
|
||||||
export class ColorPickerComponent {
|
export class ColorPickerComponent {
|
||||||
@Input() model: string
|
@Input() model: string
|
||||||
|
@@ -5,8 +5,8 @@ import { TerminalColorScheme } from '../api/interfaces'
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'color-scheme-preview',
|
selector: 'color-scheme-preview',
|
||||||
template: require('./colorSchemePreview.component.pug'),
|
templateUrl:'./colorSchemePreview.component.pug',
|
||||||
styles: [require('./colorSchemePreview.component.scss')],
|
styleUrls: ['./colorSchemePreview.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
})
|
})
|
||||||
export class ColorSchemePreviewComponent extends BaseComponent {
|
export class ColorSchemePreviewComponent extends BaseComponent {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
.head
|
.head
|
||||||
.bg-dark.p-3.mb-4(*ngIf='model')
|
.bg-dark.p-3.mb-4(*ngIf='model != null')
|
||||||
.d-flex.align-items-center
|
.d-flex.align-items-center
|
||||||
span {{model.name}}
|
span {{model.name}}
|
||||||
.me-auto
|
.me-auto
|
||||||
@@ -18,8 +18,7 @@
|
|||||||
ng-container(*ngFor='let scheme of allColorSchemes')
|
ng-container(*ngFor='let scheme of allColorSchemes')
|
||||||
.list-group-item.list-group-item-action(
|
.list-group-item.list-group-item-action(
|
||||||
[hidden]='filter && !scheme.name.toLowerCase().includes(filter.toLowerCase())',
|
[hidden]='filter && !scheme.name.toLowerCase().includes(filter.toLowerCase())',
|
||||||
(click)='selectScheme(scheme)',
|
(click)='selectScheme(scheme)'
|
||||||
[class.active]='(currentCustomScheme || currentStockScheme) === scheme'
|
|
||||||
)
|
)
|
||||||
.d-flex.w-100.align-items-center
|
.d-flex.w-100.align-items-center
|
||||||
i.fas.fa-fw([class.fa-check]='model?.name === scheme.name')
|
i.fas.fa-fw([class.fa-check]='model?.name === scheme.name')
|
||||||
|
@@ -11,7 +11,7 @@ _('Search color schemes')
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'color-scheme-selector',
|
selector: 'color-scheme-selector',
|
||||||
template: require('./colorSchemeSelector.component.pug'),
|
templateUrl:'./colorSchemeSelector.component.pug',
|
||||||
styles: [`
|
styles: [`
|
||||||
:host {
|
:host {
|
||||||
display: block;
|
display: block;
|
||||||
@@ -45,7 +45,7 @@ export class ColorSchemeSelectorComponent {
|
|||||||
this.changeDetector.markForCheck()
|
this.changeDetector.markForCheck()
|
||||||
}
|
}
|
||||||
|
|
||||||
selectScheme (scheme: TerminalColorScheme) {
|
selectScheme (scheme: TerminalColorScheme|null) {
|
||||||
this.model = scheme
|
this.model = scheme
|
||||||
this.modelChange.emit(scheme)
|
this.modelChange.emit(scheme)
|
||||||
this.changeDetector.markForCheck()
|
this.changeDetector.markForCheck()
|
||||||
|
@@ -11,8 +11,8 @@ _('Search color schemes')
|
|||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./colorSchemeSettingsTab.component.pug'),
|
templateUrl:'./colorSchemeSettingsTab.component.pug',
|
||||||
styles: [require('./colorSchemeSettingsTab.component.scss')],
|
styleUrls: ['./colorSchemeSettingsTab.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
})
|
})
|
||||||
export class ColorSchemeSettingsTabComponent {
|
export class ColorSchemeSettingsTabComponent {
|
||||||
|
@@ -7,7 +7,7 @@ import { LoginScript, LoginScriptsOptions } from '../middleware/loginScriptProce
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'login-scripts-settings',
|
selector: 'login-scripts-settings',
|
||||||
template: require('./loginScriptsSettings.component.pug'),
|
templateUrl:'./loginScriptsSettings.component.pug',
|
||||||
})
|
})
|
||||||
export class LoginScriptsSettingsComponent {
|
export class LoginScriptsSettingsComponent {
|
||||||
@Input() options: LoginScriptsOptions
|
@Input() options: LoginScriptsOptions
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
[placeholder]='"Search"|translate'
|
[placeholder]='"Search"|translate'
|
||||||
)
|
)
|
||||||
.input-group-append(*ngIf='state.resultCount > 0')
|
.input-group-append(*ngIf='state.resultCount > 0')
|
||||||
.input-group-text.result-counter {{state.resultIndex + 1}} / {{state.resultCount}}
|
.input-group-text.result-counter {{state.resultIndex ?? 0 + 1}} / {{state.resultCount}}
|
||||||
|
|
||||||
ng-container(*ngIf='state.resultCount > 0')
|
ng-container(*ngIf='state.resultCount > 0')
|
||||||
button.btn.btn-link(
|
button.btn.btn-link(
|
||||||
|
@@ -5,8 +5,8 @@ import { ConfigService, NotificationsService, TranslateService } from 'tabby-cor
|
|||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'search-panel',
|
selector: 'search-panel',
|
||||||
template: require('./searchPanel.component.pug'),
|
templateUrl:'./searchPanel.component.pug',
|
||||||
styles: [require('./searchPanel.component.scss')],
|
styleUrls: ['./searchPanel.component.scss'],
|
||||||
})
|
})
|
||||||
export class SearchPanelComponent {
|
export class SearchPanelComponent {
|
||||||
@Input() query: string
|
@Input() query: string
|
||||||
|
@@ -6,7 +6,7 @@ import { StreamProcessingOptions } from '../middleware/streamProcessing'
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'stream-processing-settings',
|
selector: 'stream-processing-settings',
|
||||||
template: require('./streamProcessingSettings.component.pug'),
|
templateUrl:'./streamProcessingSettings.component.pug',
|
||||||
})
|
})
|
||||||
export class StreamProcessingSettingsComponent {
|
export class StreamProcessingSettingsComponent {
|
||||||
@Input() options: StreamProcessingOptions
|
@Input() options: StreamProcessingOptions
|
||||||
|
@@ -3,7 +3,7 @@ import { ConfigService, HostAppService, Platform, PlatformService, altKeyName, m
|
|||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./terminalSettingsTab.component.pug'),
|
templateUrl:'./terminalSettingsTab.component.pug',
|
||||||
})
|
})
|
||||||
export class TerminalSettingsTabComponent {
|
export class TerminalSettingsTabComponent {
|
||||||
Platform = Platform
|
Platform = Platform
|
||||||
|
@@ -6,8 +6,8 @@ import { BaseTerminalTabComponent } from '../api/baseTerminalTab.component'
|
|||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'terminal-toolbar',
|
selector: 'terminal-toolbar',
|
||||||
template: require('./terminalToolbar.component.pug'),
|
templateUrl:'./terminalToolbar.component.pug',
|
||||||
styles: [require('./terminalToolbar.component.scss')],
|
styleUrls: ['./terminalToolbar.component.scss'],
|
||||||
})
|
})
|
||||||
export class TerminalToolbarComponent {
|
export class TerminalToolbarComponent {
|
||||||
@Input() tab: BaseTerminalTabComponent<any>
|
@Input() tab: BaseTerminalTabComponent<any>
|
||||||
|
@@ -4,7 +4,7 @@ import { BaseComponent, HotkeysService, MessageBoxOptions } from 'tabby-core'
|
|||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Component({
|
@Component({
|
||||||
template: require('./messageBoxModal.component.pug'),
|
templateUrl:'./messageBoxModal.component.pug',
|
||||||
})
|
})
|
||||||
export class MessageBoxModalComponent extends BaseComponent {
|
export class MessageBoxModalComponent extends BaseComponent {
|
||||||
@Input() options: MessageBoxOptions
|
@Input() options: MessageBoxOptions
|
||||||
|
@@ -36,7 +36,7 @@
|
|||||||
"common*": [
|
"common*": [
|
||||||
"../../tabby-terminal/node_modules/xterm/src/common*"
|
"../../tabby-terminal/node_modules/xterm/src/common*"
|
||||||
],
|
],
|
||||||
"tabby-*": ["../../tabby-*/src"]
|
"tabby-*": ["../../tabby-*/src"],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"typeAcquisition": {
|
"typeAcquisition": {
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import * as fs from 'fs'
|
||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
import wp from 'webpack'
|
import wp from 'webpack'
|
||||||
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'
|
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'
|
||||||
@@ -7,7 +8,17 @@ const bundleAnalyzer = new BundleAnalyzerPlugin({
|
|||||||
analyzerPort: 0,
|
analyzerPort: 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
import linkerPlugin from '@angular/compiler-cli/linker/babel'
|
import { createEs2015LinkerPlugin } from '@angular/compiler-cli/linker/babel'
|
||||||
|
const linkerPlugin = createEs2015LinkerPlugin({
|
||||||
|
linkerJitMode: true,
|
||||||
|
fileSystem: {
|
||||||
|
resolve: path.resolve,
|
||||||
|
exists: fs.existsSync,
|
||||||
|
dirname: path.dirname,
|
||||||
|
relative: path.relative,
|
||||||
|
readFile: fs.readFileSync,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
export default options => {
|
export default options => {
|
||||||
const sourceMapOptions = {
|
const sourceMapOptions = {
|
||||||
@@ -73,15 +84,7 @@ export default options => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.ts$/,
|
test: /\.(m?)js$/,
|
||||||
use: [
|
|
||||||
{
|
|
||||||
loader: '@ngtools/webpack',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.mjs$/,
|
|
||||||
loader: 'babel-loader',
|
loader: 'babel-loader',
|
||||||
options: {
|
options: {
|
||||||
plugins: [linkerPlugin],
|
plugins: [linkerPlugin],
|
||||||
@@ -92,7 +95,26 @@ export default options => {
|
|||||||
fullySpecified: false,
|
fullySpecified: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ test: /\.pug$/, use: ['apply-loader', 'pug-loader'] },
|
{
|
||||||
|
test: /\.ts$/,
|
||||||
|
use: [
|
||||||
|
{
|
||||||
|
loader: '@ngtools/webpack',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.pug$/,
|
||||||
|
use: [
|
||||||
|
'apply-loader',
|
||||||
|
{
|
||||||
|
loader: 'pug-loader',
|
||||||
|
options: {
|
||||||
|
pretty: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{ test: /\.scss$/, use: ['@tabby-gang/to-string-loader', 'css-loader', 'sass-loader'], include: /(theme.*|component)\.scss/ },
|
{ test: /\.scss$/, use: ['@tabby-gang/to-string-loader', 'css-loader', 'sass-loader'], include: /(theme.*|component)\.scss/ },
|
||||||
{ test: /\.scss$/, use: ['style-loader', 'css-loader', 'sass-loader'], exclude: /(theme.*|component)\.scss/ },
|
{ test: /\.scss$/, use: ['style-loader', 'css-loader', 'sass-loader'], exclude: /(theme.*|component)\.scss/ },
|
||||||
{ test: /\.css$/, use: ['@tabby-gang/to-string-loader', 'css-loader'], include: /component\.css/ },
|
{ test: /\.css$/, use: ['@tabby-gang/to-string-loader', 'css-loader'], include: /component\.css/ },
|
||||||
@@ -151,7 +173,7 @@ export default options => {
|
|||||||
new AngularWebpackPlugin({
|
new AngularWebpackPlugin({
|
||||||
tsconfig: path.resolve(options.dirname, 'tsconfig.json'),
|
tsconfig: path.resolve(options.dirname, 'tsconfig.json'),
|
||||||
directTemplateLoading: false,
|
directTemplateLoading: false,
|
||||||
jitMode: false,
|
jitMode: true,
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user