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