update version, incorporate error screen
This commit is contained in:
@@ -370,7 +370,7 @@
|
|||||||
INFOPLIST_FILE = App/Info.plist;
|
INFOPLIST_FILE = App/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
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\"";
|
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = russell.sam.forum;
|
PRODUCT_BUNDLE_IDENTIFIER = russell.sam.forum;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
@@ -392,7 +392,7 @@
|
|||||||
INFOPLIST_FILE = App/Info.plist;
|
INFOPLIST_FILE = App/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
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_BUNDLE_IDENTIFIER = russell.sam.forum;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
|
||||||
|
|||||||
@@ -31,10 +31,83 @@
|
|||||||
await appendScript(window.util.HOST + '/83947261/index.js', true)
|
await appendScript(window.util.HOST + '/83947261/index.js', true)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
document.body.innerHTML = `
|
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">
|
<style>
|
||||||
<p style="color: var(--text)">Could not reach the server. Are you connected to the internet?</p>
|
#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>
|
</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>
|
</script>
|
||||||
<meta name="theme-color" content="#31d53d" />
|
<meta name="theme-color" content="#31d53d" />
|
||||||
|
|||||||
Reference in New Issue
Block a user