Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
This commit is contained in:
John Molakvoæ (skjnldsv) 2021-06-14 12:13:45 +02:00 committed by Richard Steinmetz
parent beefca0a77
commit 3c98f7a802
No known key found for this signature in database
GPG Key ID: 31BA3356F0FA2874
28 changed files with 79 additions and 69 deletions

1
.stylelintignore Normal file
View File

@ -0,0 +1 @@
src/fonts

View File

@ -73,7 +73,7 @@ export default {
filters: { filters: {
formatDateRage, formatDateRage,
}, },
data: function() { data() {
return { return {
isDatepickerOpen: false, isDatepickerOpen: false,
} }

View File

@ -39,9 +39,9 @@
:calendar="calendar" /> :calendar="calendar" />
</template> </template>
<!-- The header slot must be placed here, otherwise vuedraggable adds undefined as item to the array --> <!-- The header slot must be placed here, otherwise vuedraggable adds undefined as item to the array -->
<CalendarListItemLoadingPlaceholder <template #footer>
v-if="loadingCalendars" <CalendarListItemLoadingPlaceholder v-if="loadingCalendars" />
#footer /> </template>
</draggable> </draggable>
</template> </template>

View File

@ -183,7 +183,7 @@ export default {
required: true, required: true,
}, },
}, },
data: function() { data() {
return { return {
// Rename action // Rename action
showRenameLabel: true, showRenameLabel: true,

View File

@ -101,7 +101,7 @@ export default {
ActionText, ActionText,
AppNavigationItem, AppNavigationItem,
}, },
data: function() { data() {
return { return {
// Open state // Open state
isOpen: false, isOpen: false,

View File

@ -104,7 +104,7 @@ export default {
required: true, required: true,
}, },
}, },
data: function() { data() {
return { return {
// copy subscription link: // copy subscription link:
showCopySubscriptionLinkLabel: true, showCopySubscriptionLinkLabel: true,

View File

@ -236,19 +236,24 @@ export default {
max-width: 40vw; max-width: 40vw;
margin: 2vw; margin: 2vw;
} }
table { table {
width: 100%; width: 100%;
} }
th, td { th, td {
padding: 4px; padding: 4px;
} }
th { th {
color: var(--color-text-maxcontrast) color: var(--color-text-maxcontrast)
} }
.name { .name {
// Take remaining width to prevent whitespace on the right side // Take remaining width to prevent whitespace on the right side
width: 100vw; width: 100vw;
} }
.item { .item {
display: flex; display: flex;
@ -256,15 +261,18 @@ th {
color: var(--color-text-maxcontrast) color: var(--color-text-maxcontrast)
} }
} }
.deletedAt { .deletedAt {
text-align: right; text-align: right;
} }
.footer { .footer {
color: var(--color-text-lighter); color: var(--color-text-lighter);
text-align: center; text-align: center;
font-size: small; font-size: small;
margin-top: 16px; margin-top: 16px;
} }
.color-dot { .color-dot {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;

View File

@ -157,7 +157,7 @@ export default {
default: false, default: false,
}, },
}, },
data: function() { data() {
return { return {
savingBirthdayCalendar: false, savingBirthdayCalendar: false,
savingEventLimit: false, savingEventLimit: false,

View File

@ -68,6 +68,8 @@ export default {
return this.$store.getters.getCalendarById(calendarId) return this.$store.getters.getCalendarById(calendarId)
}, },
calendars() { calendars() {
// TODO: remove once the false positive is fixed upstream
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
const calendars = this.$store.getters.sortedCalendarFilteredByComponents( const calendars = this.$store.getters.sortedCalendarFilteredByComponents(
this.file.parser.containsVEvents(), this.file.parser.containsVEvents(),
this.file.parser.containsVJournals(), this.file.parser.containsVJournals(),

View File

@ -71,29 +71,29 @@ export default {
if (this.unit === 'seconds') { if (this.unit === 'seconds') {
options.push({ options.push({
'label': this.$n('calendar', 'second', 'seconds', this.count), label: this.$n('calendar', 'second', 'seconds', this.count),
'unit': 'seconds', unit: 'seconds',
}) })
} }
if (!this.isAllDay || ['minutes', 'hours'].indexOf(this.unit) !== -1) { if (!this.isAllDay || ['minutes', 'hours'].indexOf(this.unit) !== -1) {
options.push({ options.push({
'label': this.$n('calendar', 'minute', 'minutes', this.count), label: this.$n('calendar', 'minute', 'minutes', this.count),
'unit': 'minutes', unit: 'minutes',
}) })
options.push({ options.push({
'label': this.$n('calendar', 'hour', 'hours', this.count), label: this.$n('calendar', 'hour', 'hours', this.count),
'unit': 'hours', unit: 'hours',
}) })
} }
options.push({ options.push({
'label': this.$n('calendar', 'day', 'days', this.count), label: this.$n('calendar', 'day', 'days', this.count),
'unit': 'days', unit: 'days',
}) })
options.push({ options.push({
'label': this.$n('calendar', 'week', 'weeks', this.count), label: this.$n('calendar', 'week', 'weeks', this.count),
'unit': 'weeks', unit: 'weeks',
}) })
return options return options

View File

@ -172,7 +172,7 @@ export default {
let title = attendee.commonName || attendee.uri.substr(7) let title = attendee.commonName || attendee.uri.substr(7)
if (attendee === this.organizer) { if (attendee === this.organizer) {
title = this.$t('calendar', '{organizer} (organizer)', { title = this.$t('calendar', '{organizer} (organizer)', {
organizer: title organizer: title,
}) })
} }

View File

@ -150,6 +150,7 @@ export default {
opacity: .45; opacity: .45;
position: relative; position: relative;
} }
.avatar-participation-status__text { .avatar-participation-status__text {
opacity: .45; opacity: .45;
left: 69px; left: 69px;

View File

@ -180,6 +180,7 @@ export default {
.invitees-list-item__displayname { .invitees-list-item__displayname {
margin-bottom: 17px; margin-bottom: 17px;
} }
.avatar-participation-status { .avatar-participation-status {
margin-top: 5px; margin-top: 5px;
} }

View File

@ -193,7 +193,7 @@ export default {
arr.push({ arr.push({
calendarUserType: 'INDIVIDUAL', calendarUserType: 'INDIVIDUAL',
commonName: result.name, commonName: result.name,
email: email, email,
isUser: false, isUser: false,
avatar: result.photo, avatar: result.photo,
language: result.lang, language: result.lang,
@ -221,7 +221,7 @@ export default {
} }
if (this.alreadyInvitedEmails.includes(principal.email)) { if (this.alreadyInvitedEmails.includes(principal.email)) {
return return false
} }
// We do not support GROUPS for now // We do not support GROUPS for now

View File

@ -87,6 +87,7 @@ export default {
.invitees-list-item__displayname { .invitees-list-item__displayname {
margin-bottom: 13px; margin-bottom: 13px;
} }
.invitees-list-item__organizer-hint { .invitees-list-item__organizer-hint {
margin-bottom: 14px; margin-bottom: 14px;
} }

View File

@ -51,20 +51,20 @@ export default {
computed: { computed: {
options() { options() {
return [{ return [{
'label': this.$t('calendar', 'never'), label: this.$t('calendar', 'never'),
'freq': 'NONE', freq: 'NONE',
}, { }, {
'label': this.$n('calendar', 'day', 'days', this.count), label: this.$n('calendar', 'day', 'days', this.count),
'freq': 'DAILY', freq: 'DAILY',
}, { }, {
'label': this.$n('calendar', 'week', 'weeks', this.count), label: this.$n('calendar', 'week', 'weeks', this.count),
'freq': 'WEEKLY', freq: 'WEEKLY',
}, { }, {
'label': this.$n('calendar', 'month', 'months', this.count), label: this.$n('calendar', 'month', 'months', this.count),
'freq': 'MONTHLY', freq: 'MONTHLY',
}, { }, {
'label': this.$n('calendar', 'year', 'years', this.count), label: this.$n('calendar', 'year', 'years', this.count),
'freq': 'YEARLY', freq: 'YEARLY',
}] }]
}, },
selected() { selected() {

View File

@ -6,10 +6,10 @@
:options="calendars" :options="calendars"
:value="calendar" :value="calendar"
@select="change"> @select="change">
<template v-slot:singleLabel="scope"> <template #singleLabel="scope">
<CalendarPickerOption v-bind="scope.option" /> <CalendarPickerOption v-bind="scope.option" />
</template> </template>
<template v-slot:option="scope"> <template #option="scope">
<CalendarPickerOption v-bind="scope.option" /> <CalendarPickerOption v-bind="scope.option" />
</template> </template>
</Multiselect> </Multiselect>

View File

@ -40,7 +40,7 @@
@close="close" @close="close"
@change="change" @change="change"
@pick="pickDate"> @pick="pickDate">
<template v-slot:icon-calendar> <template #icon-calendar>
<button <button
class="datetime-picker-inline-icon icon" class="datetime-picker-inline-icon icon"
:class="{'icon-timezone': !isAllDay, 'icon-new-calendar': isAllDay, 'datetime-picker-inline-icon--highlighted': highlightTimezone}" :class="{'icon-timezone': !isAllDay, 'icon-new-calendar': isAllDay, 'datetime-picker-inline-icon--highlighted': highlightTimezone}"
@ -62,7 +62,7 @@
</template> </template>
<template <template
v-if="!isAllDay" v-if="!isAllDay"
v-slot:footer> #footer>
<button <button
v-if="!showTimePanel" v-if="!showTimePanel"
class="mx-btn mx-btn-text" class="mx-btn mx-btn-text"

View File

@ -58,7 +58,7 @@ export default function(store) {
let timeRangeId let timeRangeId
try { try {
timeRangeId = await store.dispatch('getEventsFromCalendarInTimeRange', { timeRangeId = await store.dispatch('getEventsFromCalendarInTimeRange', {
calendar: calendar, calendar,
from: start, from: start,
to: end, to: end,
}) })

View File

@ -137,7 +137,7 @@ export default function(organizer, attendees, resources) {
groupId: 'free-busy-blocked-for-all', groupId: 'free-busy-blocked-for-all',
start: slot.start.toISOString(), start: slot.start.toISOString(),
end: slot.end.toISOString(), end: slot.end.toISOString(),
resourceIds: resourceIds, resourceIds,
display: 'background', display: 'background',
allDay: false, allDay: false,
backgroundColor: 'var(--color-text-maxcontrast)', backgroundColor: 'var(--color-text-maxcontrast)',

View File

@ -35,7 +35,7 @@ const getClient = () => {
}, () => { }, () => {
const headers = { const headers = {
'X-Requested-With': 'XMLHttpRequest', 'X-Requested-With': 'XMLHttpRequest',
'requesttoken': getRequestToken(), requesttoken: getRequestToken(),
'X-NC-CalDAV-Webcal-Caching': 'On', 'X-NC-CalDAV-Webcal-Caching': 'On',
} }
const xhr = new XMLHttpRequest() const xhr = new XMLHttpRequest()

View File

@ -33,7 +33,7 @@ import { generateUrl, generateOcsUrl } from '@nextcloud/router'
export async function createTalkRoom(eventTitle = null) { export async function createTalkRoom(eventTitle = null) {
let response let response
try { try {
response = await HTTPClient.post(generateOcsUrl('apps/spreed/api/v1', 2) + `room`, { response = await HTTPClient.post(generateOcsUrl('apps/spreed/api/v1', 2) + 'room', {
roomType: 3, roomType: 3,
roomName: eventTitle || t('calendar', 'Chat room for event'), roomName: eventTitle || t('calendar', 'Chat room for event'),
}) })

View File

@ -1437,7 +1437,7 @@ const actions = {
const defaultReminder = parseInt(settings.state.defaultReminder) const defaultReminder = parseInt(settings.state.defaultReminder)
if (!isNaN(defaultReminder)) { if (!isNaN(defaultReminder)) {
commit('addAlarmToCalendarObjectInstance', { commit('addAlarmToCalendarObjectInstance', {
calendarObjectInstance: calendarObjectInstance, calendarObjectInstance,
type: 'DISPLAY', type: 'DISPLAY',
totalSeconds: defaultReminder, totalSeconds: defaultReminder,
}) })
@ -1521,7 +1521,7 @@ const actions = {
if (original !== null && fork !== null && original.root !== fork.root) { if (original !== null && fork !== null && original.root !== fork.root) {
await dispatch('createCalendarObjectFromFork', { await dispatch('createCalendarObjectFromFork', {
eventComponent: fork, eventComponent: fork,
calendarId: calendarId, calendarId,
}) })
} }
} }

View File

@ -984,17 +984,13 @@ const actions = {
components.push('VTODO') components.push('VTODO')
} }
try { const response = await createCalendar(displayName, color, components, 0)
const response = await createCalendar(displayName, color, components, 0) const calendar = mapDavCollectionToCalendar(response, context.getters.getCurrentUserPrincipal)
const calendar = mapDavCollectionToCalendar(response, context.getters.getCurrentUserPrincipal) context.commit('addCalendar', { calendar })
context.commit('addCalendar', { calendar }) context.commit('setCalendarForFileId', {
context.commit('setCalendarForFileId', { fileId: file.id,
fileId: file.id, calendarId: calendar.id,
calendarId: calendar.id, })
})
} catch (error) {
throw error
}
} }
} }

View File

@ -61,7 +61,7 @@ export function getSortedTimezoneList(timezoneList = [], additionalTimezones = [
} }
sortedByContinent[continent].regions.push({ sortedByContinent[continent].regions.push({
label: label, label,
cities: [], cities: [],
timezoneId, timezoneId,
}) })

View File

@ -121,7 +121,7 @@ export default {
computed: { computed: {
...mapGetters({ ...mapGetters({
timezoneId: 'getResolvedTimezone', timezoneId: 'getResolvedTimezone',
'hasTrashBin': 'hasTrashBin', hasTrashBin: 'hasTrashBin',
}, },
), ),
...mapState({ ...mapState({

View File

@ -46,13 +46,13 @@
</EmptyContent> </EmptyContent>
</template> </template>
<template v-slot:header> <template #header>
<IllustrationHeader :color="illustrationColor" :illustration-url="backgroundImage" /> <IllustrationHeader :color="illustrationColor" :illustration-url="backgroundImage" />
</template> </template>
<template <template
v-if="!isLoading && !isError" v-if="!isLoading && !isError"
v-slot:secondary-actions> #secondary-actions>
<ActionLink v-if="hasDownloadURL" <ActionLink v-if="hasDownloadURL"
icon="icon-download" icon="icon-download"
:href="downloadURL"> :href="downloadURL">
@ -71,7 +71,7 @@
<template <template
v-if="!isLoading && !isError" v-if="!isLoading && !isError"
v-slot:description> #description>
<PropertyCalendarPicker <PropertyCalendarPicker
v-if="showCalendarPicker" v-if="showCalendarPicker"
:calendars="calendars" :calendars="calendars"

View File

@ -159,6 +159,17 @@ export default {
mixins: [ mixins: [
EditorMixin, EditorMixin,
], ],
beforeRouteUpdate(to, from, next) {
const isNew = to.name === 'NewPopoverView'
this.$refs.popover
.$children[0]
.$refs.trigger = this.getDomElementForPopover(isNew, to)
this.$refs.popover
.$children[0]
.$_restartPopper()
next()
},
data() { data() {
return { return {
placement: 'auto', placement: 'auto',
@ -227,7 +238,7 @@ export default {
this.placement = 'auto' this.placement = 'auto'
if (!matchingDomObject) { if (!matchingDomObject) {
matchingDomObject = document.querySelector(`.fc-event[data-is-new="yes"]`) matchingDomObject = document.querySelector('.fc-event[data-is-new="yes"]')
} }
} else { } else {
const objectId = route.params.object const objectId = route.params.object
@ -250,16 +261,5 @@ export default {
return matchingDomObject return matchingDomObject
}, },
}, },
beforeRouteUpdate(to, from, next) {
const isNew = to.name === 'NewPopoverView'
this.$refs.popover
.$children[0]
.$refs.trigger = this.getDomElementForPopover(isNew, to)
this.$refs.popover
.$children[0]
.$_restartPopper()
next()
},
} }
</script> </script>