mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-22 20:55:03 +03:00
option to always ask for baud rate
This commit is contained in:
parent
a5a0546e68
commit
26e2c60265
@ -8,9 +8,10 @@ ul.nav-tabs(ngbNav, #nav='ngbNav')
|
||||
label Device
|
||||
input.form-control(
|
||||
type='text',
|
||||
alwaysShowTypeahead,
|
||||
[(ngModel)]='profile.options.port',
|
||||
[ngbTypeahead]='portsAutocomplete',
|
||||
[resultFormatter]='portsFormatter',
|
||||
[resultFormatter]='portsFormatter'
|
||||
)
|
||||
|
||||
.col-6
|
||||
@ -18,8 +19,10 @@ ul.nav-tabs(ngbNav, #nav='ngbNav')
|
||||
label Baud Rate
|
||||
input.form-control(
|
||||
type='number',
|
||||
alwaysShowTypeahead,
|
||||
placeholder='Ask every time',
|
||||
[(ngModel)]='profile.options.baudrate',
|
||||
[ngbTypeahead]='baudratesAutocomplete',
|
||||
[ngbTypeahead]='baudratesAutocomplete'
|
||||
)
|
||||
|
||||
.form-line
|
||||
|
@ -49,7 +49,10 @@ export class SerialProfileSettingsComponent implements ProfileSettingsComponent
|
||||
baudratesAutocomplete = text$ => text$.pipe(
|
||||
debounceTime(200),
|
||||
distinctUntilChanged(),
|
||||
map((q: string) => BAUD_RATES.filter(x => !q || x.toString().startsWith(q)))
|
||||
map((q: string) => [
|
||||
null,
|
||||
...BAUD_RATES.filter(x => !q || x.toString().startsWith(q)),
|
||||
])
|
||||
)
|
||||
|
||||
portsFormatter = port => {
|
||||
|
Loading…
Reference in New Issue
Block a user