From d63f2f9f5116c4ee2c6d973e62733da1e09fae74 Mon Sep 17 00:00:00 2001 From: EvanChal Date: Mon, 26 Jan 2026 22:08:57 +0100 Subject: [PATCH] fix(pwa): added PWAInstallTutorial to handle pwa install instructions --- backend/MIGRATIONS.md | 1 + backend/alembic.ini | 1 + backend/migrations/README.md | 1 + backend/migrations/script.py.mako | 1 + backend/scripts/migrate.sh | 1 + frontend/PWA_SETUP.md | 1 + frontend/public/manifest.json | 1 + frontend/public/sw-custom.js | 1 + frontend/src/components/PWAInstallPrompt.vue | 1 + frontend/src/components/PWAInstallTutorial.vue | 1 + frontend/src/utils/dateUtils.js | 1 + frontend/src/views/Register.vue | 16 +++++++++++++--- 12 files changed, 24 insertions(+), 3 deletions(-) diff --git a/backend/MIGRATIONS.md b/backend/MIGRATIONS.md index 4786591..82128dd 100644 --- a/backend/MIGRATIONS.md +++ b/backend/MIGRATIONS.md @@ -135,3 +135,4 @@ backend/ - [Documentation Alembic](https://alembic.sqlalchemy.org/) - [SQLAlchemy Documentation](https://docs.sqlalchemy.org/) + diff --git a/backend/alembic.ini b/backend/alembic.ini index 7825555..f0d338b 100644 --- a/backend/alembic.ini +++ b/backend/alembic.ini @@ -113,3 +113,4 @@ formatter = generic format = %(levelname)-5.5s [%(name)s] %(message)s datefmt = %H:%M:%S + diff --git a/backend/migrations/README.md b/backend/migrations/README.md index e270552..086cb6b 100644 --- a/backend/migrations/README.md +++ b/backend/migrations/README.md @@ -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` + diff --git a/backend/migrations/script.py.mako b/backend/migrations/script.py.mako index 3c2e787..f3321d0 100644 --- a/backend/migrations/script.py.mako +++ b/backend/migrations/script.py.mako @@ -25,3 +25,4 @@ def upgrade() -> None: def downgrade() -> None: ${downgrades if downgrades else "pass"} + diff --git a/backend/scripts/migrate.sh b/backend/scripts/migrate.sh index 8d1e33d..4e02bba 100755 --- a/backend/scripts/migrate.sh +++ b/backend/scripts/migrate.sh @@ -40,3 +40,4 @@ case "$1" in ;; esac + diff --git a/frontend/PWA_SETUP.md b/frontend/PWA_SETUP.md index 0d0ad6a..9a06ebf 100644 --- a/frontend/PWA_SETUP.md +++ b/frontend/PWA_SETUP.md @@ -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 + diff --git a/frontend/public/manifest.json b/frontend/public/manifest.json index 5283cbc..601d8f9 100644 --- a/frontend/public/manifest.json +++ b/frontend/public/manifest.json @@ -78,3 +78,4 @@ ] } + diff --git a/frontend/public/sw-custom.js b/frontend/public/sw-custom.js index f10c927..9a16247 100644 --- a/frontend/public/sw-custom.js +++ b/frontend/public/sw-custom.js @@ -95,3 +95,4 @@ self.addEventListener('push', (event) => { ) }) + diff --git a/frontend/src/components/PWAInstallPrompt.vue b/frontend/src/components/PWAInstallPrompt.vue index a445dcc..2751703 100644 --- a/frontend/src/components/PWAInstallPrompt.vue +++ b/frontend/src/components/PWAInstallPrompt.vue @@ -150,3 +150,4 @@ function dismissPrompt() { } + diff --git a/frontend/src/components/PWAInstallTutorial.vue b/frontend/src/components/PWAInstallTutorial.vue index d6f7c32..d69a26d 100644 --- a/frontend/src/components/PWAInstallTutorial.vue +++ b/frontend/src/components/PWAInstallTutorial.vue @@ -241,3 +241,4 @@ function close() { } + diff --git a/frontend/src/utils/dateUtils.js b/frontend/src/utils/dateUtils.js index 3285090..edd5a65 100644 --- a/frontend/src/utils/dateUtils.js +++ b/frontend/src/utils/dateUtils.js @@ -64,3 +64,4 @@ export function convertFrenchTimezoneToUTC(date) { return zonedTimeToUtc(dateObj, FRENCH_TIMEZONE) } + diff --git a/frontend/src/views/Register.vue b/frontend/src/views/Register.vue index 45084b5..db29827 100644 --- a/frontend/src/views/Register.vue +++ b/frontend/src/views/Register.vue @@ -332,6 +332,13 @@

+ + + @@ -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 } }