changes for build for sxsw

This commit is contained in:
Dorian
2026-03-10 23:29:05 +00:00
parent dbd4cf59d2
commit d69c0d6724
13 changed files with 1173 additions and 555 deletions
+9 -5
View File
@@ -14,7 +14,8 @@
<!-- Content Area -->
<div class="flex flex-col items-center gap-6 mb-6">
<p v-if="errorMessage" class="text-red-400 text-sm">{{ errorMessage }}</p>
<p v-if="serverStarting" class="text-orange-400/80 text-sm">Server is still starting up. You can try again shortly or skip this step.</p>
<p v-else-if="errorMessage" class="text-red-400 text-sm">{{ errorMessage }}</p>
<!-- Sign Button (if not verified yet) -->
<button
v-if="!verified"
@@ -92,6 +93,7 @@ const verified = ref(false)
const isSigning = ref(false)
const signature = ref('')
const errorMessage = ref('')
const serverStarting = ref(false)
/** Generate a cryptographically random challenge (32 bytes, base64) */
function generateChallenge(): string {
@@ -114,11 +116,13 @@ async function signChallenge() {
return
} catch (err) {
const msg = err instanceof Error ? err.message : ''
const isRetryable = /502|503|timeout|fetch|network/i.test(msg)
const isRetryable = /502|503|504|timeout|fetch|network|Failed to fetch/i.test(msg)
if (!isRetryable || attempt === 2) {
errorMessage.value = isRetryable
? 'Server is not reachable. You can retry or skip this step.'
: (msg || 'Failed to sign challenge. You can retry or skip this step.')
if (isRetryable) {
serverStarting.value = true
} else {
errorMessage.value = msg || 'Failed to sign challenge. You can retry or skip this step.'
}
} else {
await new Promise((r) => setTimeout(r, 1000 * (attempt + 1)))
}