diff --git a/frontend/src/components/calendar_permission_dialogs/MarkAvailabilityDialog.vue b/frontend/src/components/calendar_permission_dialogs/MarkAvailabilityDialog.vue index 9c114b02..0d1944d4 100644 --- a/frontend/src/components/calendar_permission_dialogs/MarkAvailabilityDialog.vue +++ b/frontend/src/components/calendar_permission_dialogs/MarkAvailabilityDialog.vue @@ -55,6 +55,19 @@ + +
+ + mdi-calendar-sync + + + Autofill with ICS Calendar Feed + +
+
+ + + @@ -101,6 +121,7 @@ import { mapActions, mapState } from "vuex" import CalendarPermissionsCard from "./CalendarPermissionsCard" import CreateAccount from "./CreateAccount" import AppleCredentials from "./AppleCredentials" +import ICSCredentials from "./ICSCredentials" export default { name: "MarkAvailabilityDialog", @@ -114,6 +135,7 @@ export default { CalendarPermissionsCard, CreateAccount, AppleCredentials, + ICSCredentials, }, data() { @@ -123,6 +145,7 @@ export default { GCAL_PERMISSIONS: "gcal_permissions", // present to user the gcal permissions we request CREATE_ACCOUNT_APPLE: "create_account_apple", // present to user the create account dialog APPLE_CREDENTIALS: "apple_credentials", // present to user the apple credentials dialog + ICS_CREDENTIALS: "ics_credentials", // present to user the ICS feed URL dialog }, state: this.initialState, } @@ -156,6 +179,10 @@ export default { this.$posthog.capture("autofill_with_outlook_clicked") this.$emit("allowOutlookCalendar") }, + autofillWithICS() { + this.$posthog.capture("autofill_with_ics_clicked") + this.state = this.states.ICS_CREDENTIALS + }, showChoices() { this.state = this.states.CHOICES }, diff --git a/frontend/src/components/settings/CalendarAccount.vue b/frontend/src/components/settings/CalendarAccount.vue index 7b602876..9b447866 100644 --- a/frontend/src/components/settings/CalendarAccount.vue +++ b/frontend/src/components/settings/CalendarAccount.vue @@ -14,6 +14,7 @@ hide-details />
+
- - - - + + + + Are you sure? diff --git a/frontend/src/views/Event.vue b/frontend/src/views/Event.vue index 19a9ab9f..15acfb87 100644 --- a/frontend/src/views/Event.vue +++ b/frontend/src/views/Event.vue @@ -17,6 +17,7 @@ " @setAvailabilityManually="setAvailabilityManually" @addedAppleCalendar="addedAppleCalendar" + @addedICSCalendar="addedICSCalendar" /> @@ -999,6 +1000,12 @@ export default { this.scheduleOverlapComponent?.startEditing() this.scheduleOverlapComponent?.setAvailabilityAutomatically() }, + /** Called when user adds ICS calendar account */ + addedICSCalendar() { + this.choiceDialog = false + this.scheduleOverlapComponent?.startEditing() + this.scheduleOverlapComponent?.setAvailabilityAutomatically() + }, /** Refresh calendar availabilities of everybody in the group */ async fetchCalendarAvailabilities() {