small chage
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
const liveRunsUrl = `${liveServerBase}/api/runs`;
|
||||
const liveEventsUrl = `${liveServerBase}/events`;
|
||||
const liveDataFileUrl = `${liveServerBase}/server/data.txt`;
|
||||
const MOD_USERS = ['wolf_reaper90'];
|
||||
const MOD_USERS = ['wolf_reaper90','dioxyx'];
|
||||
/** Use for POST /api/import/* and any path under the same base as list/runs (not root-relative /api/...). */
|
||||
function liveApiPath(path){
|
||||
const p = String(path || '').startsWith('/') ? path : `/${path}`;
|
||||
@@ -370,6 +370,11 @@
|
||||
nav.appendChild(wrap);
|
||||
}
|
||||
|
||||
function isFedlMod(){
|
||||
if(!fedlServerUsername) return Promise.resolve(false);
|
||||
return Promise.resolve(MOD_USERS.includes(fedlServerUsername.toLowerCase()));
|
||||
}
|
||||
|
||||
function fedlUpdateAuthNav(){
|
||||
const wrap = document.querySelector('.fedl-auth-nav');
|
||||
if (!wrap) {
|
||||
@@ -377,7 +382,7 @@
|
||||
}
|
||||
wrap.textContent = '';
|
||||
if (fedlServerUsername) {
|
||||
const isMod = MOD_USERS.includes(fedlServerUsername.toLowerCase());
|
||||
isFedlMod().then(isMod=>{
|
||||
const label = document.createElement('span');
|
||||
label.className = 'fedl-auth-label muted';
|
||||
label.appendChild(document.createTextNode('Hi, '));
|
||||
@@ -416,6 +421,7 @@
|
||||
window.location.reload();
|
||||
});
|
||||
wrap.appendChild(btn);
|
||||
});
|
||||
} else {
|
||||
const a1 = document.createElement('a');
|
||||
const returnTo = encodeURIComponent(window.location.href);
|
||||
|
||||
Reference in New Issue
Block a user