basic patch notes viewer, lazy-load settings and store, build frontend as esmodule, add lazy-loaded react-markdown, backend changes to accomodate ESModule frontend

This commit is contained in:
AAGaming
2022-08-26 01:18:28 -04:00
parent effc4ab0f5
commit d4d1c2bbab
14 changed files with 958 additions and 94 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ class PluginManager:
async def inject_javascript(self, request=None):
try:
await inject_to_tab("SP", "try{window.deckyHasLoaded = true;(async()=>{while(!window.SP_REACT){await new Promise(r => setTimeout(r, 10))};" + open(path.join(path.dirname(__file__), "./static/plugin-loader.iife.js"), "r").read() + "})();}catch(e){console.error(e)}", True)
await inject_to_tab("SP", "try{window.deckyHasLoaded = true;(async()=>{while(!window.SP_REACT){await new Promise(r => setTimeout(r, 10))};await import('http://localhost:1337/frontend/index.js')})();}catch(e){console.error(e)}", True)
except:
logger.info("Failed to inject JavaScript into tab")
pass