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: {
formatDateRage,
},
data: function() {
data() {
return {
isDatepickerOpen: false,
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -68,6 +68,8 @@ export default {
return this.$store.getters.getCalendarById(calendarId)
},
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(
this.file.parser.containsVEvents(),
this.file.parser.containsVJournals(),

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -33,7 +33,7 @@ import { generateUrl, generateOcsUrl } from '@nextcloud/router'
export async function createTalkRoom(eventTitle = null) {
let response
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,
roomName: eventTitle || t('calendar', 'Chat room for event'),
})

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -159,6 +159,17 @@ export default {
mixins: [
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() {
return {
placement: 'auto',
@ -227,7 +238,7 @@ export default {
this.placement = 'auto'
if (!matchingDomObject) {
matchingDomObject = document.querySelector(`.fc-event[data-is-new="yes"]`)
matchingDomObject = document.querySelector('.fc-event[data-is-new="yes"]')
}
} else {
const objectId = route.params.object
@ -250,16 +261,5 @@ export default {
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>