ui(linux): hide Windows RAW proxy controls
Some checks failed
Desktop Release / Bootstrap updater signing key (push) Has been cancelled
Desktop Release / Windows x64 NSIS (push) Has been cancelled
Desktop Release / Linux x64 DEB + AppImage (push) Has been cancelled
Desktop Release / Publish public desktop release (push) Has been cancelled
Some checks failed
Desktop Release / Bootstrap updater signing key (push) Has been cancelled
Desktop Release / Windows x64 NSIS (push) Has been cancelled
Desktop Release / Linux x64 DEB + AppImage (push) Has been cancelled
Desktop Release / Publish public desktop release (push) Has been cancelled
This commit is contained in:
parent
0085d39c3a
commit
fe60486fa6
14
src/main.ts
14
src/main.ts
@ -149,6 +149,7 @@ let availableManualUpdate: ManualUpdate | null = null
|
||||
let updateBusy = false
|
||||
let captureError: string | null = null
|
||||
let systemPrinters: SystemPrinter[] = []
|
||||
const isLinuxDesktop = navigator.userAgent.toLowerCase().includes('linux')
|
||||
let virtualPrinterStatus: VirtualPrinterStatus = {
|
||||
installed: false,
|
||||
name: 'FieldLens Print',
|
||||
@ -258,17 +259,17 @@ app.innerHTML = `
|
||||
<summary>Capture settings</summary>
|
||||
<div class="advanced-body">
|
||||
<div class="fields">
|
||||
<label>Capture mode
|
||||
<label id="capture-mode-field">Capture mode
|
||||
<select id="mode">
|
||||
<option value="raw-proxy">RAW 9100 proxy</option>
|
||||
<option value="spool-folder">Spool folder</option>
|
||||
<option value="both">Both routes</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>Listen address
|
||||
<label id="listen-address-field">Listen address
|
||||
<input id="listenAddr" placeholder="127.0.0.1:9100" />
|
||||
</label>
|
||||
<label>RAW/TCP destination
|
||||
<label id="raw-destination-field">RAW/TCP destination
|
||||
<input id="forwardAddr" placeholder="10.0.0.50:9100" />
|
||||
</label>
|
||||
<label>Spool capture folder
|
||||
@ -479,6 +480,13 @@ function writeForm(next: AppConfig) {
|
||||
el<HTMLInputElement>('issuer').value = next.issuer
|
||||
el<HTMLInputElement>('clientId').value = next.clientId
|
||||
el<HTMLInputElement>('stationId').value = next.stationId
|
||||
|
||||
if (isLinuxDesktop) {
|
||||
el<HTMLSelectElement>('mode').value = 'spool-folder'
|
||||
el('capture-mode-field').setAttribute('hidden', '')
|
||||
el('listen-address-field').setAttribute('hidden', '')
|
||||
el('raw-destination-field').setAttribute('hidden', '')
|
||||
}
|
||||
}
|
||||
|
||||
function renderPrinters() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user