fix(pwa): added PWAInstallTutorial to handle pwa install instructions
This commit is contained in:
@@ -135,3 +135,4 @@ backend/
|
||||
- [Documentation Alembic](https://alembic.sqlalchemy.org/)
|
||||
- [SQLAlchemy Documentation](https://docs.sqlalchemy.org/)
|
||||
|
||||
|
||||
|
||||
@@ -113,3 +113,4 @@ formatter = generic
|
||||
format = %(levelname)-5.5s [%(name)s] %(message)s
|
||||
datefmt = %H:%M:%S
|
||||
|
||||
|
||||
|
||||
@@ -41,3 +41,4 @@ alembic revision -m "Description de la migration"
|
||||
- Testez toujours les migrations en développement avant de les appliquer en production
|
||||
- En cas de problème, vous pouvez toujours revenir en arrière avec `alembic downgrade`
|
||||
|
||||
|
||||
|
||||
@@ -25,3 +25,4 @@ def upgrade() -> None:
|
||||
def downgrade() -> None:
|
||||
${downgrades if downgrades else "pass"}
|
||||
|
||||
|
||||
|
||||
@@ -40,3 +40,4 @@ case "$1" in
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -78,3 +78,4 @@
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -95,3 +95,4 @@ self.addEventListener('push', (event) => {
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -150,3 +150,4 @@ function dismissPrompt() {
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
@@ -241,3 +241,4 @@ function close() {
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -64,3 +64,4 @@ export function convertFrenchTimezoneToUTC(date) {
|
||||
return zonedTimeToUtc(dateObj, FRENCH_TIMEZONE)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user