mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-19 18:07:58 +00:00
bootstrap 5 WIP (#7891)
New standard theme that follows your chosen terminal colors, Bootstrap 5 & Angular 15 upgrade
This commit is contained in:
@@ -4,7 +4,7 @@ ul.nav-tabs(ngbNav, #nav='ngbNav')
|
||||
ng-template(ngbNavContent)
|
||||
.row
|
||||
.col-6(ng:if='hostApp.platform !== Platform.Web')
|
||||
.form-group
|
||||
.mb-3
|
||||
label(translate) Device
|
||||
input.form-control(
|
||||
type='text',
|
||||
@@ -15,7 +15,7 @@ ul.nav-tabs(ngbNav, #nav='ngbNav')
|
||||
)
|
||||
|
||||
.col-6
|
||||
.form-group
|
||||
.mb-3
|
||||
label(translate) Baud rate
|
||||
input.form-control(
|
||||
type='number',
|
||||
|
@@ -7,7 +7,7 @@ import { SerialService } from '../services/serial.service'
|
||||
|
||||
/** @hidden */
|
||||
@Component({
|
||||
template: require('./serialProfileSettings.component.pug'),
|
||||
templateUrl:'./serialProfileSettings.component.pug',
|
||||
})
|
||||
export class SerialProfileSettingsComponent implements ProfileSettingsComponent<SerialProfile> {
|
||||
profile: SerialProfile
|
||||
|
@@ -1,11 +1,11 @@
|
||||
terminal-toolbar([tab]='this')
|
||||
i.fas.fa-xs.fa-circle.text-success.mr-2(*ngIf='session && session.open')
|
||||
i.fas.fa-xs.fa-circle.text-danger.mr-2(*ngIf='!session || !session.open')
|
||||
i.fas.fa-xs.fa-circle.text-success.me-2(*ngIf='session && session.open')
|
||||
i.fas.fa-xs.fa-circle.text-danger.me-2(*ngIf='!session || !session.open')
|
||||
strong {{profile.options.port}} ({{profile.options.baudrate}})
|
||||
|
||||
.mr-auto
|
||||
.me-auto
|
||||
|
||||
button.btn.btn-sm.btn-link.mr-3((click)='changeBaudRate()', *ngIf='session && session.open && hostApp.platform !== Platform.Web')
|
||||
button.btn.btn-sm.btn-link.me-3((click)='changeBaudRate()', *ngIf='session && session.open && hostApp.platform !== Platform.Web')
|
||||
span(translate) Change baud rate
|
||||
|
||||
button.btn.btn-sm.btn-link((click)='reconnect()', *ngIf='!session || !session.open')
|
||||
|
@@ -11,7 +11,7 @@ import { SerialSession, BAUD_RATES, SerialProfile } from '../api'
|
||||
@Component({
|
||||
selector: 'serial-tab',
|
||||
template: `${BaseTerminalTabComponent.template} ${require('./serialTab.component.pug')}`,
|
||||
styles: [require('./serialTab.component.scss'), ...BaseTerminalTabComponent.styles],
|
||||
styleUrls: ['./serialTab.component.scss', ...BaseTerminalTabComponent.styles],
|
||||
animations: BaseTerminalTabComponent.animations,
|
||||
})
|
||||
export class SerialTabComponent extends BaseTerminalTabComponent<SerialProfile> {
|
||||
|
@@ -30,10 +30,6 @@ import { SerialProfilesService } from './profiles'
|
||||
{ provide: TabRecoveryProvider, useClass: RecoveryProvider, multi: true },
|
||||
{ provide: HotkeyProvider, useClass: SerialHotkeyProvider, multi: true },
|
||||
],
|
||||
entryComponents: [
|
||||
SerialProfileSettingsComponent,
|
||||
SerialTabComponent,
|
||||
],
|
||||
declarations: [
|
||||
SerialProfileSettingsComponent,
|
||||
SerialTabComponent,
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { Injectable } from '@angular/core'
|
||||
import { Injectable, Injector } from '@angular/core'
|
||||
import WSABinding from 'serialport-binding-webserialapi'
|
||||
import AbstractBinding from '@serialport/binding-abstract'
|
||||
import { autoDetect } from '@serialport/bindings-cpp'
|
||||
@@ -9,7 +9,7 @@ import { SerialTabComponent } from '../components/serialTab.component'
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class SerialService {
|
||||
private constructor (
|
||||
private profilesService: ProfilesService,
|
||||
private injector: Injector,
|
||||
private hostApp: HostAppService,
|
||||
) { }
|
||||
|
||||
@@ -45,6 +45,6 @@ export class SerialService {
|
||||
},
|
||||
}
|
||||
window.localStorage.lastSerialConnection = JSON.stringify(profile)
|
||||
return this.profilesService.openNewTabForProfile(profile) as Promise<SerialTabComponent|null>
|
||||
return this.injector.get(ProfilesService).openNewTabForProfile(profile) as Promise<SerialTabComponent|null>
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +0,0 @@
|
||||
const config = require('../webpack.plugin.config')
|
||||
module.exports = config({
|
||||
name: 'serial',
|
||||
dirname: __dirname,
|
||||
})
|
10
tabby-serial/webpack.config.mjs
Normal file
10
tabby-serial/webpack.config.mjs
Normal file
@@ -0,0 +1,10 @@
|
||||
import * as path from 'path'
|
||||
import * as url from 'url'
|
||||
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
|
||||
|
||||
import config from '../webpack.plugin.config.mjs'
|
||||
|
||||
export default () => config({
|
||||
name: 'serial',
|
||||
dirname: __dirname,
|
||||
})
|
Reference in New Issue
Block a user