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/)
|
- [Documentation Alembic](https://alembic.sqlalchemy.org/)
|
||||||
- [SQLAlchemy Documentation](https://docs.sqlalchemy.org/)
|
- [SQLAlchemy Documentation](https://docs.sqlalchemy.org/)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -113,3 +113,4 @@ formatter = generic
|
|||||||
format = %(levelname)-5.5s [%(name)s] %(message)s
|
format = %(levelname)-5.5s [%(name)s] %(message)s
|
||||||
datefmt = %H:%M:%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
|
- 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`
|
- 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:
|
def downgrade() -> None:
|
||||||
${downgrades if downgrades else "pass"}
|
${downgrades if downgrades else "pass"}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -40,3 +40,4 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -49,3 +49,4 @@ npm run build
|
|||||||
- Les mises à jour sont automatiques (`registerType: 'autoUpdate'`)
|
- Les mises à jour sont automatiques (`registerType: 'autoUpdate'`)
|
||||||
- Les icônes doivent être générées avant le premier build
|
- 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>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -241,3 +241,4 @@ function close() {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -64,3 +64,4 @@ export function convertFrenchTimezoneToUTC(date) {
|
|||||||
return zonedTimeToUtc(dateObj, FRENCH_TIMEZONE)
|
return zonedTimeToUtc(dateObj, FRENCH_TIMEZONE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -332,6 +332,13 @@
|
|||||||
</router-link>
|
</router-link>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- PWA Install Tutorial -->
|
||||||
|
<PWAInstallTutorial
|
||||||
|
:show="showPWAInstructions"
|
||||||
|
:is-ios="isIOS"
|
||||||
|
@close="showPWAInstructions = false"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -342,6 +349,7 @@ import { useAuthStore } from '@/stores/auth'
|
|||||||
import StepTransition from '@/components/StepTransition.vue'
|
import StepTransition from '@/components/StepTransition.vue'
|
||||||
import PasswordStrength from '@/components/PasswordStrength.vue'
|
import PasswordStrength from '@/components/PasswordStrength.vue'
|
||||||
import FormValidation from '@/components/FormValidation.vue'
|
import FormValidation from '@/components/FormValidation.vue'
|
||||||
|
import PWAInstallTutorial from '@/components/PWAInstallTutorial.vue'
|
||||||
|
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
@@ -440,6 +448,9 @@ async function handleRegister() {
|
|||||||
|
|
||||||
// PWA Installation
|
// PWA Installation
|
||||||
const isMobile = ref(false)
|
const isMobile = ref(false)
|
||||||
|
const showPWAInstructions = ref(false)
|
||||||
|
|
||||||
|
const isIOS = computed(() => /iPhone|iPad|iPod/i.test(navigator.userAgent))
|
||||||
|
|
||||||
function checkIfMobile() {
|
function checkIfMobile() {
|
||||||
isMobile.value = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent) ||
|
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)
|
console.error('Erreur lors de l\'installation:', error)
|
||||||
}
|
}
|
||||||
} else if (isMobile.value) {
|
} else if (isMobile.value) {
|
||||||
// Sur mobile sans beforeinstallprompt, on ne peut pas installer directement
|
// Sur mobile sans beforeinstallprompt, afficher les instructions
|
||||||
// L'utilisateur devra utiliser le menu une fois connecté
|
showPWAInstructions.value = true
|
||||||
console.log('Installation PWA non disponible sur ce navigateur mobile')
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user