diff --git a/resources/js/pages/Profile.vue b/resources/js/pages/Profile.vue index cf0a15a..956dd0e 100644 --- a/resources/js/pages/Profile.vue +++ b/resources/js/pages/Profile.vue @@ -9,8 +9,10 @@ import { Sparkles, ArrowRight, Mail, + AlertTriangle, + ChevronDown, } from 'lucide-vue-next'; -import { computed } from 'vue'; +import { computed, ref } from 'vue'; const props = defineProps({ user: Object, @@ -25,6 +27,9 @@ const hasNoRole = computed(() => { return !roles || roles.length === 0; }); +const showAdvancedSettings = ref(false); +const showConfirmModal = ref(false); + const form = useForm({ _method: 'PUT', name: user.value?.name || '', @@ -38,6 +43,19 @@ const form = useForm({ receive_emails: user.value?.receive_emails ?? true, }); +const handleEmailToggle = () => { + if (form.receive_emails) { + showConfirmModal.value = true; + } else { + form.receive_emails = true; + } +}; + +const confirmDisable = () => { + form.receive_emails = false; + showConfirmModal.value = false; +}; + const submitForm = () => { form.post('/profile', { preserveScroll: true, @@ -451,62 +469,96 @@ const submitForm = () => { - +
- Manage what email announcements and updates you - receive. -
+ Updates Paused +- Stay up-to-date with new resources, study materials, - and platform announcements. -
-+ You will stop receiving critical syllabus announcements, new exam preparation materials, and platform alerts. We strongly recommend keeping this enabled. +
+