mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-18 17:27:50 -05:00
Staff roles for the 17 October panel: address search, full rooms
- searching players by address and lifting an address ban need address.ban (moderators and above), not only the panel itself - entering a full room goes by the staff role Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
f3983fcf67
commit
ceda20ffc8
4 files changed
+20
-2
No files matched your search
+7
-1
@@ -272,7 +272,7 @@
|
||||
<div class="toolbar">
|
||||
<select id="player-search-by" aria-label="Search by">
|
||||
<option value="name">By name</option>
|
||||
<option value="address">By IP address</option>
|
||||
<option value="address" data-needs="address.ban">By IP address</option>
|
||||
</select>
|
||||
<input id="player-search" type="search" placeholder="Search" aria-label="Search players">
|
||||
<span class="hint" id="online-count"></span>
|
||||
@@ -1181,6 +1181,12 @@
|
||||
for (const page of pages) {
|
||||
page.hidden = !allowed.has(page.dataset.needs);
|
||||
}
|
||||
// searching by address: for the roles that ban addresses
|
||||
const byAddress = document.querySelector('#player-search-by option[value="address"]');
|
||||
byAddress.hidden = byAddress.disabled = !allowed.has(byAddress.dataset.needs);
|
||||
if (byAddress.disabled && $("player-search-by").value === "address") {
|
||||
$("player-search-by").value = "name";
|
||||
}
|
||||
const open = pages.find(page => page.dataset.tab === tab && !page.hidden) || pages.find(page => !page.hidden);
|
||||
if (open) {
|
||||
tab = open.dataset.tab;
|
||||
|
||||
Reference in new issue
Block a user