From 0bb544e96c524a743875a6917a0c277071cfc033 Mon Sep 17 00:00:00 2001 From: metacryst Date: Fri, 10 Apr 2026 03:19:22 -0500 Subject: [PATCH] update version, incorporate error screen --- ios/App/App.xcodeproj/project.pbxproj | 4 +- src/index.html | 77 ++++++++++++++++++++++++++- 2 files changed, 77 insertions(+), 4 deletions(-) diff --git a/ios/App/App.xcodeproj/project.pbxproj b/ios/App/App.xcodeproj/project.pbxproj index 236b2ea..8ab43c6 100644 --- a/ios/App/App.xcodeproj/project.pbxproj +++ b/ios/App/App.xcodeproj/project.pbxproj @@ -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 = ""; diff --git a/src/index.html b/src/index.html index be7b3b8..4d71bb6 100644 --- a/src/index.html +++ b/src/index.html @@ -31,10 +31,83 @@ await appendScript(window.util.HOST + '/83947261/index.js', true) } catch (e) { document.body.innerHTML = ` -
-

Could not reach the server. Are you connected to the internet?

+ +
+ + Pull to retry +
+
+
⚠️
+

No connection

+

Could not reach the server.
Pull down to try again.

` + + 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' + } + }) }