fix(pwa): added PWAInstallTutorial to handle pwa install instructions
Some checks failed
Deploy to Development / build-and-deploy (push) Failing after 36s
Deploy to Production / build-and-deploy (push) Successful in 1m48s

This commit is contained in:
EvanChal
2026-01-26 22:08:57 +01:00
parent 02a54f5625
commit d63f2f9f51
12 changed files with 24 additions and 3 deletions

View File

@@ -49,3 +49,4 @@ npm run build
- Les mises à jour sont automatiques (`registerType: 'autoUpdate'`)
- Les icônes doivent être générées avant le premier build

View File

@@ -78,3 +78,4 @@
]
}

View File

@@ -95,3 +95,4 @@ self.addEventListener('push', (event) => {
)
})

View File

@@ -150,3 +150,4 @@ function dismissPrompt() {
}
</style>

View File

@@ -241,3 +241,4 @@ function close() {
}
</script>

View File

@@ -64,3 +64,4 @@ export function convertFrenchTimezoneToUTC(date) {
return zonedTimeToUtc(dateObj, FRENCH_TIMEZONE)
}

View File

@@ -332,6 +332,13 @@
</router-link>
</p>
</div>
<!-- PWA Install Tutorial -->
<PWAInstallTutorial
:show="showPWAInstructions"
:is-ios="isIOS"
@close="showPWAInstructions = false"
/>
</div>
</template>
@@ -342,6 +349,7 @@ import { useAuthStore } from '@/stores/auth'
import StepTransition from '@/components/StepTransition.vue'
import PasswordStrength from '@/components/PasswordStrength.vue'
import FormValidation from '@/components/FormValidation.vue'
import PWAInstallTutorial from '@/components/PWAInstallTutorial.vue'
const authStore = useAuthStore()
const router = useRouter()
@@ -440,6 +448,9 @@ async function handleRegister() {
// PWA Installation
const isMobile = ref(false)
const showPWAInstructions = ref(false)
const isIOS = computed(() => /iPhone|iPad|iPod/i.test(navigator.userAgent))
function checkIfMobile() {
isMobile.value = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent) ||
@@ -466,9 +477,8 @@ async function handleInstallApp() {
console.error('Erreur lors de l\'installation:', error)
}
} else if (isMobile.value) {
// Sur mobile sans beforeinstallprompt, on ne peut pas installer directement
// L'utilisateur devra utiliser le menu une fois connecté
console.log('Installation PWA non disponible sur ce navigateur mobile')
// Sur mobile sans beforeinstallprompt, afficher les instructions
showPWAInstructions.value = true
}
}