fix(ui): square mobile file tiles, files scroll clearance, apps-tab swipe guard
- Apps tab: a horizontal swipe that starts on an app icon no longer flips the top tab — it lets the app-page scroll / icon tap win (swipe empty space to change tab). Fixes the swipe conflict with two pages of apps. - Files: file cover tiles are forced square on mobile (aspect driven by CSS, not a Tailwind arbitrary class) so the grid is uniform and tappable. - Files: scroll container gets bottom safe-area + tab-bar padding so the last row clears the mobile back button / bottom nav. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
a0b80dd27d
commit
cebbde7bde
@@ -290,14 +290,19 @@ function activeNetKey(): string {
|
||||
let touchStartX = 0
|
||||
let touchStartY = 0
|
||||
let touchStartTime = 0
|
||||
let swipeSuppressed = false
|
||||
function onContentTouchStart(e: TouchEvent) {
|
||||
const t = e.touches[0]
|
||||
if (!t) return
|
||||
// Don't begin a tab swipe when the gesture starts on an app icon — let the
|
||||
// icon handle the tap/long-press. Swiping anywhere else still changes tabs.
|
||||
swipeSuppressed = !!(e.target instanceof Element && e.target.closest('.app-icon-item'))
|
||||
touchStartX = t.clientX
|
||||
touchStartY = t.clientY
|
||||
touchStartTime = e.timeStamp
|
||||
}
|
||||
function onContentTouchEnd(e: TouchEvent) {
|
||||
if (swipeSuppressed) { swipeSuppressed = false; return }
|
||||
const t = e.changedTouches[0]
|
||||
if (!t) return
|
||||
const dx = t.clientX - touchStartX
|
||||
|
||||
Reference in New Issue
Block a user