From e3119af5b22603f29c5d37f83c1cdd1ca71c71fd Mon Sep 17 00:00:00 2001 From: Type <79042381+TypeFor@users.noreply.github.com> Date: Sat, 8 Aug 2026 18:58:16 +0200 Subject: [PATCH] FIX - return to the primary home page --- frontend/src/App.vue | 6 +++++- frontend/src/components/PhoneHomeIndicator.vue | 12 +++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 91e22f1..322ef18 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -115,6 +115,7 @@ type CalendarReminderData = { const REFERENCE_VIEWPORT_WIDTH = 1920 const REFERENCE_VIEWPORT_HEIGHT = 1080 const PHONE_BASE_SCALE = 0.69 +const DEVELOPMENT_PHONE_SCALE = 1.25 const isDevelopment = import.meta.env.DEV const phone = usePhoneStore() @@ -144,7 +145,10 @@ const controlCenterOpened = ref(false) const simPicker = ref(null) const systemColorScheme = window.matchMedia('(prefers-color-scheme: dark)') const viewportScale = ref(getViewportScale()) -const phoneBaseZoom = computed(() => viewportScale.value * PHONE_BASE_SCALE) +const phoneBaseZoom = computed(() => + viewportScale.value * + (isDevelopment ? DEVELOPMENT_PHONE_SCALE : PHONE_BASE_SCALE), +) const phoneResolutionStyle = computed(() => ({ '--phone-edge-gap': `${24 * viewportScale.value}px`, '--phone-stack-gap': `${16 * viewportScale.value}px`, diff --git a/frontend/src/components/PhoneHomeIndicator.vue b/frontend/src/components/PhoneHomeIndicator.vue index 9618d40..823d2ae 100644 --- a/frontend/src/components/PhoneHomeIndicator.vue +++ b/frontend/src/components/PhoneHomeIndicator.vue @@ -6,17 +6,23 @@ import { usePhoneStore } from '@/stores/phone' const route = useRoute() const router = useRouter() const phone = usePhoneStore() -const isApp = computed(() => route.name === 'app') +const HOME_PAGE = 1 +const canGoHome = computed( + () => route.name !== 'home' || phone.currentPage !== HOME_PAGE, +) function goHome(): void { - if (isApp.value) void router.push('/') + if (!canGoHome.value) return + + phone.setCurrentPage(HOME_PAGE) + if (route.name !== 'home') void router.push('/') }