mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 11:38:12 +01:00
Iframe fix (#18842)
* Iframe fix * Reads reload configuration verb * Load store by custom key * Remove bad compile option
This commit is contained in:
@@ -15,9 +15,12 @@ SUBSYSTEM_DEF(tgui)
|
||||
wait = 9
|
||||
flags = SS_NO_INIT
|
||||
priority = FIRE_PRIORITY_TGUI
|
||||
init_stage = INITSTAGE_EARLY
|
||||
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
|
||||
|
||||
dependencies = list(
|
||||
/datum/controller/subsystem/assets
|
||||
)
|
||||
|
||||
/// A list of UIs scheduled to process
|
||||
var/list/current_run = list()
|
||||
/// A list of all open UIs
|
||||
@@ -44,20 +47,20 @@ SUBSYSTEM_DEF(tgui)
|
||||
var/storage_iframe = CONFIG_GET(string/storage_cdn_iframe)
|
||||
|
||||
if(storage_iframe && storage_iframe != /datum/config_entry/string/storage_cdn_iframe::default)
|
||||
basehtml = replacetext(basehtml, "\[tgui:storagecdn\]", storage_iframe)
|
||||
basehtml = replacetextEx(basehtml, "\[tgui:storagecdn]", storage_iframe)
|
||||
return
|
||||
|
||||
if(CONFIG_GET(string/asset_transport) == "webroot")
|
||||
var/datum/asset_transport/webroot/webroot = SSassets.transport
|
||||
|
||||
var/datum/asset_cache_item/item = webroot.register_asset("iframe.html", file("tgui/public/iframe.html"))
|
||||
basehtml = replacetext(basehtml, "\[tgui:storagecdn\]", webroot.get_asset_url("iframe.html", item))
|
||||
basehtml = replacetextEx(basehtml, "\[tgui:storagecdn]", webroot.get_asset_url("iframe.html", item))
|
||||
return
|
||||
|
||||
if(!storage_iframe)
|
||||
return
|
||||
|
||||
basehtml = replacetext(basehtml, "\[tgui:storagecdn\]", storage_iframe)
|
||||
basehtml = replacetextEx(basehtml, "\[tgui:storagecdn]", storage_iframe)
|
||||
|
||||
/datum/controller/subsystem/tgui/Shutdown()
|
||||
close_all_uis()
|
||||
|
||||
Reference in New Issue
Block a user