update version, incorporate error screen

This commit is contained in:
metacryst
2026-04-10 03:19:22 -05:00
parent a104b43b24
commit 0bb544e96c
2 changed files with 77 additions and 4 deletions

View File

@@ -370,7 +370,7 @@
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0.5;
MARKETING_VERSION = 1.0.6;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = russell.sam.forum;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -392,7 +392,7 @@
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0.5;
MARKETING_VERSION = 1.0.6;
PRODUCT_BUNDLE_IDENTIFIER = russell.sam.forum;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";

View File

@@ -31,10 +31,83 @@
await appendScript(window.util.HOST + '/83947261/index.js', true)
} catch (e) {
document.body.innerHTML = `
<div style="display:flex;flex-direction:column;align-items:center;justify-content:center;left:0; top: 0; position: fixed; height:100vh;font-family:sans-serif;text-align:center;padding:2rem">
<p style="color: var(--text)">Could not reach the server. Are you connected to the internet?</p>
<style>
#ptr-screen {
position: fixed; inset: 0;
display: flex; flex-direction: column;
align-items: center; justify-content: center;
font-family: sans-serif; text-align: center;
padding: 2rem; touch-action: none;
transition: transform 0.2s ease;
color: var(--text);
}
#ptr-icon {
font-size: 2rem; margin-bottom: 1rem;
transition: transform 0.2s ease, opacity 0.2s ease;
opacity: 0.4;
}
#ptr-label {
font-size: 0.9rem; opacity: 0.5;
margin-top: 0.5rem;
}
#ptr-indicator {
color: var(--text);
position: fixed; top: 5vh; left: 0; right: 0;
display: flex; align-items: center; justify-content: center;
padding-top: env(safe-area-inset-top);
height: 0; overflow: hidden;
transition: height 0.1s ease;
font-size: 0.8rem; opacity: 0.6; gap: 0.4rem;
}
@keyframes spin { to { transform: rotate(360deg) } }
.spinning { animation: spin 0.6s linear infinite }
</style>
<div id="ptr-indicator">
<span id="ptr-arrow">↓</span>
<span id="ptr-hint">Pull to retry</span>
</div>
<div id="ptr-screen">
<div id="ptr-icon">⚠️</div>
<p style="margin:0;font-size:1.1rem;font-weight:600">No connection</p>
<p id="ptr-label">Could not reach the server.<br>Pull down to try again.</p>
</div>
`
const THRESHOLD = 90
let startY = 0, dragging = false
document.addEventListener('touchstart', e => {
startY = e.touches[0].clientY
dragging = true
})
document.addEventListener('touchmove', e => {
if (!dragging) return
const dy = Math.max(0, e.touches[0].clientY - startY)
const pull = Math.min(dy, THRESHOLD * 1.5)
const progress = Math.min(pull / THRESHOLD, 1)
document.getElementById('ptr-screen').style.transform = `translateY(${pull * 0.4}px)`
document.getElementById('ptr-indicator').style.height = (pull * 0.6) + 'px'
document.getElementById('ptr-arrow').style.transform = `rotate(${progress * 180}deg)`
document.getElementById('ptr-hint').textContent = progress >= 1 ? 'Release to retry' : 'Pull to retry'
document.getElementById('ptr-icon').style.opacity = 0.4 + progress * 0.6
})
document.addEventListener('touchend', e => {
if (!dragging) return
dragging = false
const dy = e.changedTouches[0].clientY - startY
if (dy >= THRESHOLD) {
document.getElementById('ptr-arrow').textContent = '↻'
document.getElementById('ptr-arrow').classList.add('spinning')
document.getElementById('ptr-hint').textContent = 'Retrying…'
setTimeout(() => location.reload(), 400)
} else {
document.getElementById('ptr-screen').style.transform = ''
document.getElementById('ptr-indicator').style.height = '0'
}
})
}
</script>
<meta name="theme-color" content="#31d53d" />