Tools for the Atmosphere tools.slices.network
quickslice atproto html

feat(bugs): show Report Bug button for logged-out users

Always display Report Bug button regardless of login status. When
clicked by a logged-out user, show the login modal instead of the
bug submission form. Also disable 1Password autofill on login input.

+12 -4
+12 -4
bugs.html
··· 1497 1497 return ` 1498 1498 <div class="loading-container"> 1499 1499 <p>No bug reports yet.</p> 1500 - ${state.viewer ? `<button class="btn btn-primary" onclick="openSubmitModal()">Report First Bug</button>` : ""} 1500 + <button class="btn btn-primary" onclick="handleReportBug()">Report First Bug</button> 1501 1501 </div> 1502 1502 `; 1503 1503 } 1504 1504 1505 1505 return ` 1506 - ${state.viewer ? `<div class="filter-bar" style="justify-content: flex-end;"><button class="btn btn-primary" onclick="openSubmitModal()">Report Bug</button></div>` : ""} 1506 + <div class="filter-bar" style="justify-content: flex-end;"><button class="btn btn-primary" onclick="handleReportBug()">Report Bug</button></div> 1507 1507 <div class="namespace-grid"> 1508 1508 ${state.namespaces.map(ns => ` 1509 1509 <div class="card namespace-card" onclick="navigateToNamespace('${esc(ns.namespace)}')"> ··· 1545 1545 <option value="cosmetic" ${state.filters.severity === "cosmetic" ? "selected" : ""}>Cosmetic</option> 1546 1546 </select> 1547 1547 </div> 1548 - ${state.viewer ? `<button class="btn btn-primary" onclick="openSubmitModal()">Report Bug</button>` : ""} 1548 + <button class="btn btn-primary" onclick="handleReportBug()">Report Bug</button> 1549 1549 </div> 1550 1550 `; 1551 1551 ··· 3085 3085 if (menu) menu.innerHTML = ""; 3086 3086 } 3087 3087 3088 + function handleReportBug() { 3089 + if (state.viewer) { 3090 + openSubmitModal(); 3091 + } else { 3092 + login(); 3093 + } 3094 + } 3095 + 3088 3096 function login() { 3089 3097 // Show login modal to get handle 3090 3098 const modal = document.getElementById("modal"); ··· 3099 3107 <form onsubmit="handleLogin(event)"> 3100 3108 <div class="form-group handle-autocomplete"> 3101 3109 <label for="login-handle">Sign in with your <a href="https://internethandle.org/" target="_blank">internet handle</a></label> 3102 - <input type="text" id="login-handle" required placeholder="you.bsky.social" autocomplete="off" 3110 + <input type="text" id="login-handle" required placeholder="you.bsky.social" autocomplete="off" data-1p-ignore 3103 3111 oninput="handleHandleInput(event)" 3104 3112 onkeydown="handleHandleKeydown(event)" 3105 3113 onfocusout="setTimeout(() => clearHandleSuggestions(), 150)">