add button to show/hide minter admin list in ARA board
This commit is contained in:
parent
746e94a8f5
commit
136a6458c8
@ -147,6 +147,19 @@ const toggleProposeButton = () => {
|
|||||||
proposeButton.style.display === 'flex' ? 'none' : 'flex'
|
proposeButton.style.display === 'flex' ? 'none' : 'flex'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const toggleAdminTable = () => {
|
||||||
|
const tableContainer = document.getElementById("adminTableContainer")
|
||||||
|
const toggleBtn = document.getElementById("toggleAdminTableButton")
|
||||||
|
|
||||||
|
if (tableContainer.style.display === "none") {
|
||||||
|
tableContainer.style.display = "block"
|
||||||
|
toggleBtn.textContent = "Hide Minter Admins"
|
||||||
|
} else {
|
||||||
|
tableContainer.style.display = "none"
|
||||||
|
toggleBtn.textContent = "Show Minter Admins"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const fetchAllARTxData = async () => {
|
const fetchAllARTxData = async () => {
|
||||||
const addAdmTx = "ADD_GROUP_ADMIN"
|
const addAdmTx = "ADD_GROUP_ADMIN"
|
||||||
const remAdmTx = "REMOVE_GROUP_ADMIN"
|
const remAdmTx = "REMOVE_GROUP_ADMIN"
|
||||||
@ -279,6 +292,22 @@ const displayExistingMinterAdmins = async () => {
|
|||||||
}
|
}
|
||||||
// 3) Build the table
|
// 3) Build the table
|
||||||
const tableHtml = `
|
const tableHtml = `
|
||||||
|
<div style="text-align: center; margin-bottom: 1em;">
|
||||||
|
<button
|
||||||
|
id="toggleAdminTableButton"
|
||||||
|
onclick="toggleAdminTable()"
|
||||||
|
style="
|
||||||
|
padding: 10px;
|
||||||
|
background: #444;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
Show Minter Admins
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div id="adminTableContainer" style="display: none;">
|
||||||
<table style="width: 100%; border-collapse: collapse;">
|
<table style="width: 100%; border-collapse: collapse;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr style="background:rgb(21, 36, 18); color:rgb(183, 208, 173); font-size: 1.5rem;">
|
<tr style="background:rgb(21, 36, 18); color:rgb(183, 208, 173); font-size: 1.5rem;">
|
||||||
@ -291,6 +320,7 @@ const displayExistingMinterAdmins = async () => {
|
|||||||
${rowsHtml}
|
${rowsHtml}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<div>
|
||||||
`
|
`
|
||||||
adminListContainer.innerHTML = `
|
adminListContainer.innerHTML = `
|
||||||
<h3 style="color:rgb(212, 212, 212);">Existing Minter Admins: ${totalAdmins}</h3>
|
<h3 style="color:rgb(212, 212, 212);">Existing Minter Admins: ${totalAdmins}</h3>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user