This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-01-19 15:01:13 +07:00
parent 8b26530d52
commit 112e6911ad
3 changed files with 50 additions and 34 deletions

View file

@ -5,34 +5,35 @@ export function usePermissions() {
const $q = useQuasar()
const privacyStore = usePrivacyStore()
const checkCameraPermission = (): boolean => {
if (!privacyStore.isAccepted) {
privacyStore.modalPrivacy = true
$q.notify({
type: 'warning',
message: 'กรุณายอมรับนโยบายคุ้มครองข้อมูลส่วนบุคคลก่อนใช้งานกล้อง',
position: 'top',
})
return false
}
return true
}
// const checkCameraPermission = (): boolean => {
// if (!privacyStore.isAccepted) {
// privacyStore.modalPrivacy = true
// $q.notify({
// type: 'warning',
// message: 'กรุณายอมรับนโยบายคุ้มครองข้อมูลส่วนบุคคลก่อนใช้งานกล้อง',
// position: 'top',
// })
// return false
// }
// return true
// }
const checkLocationPermission = (): boolean => {
if (!privacyStore.isAccepted) {
privacyStore.modalPrivacy = true
$q.notify({
type: 'warning',
message: 'กรุณายอมรับนโยบายคุ้มครองข้อมูลส่วนบุคคลก่อนใช้งานแผนที่',
position: 'top',
})
return false
}
return true
}
// const checkLocationPermission = (): boolean => {
// if (!privacyStore.isAccepted) {
// privacyStore.modalPrivacy = true
// $q.notify({
// type: 'warning',
// message: 'กรุณายอมรับนโยบายคุ้มครองข้อมูลส่วนบุคคลก่อนใช้งานแผนที่',
// position: 'top',
// })
// return false
// }
// return true
// }
const checkPrivacyAccepted = (): boolean => {
if (!privacyStore.isAccepted) {
privacyStore.modalPrivacy = true
$q.notify({
type: 'warning',
message: 'กรุณายอมรับนโยบายคุ้มครองข้อมูลส่วนบุคคลก่อนใช้งาน',
@ -44,8 +45,8 @@ export function usePermissions() {
}
return {
checkCameraPermission,
checkLocationPermission,
// checkCameraPermission,
// checkLocationPermission,
checkPrivacyAccepted,
}
}