Development

This commit is contained in:
Matthew Grotke 2026-05-31 00:22:39 -04:00
parent fcdaf09477
commit f152d82386
11 changed files with 219 additions and 66 deletions

View file

@ -10,7 +10,6 @@ from factory import LEVEL_RANK, e, client_level, passes, build_items, build_snap
PAGES_DIR = os.path.join(APP_DIR, 'pages')
NAVBAR_FILE = os.path.join(APP_DIR, 'navbar.json')
CSS_FILE = os.path.join(DATA_DIR, 'styles.css')
VALIDATION_FILE = os.path.join(DATA_DIR, 'validation.js')
COMMON_JS_FILE = os.path.join(DATA_DIR, 'common.js')
BLOCKLISTS_DIR = os.path.join(CONFIGS_DIR, 'blocklists')
HEALTH_FILE = os.path.join(CONFIGS_DIR, '.health')
@ -1076,11 +1075,7 @@ def build_nav_item(item, active_view, level, in_dropdown=False, inherited_req=No
# Inline JavaScript =================================================
def _inline_js(page_name=None):
try:
with open(VALIDATION_FILE) as f:
val_js = f.read()
except Exception:
val_js = ''
big_validate_js = factory.build_big_validate()
try:
with open(COMMON_JS_FILE) as f:
app_js = f.read()
@ -1094,7 +1089,7 @@ def _inline_js(page_name=None):
page_js = f.read()
except Exception:
pass
return val_js + '\n' + app_js + ('\n' + page_js if page_js else '')
return big_validate_js + '\n' + app_js + ('\n' + page_js if page_js else '')
# Routes ============================================================