Merge admin panel into the port-80 webtools site under /admin/
webtools' nginx now reverse-proxies /admin/ to the webadmin container (docker/conf/webtools-nginx.conf), which no longer publishes its own port -- everything is reachable through port 80 alongside the GM toolbox. Added a link to it in webtools/index.html's sidebar. Flask needs to know it's mounted under /admin/ to generate correct url_for()/redirect() targets, so app.py now wraps the app in werkzeug's ProxyFix (x_prefix/x_proto/x_for/x_host) reading the X-Forwarded-Prefix header nginx sets; verified redirects, form actions, and links all come back /admin/-prefixed end to end through port 80. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2b209cf17f
commit
8486504b49
4 files changed
+35
-5
No files matched your search
+6
-3
@@ -56,13 +56,15 @@
|
||||
.brand .sub{font-size:0.7rem; letter-spacing:0.1em; text-transform:uppercase; color:var(--ink-faint); margin-top:2px;}
|
||||
|
||||
.tabs{display:flex; flex-direction:column; gap:3px;}
|
||||
.tab{
|
||||
.tab, .tab-link{
|
||||
display:flex; align-items:center; gap:9px; padding:9px 11px; border-radius:8px;
|
||||
font-size:0.9rem; color:var(--ink-dim); cursor:pointer; border:1px solid transparent;
|
||||
text-decoration:none;
|
||||
}
|
||||
.tab:hover{background:var(--bg-card); color:var(--ink);}
|
||||
.tab:hover, .tab-link:hover{background:var(--bg-card); color:var(--ink);}
|
||||
.tab.active{background:var(--bg-card); border-color:var(--line); color:var(--ink); font-weight:600;}
|
||||
.tab .ico{font-size:1rem; width:1.2em; text-align:center;}
|
||||
.tab .ico, .tab-link .ico{font-size:1rem; width:1.2em; text-align:center;}
|
||||
.tab-link{border-top:1px solid var(--line); margin-top:6px; padding-top:12px;}
|
||||
|
||||
.side-panel{display:none; flex-direction:column; gap:10px;}
|
||||
.side-panel.active{display:flex;}
|
||||
@@ -173,6 +175,7 @@
|
||||
<div class="tab active" data-view="commands"><span class="ico">⌘</span> GM Commands</div>
|
||||
<div class="tab" data-view="items"><span class="ico">◆</span> Item Configurator</div>
|
||||
<div class="tab" data-view="maps"><span class="ico">⌗</span> Maps</div>
|
||||
<a class="tab-link" href="/admin/"><span class="ico">⚙</span> Admin Panel</a>
|
||||
</nav>
|
||||
|
||||
<div class="side-panel active" id="panel-commands">
|
||||
|
||||
Reference in new issue
Block a user