From ea9f63c88857770f0dc3e220af1b1ba9ba73e4ef Mon Sep 17 00:00:00 2001 From: Gaubee Date: Sun, 8 Feb 2026 13:38:13 +0800 Subject: [PATCH 1/2] fix(ecosystem): restore tab swipe-up for stack view --- .../src/components/home-button.ts | 53 ++++++++++++++----- 1 file changed, 41 insertions(+), 12 deletions(-) diff --git a/packages/ecosystem-native/src/components/home-button.ts b/packages/ecosystem-native/src/components/home-button.ts index 6948dc09a..b891cc0bc 100644 --- a/packages/ecosystem-native/src/components/home-button.ts +++ b/packages/ecosystem-native/src/components/home-button.ts @@ -13,10 +13,17 @@ export class HomeButton extends LitElement { static override styles = css` :host { display: contents; + touch-action: pan-x; + -webkit-touch-callout: none; + -webkit-user-select: none; + user-select: none; } - .home-button-wrapper { + slot { display: contents; + } + + ::slotted(*) { touch-action: pan-x; -webkit-touch-callout: none; -webkit-user-select: none; @@ -49,11 +56,30 @@ export class HomeButton extends LitElement { override connectedCallback(): void { super.connectedCallback(); + // Update detector with current thresholds this.swipeDetector = createUpSwipeDetector({ threshold: this.swipeThreshold, velocityThreshold: this.velocityThreshold, }); + + // NOTE: Listen on host element instead of shadow DOM. + // Touch events are not reliably delivered through shadow boundaries in Safari, + // which may cause swipe-up to silently fail. + // Capture phase: avoid child components (e.g. Swiper) stopping propagation. + this.addEventListener('touchstart', this.handleTouchStart, { capture: true }); + this.addEventListener('touchend', this.handleTouchEnd, { capture: true }); + this.addEventListener('touchcancel', this.handleTouchCancel, { capture: true }); + this.addEventListener('click', this.handleClick); + } + + override disconnectedCallback(): void { + this.removeEventListener('touchstart', this.handleTouchStart, { capture: true }); + this.removeEventListener('touchend', this.handleTouchEnd, { capture: true }); + this.removeEventListener('touchcancel', this.handleTouchCancel, { capture: true }); + this.removeEventListener('click', this.handleClick); + + super.disconnectedCallback(); } override updated(changedProperties: Map): void { @@ -66,11 +92,23 @@ export class HomeButton extends LitElement { } private handleTouchStart = (e: TouchEvent): void => { + if (!this.hasRunningApps) { + this.swipeDetector.reset(); + return; + } + this.swipeDetector.handleTouchStart(e); }; + private handleTouchCancel = (): void => { + this.swipeDetector.reset(); + }; + private handleTouchEnd = (e: TouchEvent): void => { - if (!this.hasRunningApps) return; + if (!this.hasRunningApps) { + this.swipeDetector.reset(); + return; + } const result = this.swipeDetector.handleTouchEnd(e); @@ -101,16 +139,7 @@ export class HomeButton extends LitElement { }; override render() { - return html` -
- -
- `; + return html``; } } From d4ff33431283e0abc898a9ca243d5d5244e9e20f Mon Sep 17 00:00:00 2001 From: Gaubee Date: Sun, 8 Feb 2026 14:10:05 +0800 Subject: [PATCH 2/2] feat(ecosystem): tweak beta app name tint --- src/components/ecosystem/my-apps-page.module.css | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/ecosystem/my-apps-page.module.css b/src/components/ecosystem/my-apps-page.module.css index 0c4762535..aee933606 100644 --- a/src/components/ecosystem/my-apps-page.module.css +++ b/src/components/ecosystem/my-apps-page.module.css @@ -106,6 +106,11 @@ /* beta miniapp:桌面图标名称带轻微“危险色”提示 */ .betaAppName { - color: color-mix(in oklab, var(--foreground) 88%, var(--destructive) 12%); - opacity: 0.9; + /* + * 使用 foreground 与 destructive 做 mix: + * - 深色主题(前景偏白)→ 淡红 + * - 浅色主题(前景偏黑)→ 暗红 + */ + color: var(--foreground); + color: color-mix(in srgb, var(--foreground) 78%, var(--destructive) 22%); }