Skip to content

Commit 8ef26bf

Browse files
committed
Update frontend designs and call new caldav endpoint
1 parent c41fdfb commit 8ef26bf

File tree

8 files changed

+27
-11
lines changed

8 files changed

+27
-11
lines changed
Lines changed: 4 additions & 0 deletions
Loading

frontend/src/locales/de.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"connectCalendarGoogle": "Mit Google Kalender verbinden",
5858
"connectCalendarGoogleInfo": "Synchronisiere Thunderbird Appointment mit deinem Google Kalender. Du kannst auswählen, welche Kalender eingeschlossen werden sollen.",
5959
"connectCalendarTBPro": "Mit Thunderbird Pro verbinden",
60-
"connectCalendarTBProInfo": "Synchronisiere Thunderbird Appointment mit deinem Thunderbird Pro Kalender. Du kannst auswählen, welche Kalender eingeschlossen werden sollen.",
60+
"connectCalendarTBProInfo": "Synchronisiere deinen Appointment Kalender mit deinem Thunderbird Pro Kalender (CalDAV).",
6161
"connectWithCalDav": "Mit CalDAV verbinden",
6262
"calendarUrl": "Kalender URL",
6363
"calendarUrlPlaceholder": "Vollständige URL eingeben",

frontend/src/locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"connectCalendarGoogle": "Connect with Google Calendar",
5858
"connectCalendarGoogleInfo": "Sync Thunderbird Appointment with your Google Calendar. You'll be able to choose which calendars to include.",
5959
"connectCalendarTBPro": "Connect with Thunderbird Pro",
60-
"connectCalendarTBProInfo": "Sync Thunderbird Appointment with your Thunderbird Pro calendar. You'll be able to choose which calendars to include.",
60+
"connectCalendarTBProInfo": "Sync your Appointment calendar with your Thundermail calendar (CalDAV).",
6161
"connectWithCalDav": "Connect with CalDav",
6262
"calendarUrl": "Calendar URL",
6363
"calendarUrlPlaceholder": "Enter full URL",

frontend/src/stores/calendar-store.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ export const useCalendarStore = defineStore('calendars', () => {
3838
window.location.href = googleUrl.data.value.slice(1, -1);
3939
};
4040

41+
const connectOIDCCalendar = async () => {
42+
await call.value('caldav/oidc/auth').post();
43+
};
44+
4145
/**
4246
* Retrieve the calendar object by id
4347
* @param id
@@ -142,6 +146,7 @@ export const useCalendarStore = defineStore('calendars', () => {
142146
$reset,
143147
connectGoogleCalendar,
144148
connectCalendar,
149+
connectOIDCCalendar,
145150
disconnectCalendar,
146151
updateCalendar,
147152
syncCalendars,

frontend/src/views/FTUEView/components/ProviderCardButton.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ defineProps<{
44
description: string;
55
iconSrc: string;
66
iconAlt: string;
7+
showDescription?: boolean;
78
}>();
89
</script>
910

@@ -13,7 +14,7 @@ defineProps<{
1314

1415
<div>
1516
<h3>{{ title }}</h3>
16-
<p>{{ description }}</p>
17+
<p v-if="showDescription">{{ description }}</p>
1718
</div>
1819
</button>
1920
</template>
@@ -27,6 +28,7 @@ button {
2728
border-radius: 0.5rem;
2829
text-align: left;
2930
align-items: center;
31+
width: 100%;
3032
3133
img {
3234
width: 2.25rem;

frontend/src/views/FTUEView/components/RadioProviderCardButton.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const handleKeydown = (event: KeyboardEvent) => {
5555
:iconSrc="iconSrc"
5656
:iconAlt="iconAlt"
5757
tabindex="-1"
58+
:showDescription="isSelected"
5859
/>
5960
</label>
6061
</template>
@@ -63,7 +64,7 @@ const handleKeydown = (event: KeyboardEvent) => {
6364
label {
6465
display: block;
6566
cursor: pointer;
66-
border: 2px solid transparent;
67+
border: 1px solid transparent;
6768
border-radius: 0.5rem;
6869
outline: none;
6970
@@ -73,7 +74,8 @@ label {
7374
}
7475
7576
&.selected {
76-
border-color: color-mix(in srgb, var(--colour-ti-highlight) 30%, transparent);
77+
border-color: var(--colour-primary-default);
78+
background-color: var(--colour-primary-soft);
7779
}
7880
}
7981

frontend/src/views/FTUEView/steps/ConnectYourCalendarStep.vue

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import { storeToRefs } from 'pinia';
44
import { useI18n } from 'vue-i18n';
55
import { PrimaryButton, NoticeBar, NoticeBarTypes } from '@thunderbirdops/services-ui';
66
import { useFTUEStore } from '@/stores/ftue-store';
7+
import { useCalendarStore } from '@/stores/calendar-store';
78
import calendarIcon from '@/assets/svg/icons/calendar.svg';
9+
import mailIcon from '@/assets/svg/icons/mail.svg';
810
import googleCalendarLogo from '@/assets/svg/google-calendar-logo.svg';
911
import { FtueStep } from '@/definitions';
1012
@@ -13,11 +15,12 @@ import RadioProviderCardButton from '../components/RadioProviderCardButton.vue';
1315
1416
const { t } = useI18n();
1517
18+
const calendarStore = useCalendarStore();
1619
const ftueStore = useFTUEStore();
1720
const { errorMessage } = storeToRefs(ftueStore);
1821
1922
type CalendarProvider = 'caldav' | 'google' | 'oidc';
20-
const calendarProvider = ref<CalendarProvider | null>(null);
23+
const calendarProvider = ref<CalendarProvider | null>('oidc');
2124
2225
const onBackButtonClick = () => {
2326
ftueStore.moveToStep(FtueStep.SetupProfile, true);
@@ -28,7 +31,7 @@ const onContinueButtonClick = async () => {
2831
2932
switch (calendarProvider.value) {
3033
case 'oidc':
31-
// TODO: Implement OIDC flow (get the token and try to authenticate)
34+
await calendarStore.connectOIDCCalendar();
3235
break;
3336
case 'caldav':
3437
await ftueStore.moveToStep(FtueStep.ConnectCalendarsCalDav);
@@ -51,16 +54,15 @@ const onContinueButtonClick = async () => {
5154
</notice-bar>
5255

5356
<div class="radio-group" role="radiogroup" :aria-label="t('ftue.connectYourCalendar')">
54-
<!-- TODO: Implement OIDC / TB Pro Calendar auto-connect through token -->
55-
<!-- <radio-provider-card-button
57+
<radio-provider-card-button
5658
:title="t('ftue.connectCalendarTBPro')"
5759
:description="t('ftue.connectCalendarTBProInfo')"
58-
:iconSrc="calendarIcon"
60+
:iconSrc="mailIcon"
5961
:iconAlt="t('ftue.appointmentLogo')"
6062
value="oidc"
6163
name="calendar-provider"
6264
v-model="calendarProvider"
63-
/> -->
65+
/>
6466

6567
<radio-provider-card-button
6668
:title="t('ftue.connectCalendarCalDav')"

frontend/src/views/FTUEView/steps/VideoMeetingLinkStep.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ onMounted(async () => {
100100
:iconSrc="zoomLogo"
101101
:iconAlt="t('ftue.zoomIcon')"
102102
@click="onZoomButtonClick()"
103+
:showDescription="true"
103104
/>
104105
</div>
105106

0 commit comments

Comments
 (0)