feat: ship as a real iOS-installable PWA, restructure bottom nav, fix safe-area
CI / test (push) Has been cancelled

- Add manifest.webmanifest with standalone display + warm-craft theme colors,
  apple-touch-icon, and 192/512/512-maskable icons (frame-with-sunset glyph).
- Add PWA meta tags + viewport-fit=cover so add-to-home-screen produces a
  true standalone app on iOS instead of a Safari bookmark.
- Drop the Shared bottom-nav tab; the in-page sub-tabs already cover that.
  Three nav tabs total (Home / Library / Settings); pending-share badge
  moves to the Library tab. Predicate-based isActive() now correctly
  disambiguates /library vs /library?tab=shared.
- Safe-area handling: bottom nav, bottom sheet, upload overlay, and #app
  respect env(safe-area-inset-*); sticky Library tabs anchor below the
  iPhone status bar. Introduces --bottom-nav-height token consumed by
  Settings, Library, and the toast.
- LibraryView reactively follows route.query.tab so deep-linking
  /library?tab=shared lands on the right sub-tab.
- Theme-color meta syncs client-side via useTheme.applyTheme so the
  user's chosen theme follows them into Android Chrome's chrome bar.

Test suite expanded to 278 tests / 100% line coverage (99.84% statements,
99.78% branches). Remaining gaps are unreachable defensive code.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-06 18:07:05 -04:00
parent e0bad975ec
commit 5fcfb806be
58 changed files with 2922 additions and 60 deletions
+15 -4
View File
@@ -203,7 +203,7 @@
</template>
<script setup lang="ts">
import { ref, computed, onMounted } from 'vue'
import { ref, computed, onMounted, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { useImagesStore } from '@/stores/images'
import { useDevicesStore } from '@/stores/devices'
@@ -229,7 +229,18 @@ const TABS = [
] as const
type Tab = typeof TABS[number]['id']
const activeTab = ref<Tab>((route.query.tab as Tab) ?? 'all')
function tabFromQuery(value: unknown): Tab {
return TABS.some(t => t.id === value) ? (value as Tab) : 'all'
}
const activeTab = ref<Tab>(tabFromQuery(route.query.tab))
watch(() => route.query.tab, (next) => {
const tab = tabFromQuery(next)
if (tab === activeTab.value) return
activeTab.value = tab
if (tab === 'shared') loadShared(sharedTab.value)
})
const SHARED_TABS = [
{ id: 'pending', label: 'Pending' },
@@ -383,13 +394,13 @@ async function doDelete() {
<style scoped lang="scss">
.library {
padding-bottom: calc(64px + var(--space-4));
padding-bottom: calc(var(--bottom-nav-height) + var(--space-4));
&__tabs {
display: flex;
border-bottom: 1px solid var(--color-border);
position: sticky;
top: 0;
top: env(safe-area-inset-top);
background: var(--color-bg);
z-index: 5;
}
+1 -1
View File
@@ -54,7 +54,7 @@ function select(themeId: string) {
<style scoped lang="scss">
.settings {
padding: var(--space-4) var(--space-4) calc(64px + var(--space-6));
padding: var(--space-4) var(--space-4) calc(var(--bottom-nav-height) + var(--space-6));
max-width: 480px;
margin: 0 auto;
+2
View File
@@ -230,6 +230,8 @@ function finish() {
background: var(--color-bg);
display: flex;
flex-direction: column;
padding-top: env(safe-area-inset-top);
padding-bottom: env(safe-area-inset-bottom);
&__header {
flex-shrink: 0;