diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 5d83befe1..746d294aa 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -151,6 +151,21 @@ const checkLogin = async () => { } }; +// provide methods for logging the user in and out for corresponding buttons in child components +const login = () => { + auth.loginWithRedirect(); +}; +const logout = async () => { + currentUser.reset(); + await auth.logout({ + logoutParams: { + returnTo: window.location.origin, + }, + }); +}; +provide("login", login); +provide("logout", logout); + // query db for all calendar data const getDbCalendars = async (onlyConnected = true) => { const { data, error } = await call(`me/calendars?only_connected=${onlyConnected}`).get().json(); diff --git a/frontend/src/assets/main.css b/frontend/src/assets/main.css index f0d12fc61..a04ecca4d 100644 --- a/frontend/src/assets/main.css +++ b/frontend/src/assets/main.css @@ -96,3 +96,14 @@ @apply placeholder:text-gray-300 dark:placeholder:text-gray-500; } } + +/* vue specific classes */ +.v-enter-active, +.v-leave-active { + @apply transition-opacity; +} + +.v-enter-from, +.v-leave-to { + @apply opacity-0; +} diff --git a/frontend/src/components/NavBar.vue b/frontend/src/components/NavBar.vue index 032ea2964..5eed8b372 100644 --- a/frontend/src/components/NavBar.vue +++ b/frontend/src/components/NavBar.vue @@ -25,50 +25,85 @@ :placeholder="t('label.search')" /> --> - diff --git a/frontend/src/components/ScheduleCreation.vue b/frontend/src/components/ScheduleCreation.vue index bb64baf02..e517831a2 100644 --- a/frontend/src/components/ScheduleCreation.vue +++ b/frontend/src/components/ScheduleCreation.vue @@ -265,6 +265,13 @@ +
+ +
@@ -310,7 +317,7 @@ import SecondaryButton from "@/elements/SecondaryButton"; import TabBar from "@/components/TabBar"; // icons -import { IconChevronDown } from "@tabler/icons-vue"; +import { IconChevronDown, IconExternalLink } from "@tabler/icons-vue"; import AlertBox from "@/elements/AlertBox"; import SwitchToggle from "@/elements/SwitchToggle"; @@ -457,7 +464,6 @@ const farthest = computed(() => dj.duration(scheduleInput.value.farthest_booking const savedConfirmation = reactive({ show: false, title: "", - publicLink: "", }); const closeCreatedModal = () => { savedConfirmation.show = false; @@ -469,6 +475,15 @@ const resetSchedule = () => { state.value = scheduleCreationState.details; }; +// hold public availability link of user +const publicLink = ref(''); +onMounted(async () => { + const { data, error } = await call('me/signature').get().json(); + if (!error.value) { + publicLink.value = data.value.url; + } +}); + // handle actual schedule creation/update const savingInProgress = ref(false); const saveSchedule = async (withConfirmation = true) => { @@ -514,7 +529,7 @@ const saveSchedule = async (withConfirmation = true) => { // show confirmation savedConfirmation.title = data.value.name; - savedConfirmation.publicLink = sig_data.value.url; + publicLink.value = sig_data.value.url; savedConfirmation.show = true; } diff --git a/frontend/src/components/SettingsAccount.vue b/frontend/src/components/SettingsAccount.vue index 08da4b739..f615ba4b3 100644 --- a/frontend/src/components/SettingsAccount.vue +++ b/frontend/src/components/SettingsAccount.vue @@ -150,9 +150,7 @@ diff --git a/frontend/src/elements/DropDown.vue b/frontend/src/elements/DropDown.vue new file mode 100644 index 000000000..19370c801 --- /dev/null +++ b/frontend/src/elements/DropDown.vue @@ -0,0 +1,21 @@ + + + diff --git a/frontend/src/elements/NavBarItem.vue b/frontend/src/elements/NavBarItem.vue new file mode 100644 index 000000000..f5d0c1118 --- /dev/null +++ b/frontend/src/elements/NavBarItem.vue @@ -0,0 +1,26 @@ + + + diff --git a/frontend/src/elements/TextButton.vue b/frontend/src/elements/TextButton.vue index d5efe0738..ad6a9ed4d 100644 --- a/frontend/src/elements/TextButton.vue +++ b/frontend/src/elements/TextButton.vue @@ -5,7 +5,7 @@ transition-all ease-in-out flex items-center justify-center gap-1 text-gray-500 dark:text-gray-400 border-gray-400 hover:bg-gray-50 dark:hover:bg-gray-800 " - @click="copy ? copyToClipboard() : null" + @click.stop="copy ? copyToClipboard() : null" > -
-
- Appointment Logo -

- {{ $t('app.title') }} -

-
-

- {{ $t('text.homepage.intro') }} -

-
- - +
+
+
+ Appointment Logo +

+ {{ $t('app.title') }} +

+
+

+ {{ $t('text.homepage.intro') }} +

+
+ + +
+
+
+ +
-
- - -
-
-
-
-

- {{ $t('text.homepage.sectionHeader') }} -

-
- {{ $t('text.homepage.planEventBody') }} - {{ $t('text.homepage.setAvailabilityBody') }} - {{ $t('text.homepage.shareWithOthersBody') }}
-
-
-
-
-
- - -
-

- {{ $t('text.homepage.calendarCopy') }} -

+
+

+ {{ $t('text.homepage.sectionHeader') }} +

+
+ {{ $t('text.homepage.planEventBody') }} + {{ $t('text.homepage.setAvailabilityBody') }} + {{ $t('text.homepage.shareWithOthersBody') }} +
+
+
+
+
+
+ + +
+

+ {{ $t('text.homepage.calendarCopy') }} +

+
-
-
-
-
-
-
- - -
-

- {{ $t('text.homepage.scheduleCopy') }} -

+
+
+
+
+
+ + +
+

+ {{ $t('text.homepage.scheduleCopy') }} +

+
-
-
- - + + + +