Fix: Lua client config screen overwritten by logs, and fix temp broadcast preview URL
This commit is contained in:
@@ -2715,7 +2715,7 @@ app.post('/api/temp-broadcast/build', (req, res) => {
|
||||
res.json({
|
||||
success: true,
|
||||
broadcastId: built.broadcastId,
|
||||
wavUrl: `/uploads/temp-broadcast/${path.basename(built.wavPath)}`,
|
||||
wavUrl: `/media/temp/${path.basename(built.wavPath)}`,
|
||||
durationSec: built.durationSec
|
||||
});
|
||||
} catch (e) {
|
||||
@@ -2746,7 +2746,7 @@ app.post('/api/temp-broadcast/compose', express.json(), async (req, res) => {
|
||||
res.json({
|
||||
success: true,
|
||||
broadcastId: built.broadcastId,
|
||||
wavUrl: `/uploads/temp-broadcast/${path.basename(built.wavPath)}`,
|
||||
wavUrl: `/media/temp/${path.basename(built.wavPath)}`,
|
||||
durationSec: built.durationSec
|
||||
});
|
||||
} catch (e) {
|
||||
|
||||
@@ -223,6 +223,7 @@ function Utils.getAvailableDepartureBeeps()
|
||||
end
|
||||
|
||||
function Utils.promptSlaveIdentity()
|
||||
State.inConfig = true
|
||||
while true do
|
||||
local availBeeps = Utils.getAvailableDepartureBeeps()
|
||||
local availStr = table.concat(availBeeps, ", ")
|
||||
@@ -283,6 +284,7 @@ function Utils.promptSlaveIdentity()
|
||||
term.setBackgroundColor(colors.black)
|
||||
term.setTextColor(colors.white)
|
||||
term.clear()
|
||||
State.inConfig = false
|
||||
return true
|
||||
end
|
||||
term.setCursorPos(1, 12)
|
||||
@@ -297,6 +299,7 @@ function Utils.promptSlaveIdentity()
|
||||
end
|
||||
|
||||
function Utils.promptConfig()
|
||||
State.inConfig = true
|
||||
local manual = Utils.loadStationIdentity()
|
||||
local currentCode = manual.station_code or State.stationCode or ""
|
||||
local currentPlatform = manual.station_platform or State.stationPlatform or "1"
|
||||
@@ -361,6 +364,7 @@ function Utils.promptConfig()
|
||||
term.setBackgroundColor(colors.black)
|
||||
term.setTextColor(colors.white)
|
||||
term.clear()
|
||||
State.inConfig = false
|
||||
break
|
||||
else
|
||||
term.setCursorPos(1, 12)
|
||||
@@ -2092,6 +2096,7 @@ function Display.render()
|
||||
end
|
||||
|
||||
function Display.renderTerminal()
|
||||
if State.inConfig then return end
|
||||
local w, h = term.getSize()
|
||||
|
||||
-- Header
|
||||
|
||||
Reference in New Issue
Block a user