File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -359,9 +359,11 @@ <h3>🔨 Ban Manager</h3>
359359 <div style="font-weight:600;color:#1c1917;font-size:14px">${ escHtml ( a . fullname ) } </div>
360360 <div style="font-size:12px;color:#78716c">@${ escHtml ( a . username ) } · pw: ${ escHtml ( a . password ) } </div>
361361 </div>
362- <button onclick="approveApp( ${ i } ) " style="background:#16a34a;color:#fff;border:none;border-radius:6px;padding:5px 10px;cursor:pointer;font-size:12px;font-weight:600">✓ Approve</button>
363- <button onclick="denyApp( ${ i } ) " style="background:#dc2626;color:#fff;border:none;border-radius:6px;padding:5px 10px;cursor:pointer;font-size:12px;font-weight:600">✗ Deny</button>
362+ <button data-approve=" ${ i } " style="background:#16a34a;color:#fff;border:none;border-radius:6px;padding:5px 10px;cursor:pointer;font-size:12px;font-weight:600">✓ Approve</button>
363+ <button data-deny=" ${ i } " style="background:#dc2626;color:#fff;border:none;border-radius:6px;padding:5px 10px;cursor:pointer;font-size:12px;font-weight:600">✗ Deny</button>
364364 </div>` ) . join ( '' ) ;
365+ list . querySelectorAll ( '[data-approve]' ) . forEach ( btn => btn . addEventListener ( 'click' , ( ) => approveApp ( + btn . dataset . approve ) ) ) ;
366+ list . querySelectorAll ( '[data-deny]' ) . forEach ( btn => btn . addEventListener ( 'click' , ( ) => denyApp ( + btn . dataset . deny ) ) ) ;
365367}
366368function approveApp ( i ) {
367369 const apps = loadApps ( ) ;
You can’t perform that action at this time.
0 commit comments