mirror of
https://github.com/RustyRaptor/schej.it.git
synced 2026-12-03 15:55:18 -07:00
changed way we handle dialog input
This commit is contained in:
1 parent
41abe1f5e1
commit
1f31979c71
4 files changed
+49
-1
No files matched your search
@@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<v-dialog
|
||||
:value="value"
|
||||
@input="(e) => $emit('input', e)"
|
||||
@click:outside="handleDialogInput"
|
||||
no-click-animation
|
||||
persistent
|
||||
content-class="tw-max-w-[28rem]"
|
||||
:fullscreen="isPhone"
|
||||
scrollable
|
||||
@@ -110,6 +112,13 @@ export default {
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
handleDialogInput() {
|
||||
console.log("dialog input")
|
||||
this.$emit('input', false)
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
groupsEnabled: {
|
||||
immediate: true,
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
:class="{ 'tw-py-4': !dialog, 'tw-flex-1': dialog }"
|
||||
class="tw-relative tw-flex tw-max-w-[28rem] tw-flex-col tw-overflow-hidden tw-rounded-lg tw-transition-all"
|
||||
>
|
||||
<SaveProgressDialog v-model="saveProgressDialog">
|
||||
</SaveProgressDialog>
|
||||
<v-card-title class="tw-mb-2 tw-flex tw-gap-2 tw-px-4 sm:tw-px-8">
|
||||
<div>
|
||||
<div class="tw-mb-1">
|
||||
@@ -271,6 +273,7 @@ import TimezoneSelector from "./schedule_overlap/TimezoneSelector.vue"
|
||||
import HelpDialog from "./HelpDialog.vue"
|
||||
import EmailInput from "./event/EmailInput.vue"
|
||||
import DatePicker from "@/components/DatePicker.vue"
|
||||
import SaveProgressDialog from "@/components/general/SaveProgressDialog.vue"
|
||||
import dayjs from "dayjs"
|
||||
import utcPlugin from "dayjs/plugin/utc"
|
||||
import timezonePlugin from "dayjs/plugin/timezone"
|
||||
@@ -296,6 +299,7 @@ export default {
|
||||
HelpDialog,
|
||||
EmailInput,
|
||||
DatePicker,
|
||||
SaveProgressDialog,
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
@@ -323,6 +327,7 @@ export default {
|
||||
emails: [], // For email reminders
|
||||
|
||||
helpDialog: false,
|
||||
saveProgressDialog: false,
|
||||
}),
|
||||
|
||||
mounted() {
|
||||
@@ -406,6 +411,8 @@ export default {
|
||||
this.$refs.form.resetValidation()
|
||||
},
|
||||
submit() {
|
||||
console.log("whats up")
|
||||
console.log(this.$refs.form)
|
||||
if (!this.$refs.form.validate()) return
|
||||
|
||||
this.selectedDays.sort()
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<v-dialog
|
||||
:value="value"
|
||||
@input="(e) => $emit('input', e)"
|
||||
width="425"
|
||||
content-class="tw-m-0"
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title>Unsaved changes</v-card-title>
|
||||
<v-card-text>
|
||||
Are you sure you want to leave this page?
|
||||
Changes you made will not be saved.
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer />
|
||||
<v-btn text @click="$emit('input', false)" class="tw-text-green">Cancel</v-btn>
|
||||
<v-btn text @click="$emit('input', false)">Leave page</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "SaveProgressDialog",
|
||||
|
||||
props: {
|
||||
value: { type: Boolean, required: true },
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1 @@
|
||||
exit status 1
|
||||
Reference in new issue
Block a user