🪻 distributed transcription service thistle.dunkirk.sh
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: remove settings button on homepage and make it redirct to auth when logged out

+21 -2
+8
src/components/auth.ts
··· 273 273 } 274 274 } 275 275 276 + public isAuthenticated(): boolean { 277 + return this.user !== null; 278 + } 279 + 280 + public openAuthModal() { 281 + this.openModal(); 282 + } 283 + 276 284 private openModal() { 277 285 this.showModal = true; 278 286 this.needsRegistration = false;
+13 -2
src/pages/index.html
··· 99 99 <p class="hero-subtitle">AI-powered audio transcription made simple</p> 100 100 101 101 <div class="cta-buttons"> 102 - <a href="/transcribe" class="btn btn-primary">Start Transcribing</a> 103 - <a href="/settings" class="btn btn-secondary">Settings</a> 102 + <button id="start-btn" class="btn btn-primary">Start Transcribing</button> 104 103 </div> 105 104 </main> 106 105 107 106 <script type="module" src="../components/auth.ts"></script> 107 + <script type="module"> 108 + document.getElementById('start-btn').addEventListener('click', async () => { 109 + const authComponent = document.querySelector('auth-component'); 110 + const isLoggedIn = await authComponent.isAuthenticated(); 111 + 112 + if (isLoggedIn) { 113 + window.location.href = '/transcribe'; 114 + } else { 115 + authComponent.openAuthModal(); 116 + } 117 + }); 118 + </script> 108 119 </body> 109 120 110 121 </html>