Merge branch 'ci-web-revive'

This commit is contained in:
MrZ_26
2024-08-07 12:11:32 +08:00
parent f1a08ca325
commit 24d552ba2b
3 changed files with 15 additions and 11 deletions

View File

@@ -40,21 +40,25 @@ do-- Connect
repeat repeat
res,err=SOCK:receive('*l') res,err=SOCK:receive('*l')
assert(res,err) assert(res,err)
if not ctLen and res:find('length') then if not ctLen and res:find('content-length') then
ctLen=tonumber(res:match('%d+')) ctLen=tonumber(res:match('%d+')) or 0
end end
until res=='' until res==''
-- Result -- Result
if code=='101' then
CHN_push(readCHN,'success')
end
-- Content(?)
if ctLen then if ctLen then
if code=='101' then res,err=SOCK:receive(ctLen)
CHN_push(readCHN,'success') if code~='101' then
else
res,err=SOCK:receive(ctLen)
res=JSON.decode(assert(res,err)) res=JSON.decode(assert(res,err))
error((code or "XXX")..":"..(res and res.reason or "Server Error")) error((code or "XXX")..":"..(res and res.reason or "Server Error"))
end end
end end
SOCK:settimeout(0) SOCK:settimeout(0)
end end

View File

@@ -591,10 +591,10 @@ for _,fileName in next,fs.getDirectoryItems('replay') do
end end
table.sort(REPLAY,function(a,b) return a.fileName>b.fileName end) table.sort(REPLAY,function(a,b) return a.fileName>b.fileName end)
AUTHURL="https://studio26f.org/oauth?product=techmino" AUTHURL="https://www.studio26f.org/oauth?product=techmino"
AUTHHOST="cafuuchino1.3322.org:8081" AUTHHOST="www.studio26f.org"
WS.switchHost('cafuuchino1.3322.org','10026','/techmino/ws/v1') WS.switchHost('www.studio26f.org','80','/techmino/ws/v1')
HTTP.setHost("cafuuchino1.3322.org:10026") HTTP.setHost("www.studio26f.org")
HTTP.setThreadCount(1) HTTP.setThreadCount(1)
table.insert(_LOADTIMELIST_,("Load Resources: %.3fs"):format(TIME()-_LOADTIME_)) table.insert(_LOADTIMELIST_,("Load Resources: %.3fs"):format(TIME()-_LOADTIME_))

View File

@@ -212,7 +212,7 @@ end
scene.widgetList={ scene.widgetList={
WIDGET.newButton{name='offline',x=-1200,y=210,w=800,h=100,color='lR',font=45,align='R',edge=30,code=pressKey'1'}, WIDGET.newButton{name='offline',x=-1200,y=210,w=800,h=100,color='lR',font=45,align='R',edge=30,code=pressKey'1'},
WIDGET.newButton{name='qplay', x=-1200,y=330,w=800,h=100,color='lM',font=40,align='R',edge=30,code=pressKey'q'}, WIDGET.newButton{name='qplay', x=-1200,y=330,w=800,h=100,color='lM',font=40,align='R',edge=30,code=pressKey'q'},
WIDGET.newButton{name='online', x=-1200,y=450,w=800,h=100,color='D',font=45,align='R',edge=30,code=pressKey'a'}, WIDGET.newButton{name='online', x=-1200,y=450,w=800,h=100,color='lV',font=45,align='R',edge=30,code=pressKey'a'},
WIDGET.newButton{name='custom', x=-1200,y=570,w=800,h=100,color='lS',font=45,align='R',edge=30,code=pressKey'z'}, WIDGET.newButton{name='custom', x=-1200,y=570,w=800,h=100,color='lS',font=45,align='R',edge=30,code=pressKey'z'},
WIDGET.newButton{name='setting',x=2480,y=210,w=800,h=100, color='lO',font=40,align='L',edge=30,code=pressKey'-'}, WIDGET.newButton{name='setting',x=2480,y=210,w=800,h=100, color='lO',font=40,align='L',edge=30,code=pressKey'-'},