linting fixes

Signed-off-by: Georg Ehrke <developer@georgehrke.com>
This commit is contained in:
Georg Ehrke 2019-10-29 09:48:06 +01:00
parent 55ed585bda
commit d834280d6d
No known key found for this signature in database
GPG Key ID: 9D98FD9380A1CB43
109 changed files with 992 additions and 1013 deletions

View File

@ -42,13 +42,13 @@ export default {
AppNavigationHeaderDatePicker,
AppNavigationHeaderTodayButton,
AppNavigationHeaderNewEvent,
AppNavigationHeaderViewMenu
AppNavigationHeaderViewMenu,
},
props: {
isPublic: {
type: Boolean,
required: true
}
}
required: true,
},
},
}
</script>

View File

@ -54,7 +54,7 @@
import {
getYYYYMMDDFromDate,
getDateFromFirstdayParam,
modifyDate
modifyDate,
} from '../../../utils/date.js'
import formatDateRage from '../../../filters/dateRangeFormat.js'
import DatePicker from '../../Shared/DatePicker.vue'
@ -62,14 +62,14 @@ import DatePicker from '../../Shared/DatePicker.vue'
export default {
name: 'AppNavigationHeaderDatePicker',
components: {
DatePicker
DatePicker,
},
filters: {
formatDateRage
formatDateRage,
},
data: function() {
return {
isDatepickerOpen: false
isDatepickerOpen: false,
}
},
computed: {
@ -104,7 +104,7 @@ export default {
},
view() {
return this.$route.params.view
}
},
},
methods: {
navigateToPreviousTimeRange() {
@ -119,20 +119,20 @@ export default {
switch (this.$route.params.view) {
case 'timeGridDay':
newDate = modifyDate(this.selectedDate, {
day: factor
day: factor,
})
break
case 'timeGridWeek':
newDate = modifyDate(this.selectedDate, {
week: factor
week: factor,
})
break
case 'dayGridMonth':
default:
newDate = modifyDate(this.selectedDate, {
month: factor
month: factor,
})
break
}
@ -142,7 +142,7 @@ export default {
navigateToDate(date) {
const name = this.$route.name
const params = Object.assign({}, this.$route.params, {
firstDay: getYYYYMMDDFromDate(date)
firstDay: getYYYYMMDDFromDate(date),
})
// Don't push new route when day didn't change
@ -162,7 +162,7 @@ export default {
doNothing() {
// This function does nothing in itself,
// it only captures and prevents the mousedown and mouseup of vue2-datepicker
}
}
},
},
}
</script>

View File

@ -52,7 +52,7 @@ export default {
const params = Object.assign({}, this.$store.state.route.params, {
allDay: '0',
dtstart: String(Math.floor(start.getTime() / 1000)),
dtend: String(Math.floor(end.getTime() / 1000))
dtend: String(Math.floor(end.getTime() / 1000)),
})
// Don't push new route when day didn't change
@ -64,7 +64,7 @@ export default {
}
this.$router.push({ name, params })
}
}
},
},
}
</script>

View File

@ -38,13 +38,13 @@ export default {
computed: {
title() {
return moment().format('ll')
}
},
},
methods: {
today() {
const name = this.$route.name
const params = Object.assign({}, this.$route.params, {
firstDay: 'now'
firstDay: 'now',
})
// Don't push new route when day didn't change
@ -53,7 +53,7 @@ export default {
}
this.$router.push({ name, params })
}
}
},
},
}
</script>

View File

@ -38,22 +38,22 @@ export default {
name: 'AppNavigationHeaderViewMenu',
components: {
Actions,
ActionButton
ActionButton,
},
computed: {
views() {
return [{
id: 'timeGridDay',
icon: 'icon-view-day',
label: this.$t('calendar', 'Day')
label: this.$t('calendar', 'Day'),
}, {
id: 'timeGridWeek',
icon: 'icon-view-week',
label: this.$t('calendar', 'Week')
label: this.$t('calendar', 'Week'),
}, {
id: 'dayGridMonth',
icon: 'icon-view-module',
label: this.$t('calendar', 'Month')
label: this.$t('calendar', 'Month'),
}]
},
defaultIcon() {
@ -64,13 +64,13 @@ export default {
}
return 'icon-toggle-pictures'
}
},
},
methods: {
selectView(viewName) {
const name = this.$route.name
const params = Object.assign({}, this.$route.params, {
view: viewName
view: viewName,
})
// Don't push new route when view didn't change
@ -79,7 +79,7 @@ export default {
}
this.$router.push({ name, params })
}
}
},
},
}
</script>

View File

@ -49,7 +49,7 @@
<script>
import {
mapGetters
mapGetters,
} from 'vuex'
import { AppNavigationSpacer } from '@nextcloud/vue'
import CalendarListNew from './CalendarList/CalendarListNew.vue'
@ -64,22 +64,22 @@ export default {
CalendarListNew,
CalendarListItem,
CalendarListItemLoadingPlaceholder,
PublicCalendarListItem
PublicCalendarListItem,
},
props: {
isPublic: {
type: Boolean,
required: true
required: true,
},
loadingCalendars: {
type: Boolean,
default: false
}
default: false,
},
},
computed: {
...mapGetters({
allCalendars: 'sortedCalendarsSubscriptions',
subscriptions: 'sortedSubscriptions'
subscriptions: 'sortedSubscriptions',
}),
newCalendarKey() {
return this._uid + '-new-calendar'
@ -89,7 +89,7 @@ export default {
},
spacerKey() {
return this._uid + '-spacer'
}
}
},
},
}
</script>

View File

@ -31,7 +31,7 @@ export default {
methods: {
onClick(event) {
this.$emit('click', event)
}
}
},
},
}
</script>

View File

@ -144,11 +144,11 @@ import {
ActionLink,
ActionText,
AppNavigationIconBullet,
AppNavigationItem
AppNavigationItem,
} from '@nextcloud/vue'
import ClickOutside from 'vue-click-outside'
import {
generateRemoteUrl
generateRemoteUrl,
} from '@nextcloud/router'
import AppNavigationDisabledCalendarIconBullet from './AppNavigationDisabledCalendarIconBullet.vue'
@ -170,16 +170,16 @@ export default {
AppNavigationItem,
CalendarListItemSharingSearch,
CalendarListItemSharingPublishItem,
CalendarListItemSharingShareItem
CalendarListItemSharingShareItem,
},
directives: {
ClickOutside
ClickOutside,
},
props: {
calendar: {
type: Object,
required: true
}
required: true,
},
},
data: function() {
return {
@ -196,7 +196,7 @@ export default {
// Deleting
deleteInterval: null,
deleteTimeout: null,
countdown: 7
countdown: 7,
}
},
computed: {
@ -307,7 +307,7 @@ export default {
}
return ''
}
},
},
methods: {
/**
@ -424,7 +424,7 @@ export default {
const newName = event.target.querySelector('input[type=text]').value
this.$store.dispatch('renameCalendar', {
calendar: this.calendar,
newName
newName,
})
.then(() => {
this.showRenameLabel = true
@ -465,7 +465,7 @@ export default {
const newColor = event.target.querySelector('input[type=color]').value
this.$store.dispatch('changeCalendarColor', {
calendar: this.calendar,
newColor
newColor,
})
.then(() => {
this.showColorLabel = true
@ -480,7 +480,7 @@ export default {
this.showColorInput = true
this.showColorSaving = false
})
}
}
},
},
}
</script>

View File

@ -27,6 +27,6 @@
<script>
export default {
name: 'CalendarListItemLoadingPlaceholder'
name: 'CalendarListItemLoadingPlaceholder',
}
</script>

View File

@ -133,12 +133,12 @@ import {
ActionButton,
ActionInput,
ActionText,
AppNavigationItem
AppNavigationItem,
} from '@nextcloud/vue'
import ClickOutside from 'vue-click-outside'
import {
generateRemoteUrl,
linkTo
linkTo,
} from '@nextcloud/router'
export default {
@ -148,16 +148,16 @@ export default {
ActionButton,
ActionInput,
ActionText,
AppNavigationItem
AppNavigationItem,
},
directives: {
ClickOutside
ClickOutside,
},
props: {
calendar: {
type: Object,
required: true
}
required: true,
},
},
data() {
return {
@ -183,13 +183,13 @@ export default {
// delete public link
unpublishingCalendar: false,
// Status of actions menu:
menuOpen: false
menuOpen: false,
}
},
computed: {
isPublished() {
return this.calendar.publishURL !== null
}
},
},
methods: {
publishCalendar() {
@ -338,8 +338,8 @@ export default {
this.unpublishingCalendar = false
this.$toast.error(this.$t('calendar', 'Unpublishing calendar failed'))
})
}
},
}
},
}
</script>

View File

@ -54,19 +54,19 @@ import { Multiselect } from '@nextcloud/vue'
export default {
name: 'CalendarListItemSharingSearch',
components: {
Multiselect
Multiselect,
},
props: {
calendar: {
type: Object,
required: true
}
required: true,
},
},
data() {
return {
isLoading: false,
inputGiven: false,
usersOrGroups: []
usersOrGroups: [],
}
},
methods: {
@ -87,7 +87,7 @@ export default {
displayName,
uri,
isGroup,
isCircle
isCircle,
})
},
@ -119,7 +119,7 @@ export default {
return Promise.all([davPromise, ocsPromise]).then(([davResults, ocsResults]) => {
this.usersOrGroups = [
...davResults,
...ocsResults
...ocsResults,
]
this.isLoading = false
@ -162,7 +162,7 @@ export default {
isGroup,
isCircle: false,
isNoUser: isGroup,
search: query
search: query,
})
return list
}, [])
@ -181,8 +181,8 @@ export default {
format: 'json',
search: query,
perPage: 200,
itemType: 'principals'
}
itemType: 'principals',
},
})
.catch(() => [])
.then(results => results.data.ocs.data.circles)
@ -200,11 +200,11 @@ export default {
isGroup: false,
isCircle: true,
isNoUser: true,
search: query
search: query,
}))
})
}
}
},
},
}
</script>

View File

@ -53,7 +53,7 @@ import {
ActionButton,
ActionCheckbox,
AppNavigationItem,
Avatar
Avatar,
} from '@nextcloud/vue'
export default {
@ -62,27 +62,27 @@ export default {
ActionButton,
ActionCheckbox,
AppNavigationItem,
Avatar
Avatar,
},
props: {
calendar: {
type: Object,
required: true
required: true,
},
sharee: {
type: Object,
required: true
}
required: true,
},
},
data() {
return {
updatingSharee: false
updatingSharee: false,
}
},
computed: {
uid() {
return this._uid
}
},
},
methods: {
/**
@ -120,7 +120,7 @@ export default {
this.updatingSharee = false
})
}
}
},
},
}
</script>

View File

@ -93,7 +93,7 @@ export default {
ActionButton,
ActionInput,
ActionText,
AppNavigationItem
AppNavigationItem,
},
data: function() {
return {
@ -110,7 +110,7 @@ export default {
// New subscription
showCreateSubscriptionLabel: true,
showCreateSubscriptionInput: false,
showCreateSubscriptionSaving: false
showCreateSubscriptionSaving: false,
}
},
watch: {
@ -120,7 +120,7 @@ export default {
}
this.closeMenu()
}
},
},
methods: {
/**
@ -185,7 +185,7 @@ export default {
try {
await this.$store.dispatch('appendCalendar', {
displayName,
color: uidToHexColor(displayName)
color: uidToHexColor(displayName),
})
} catch (error) {
console.debug(error)
@ -212,7 +212,7 @@ export default {
await this.$store.dispatch('appendCalendar', {
displayName,
color: uidToHexColor(displayName),
components: ['VEVENT', 'VTODO']
components: ['VEVENT', 'VTODO'],
})
} catch (error) {
console.debug(error)
@ -249,7 +249,7 @@ export default {
await this.$store.dispatch('appendSubscription', {
displayName: hostname,
color: uidToHexColor(link),
source: link
source: link,
})
} catch (error) {
console.debug(error)
@ -274,7 +274,7 @@ export default {
this.showCreateSubscriptionLabel = true
this.showCreateSubscriptionInput = false
this.showCreateSubscriptionSaving = false
}
}
},
},
}
</script>

View File

@ -79,10 +79,10 @@ import {
ActionLink,
ActionText,
AppNavigationIconBullet,
AppNavigationItem
AppNavigationItem,
} from '@nextcloud/vue'
import {
generateRemoteUrl
generateRemoteUrl,
} from '@nextcloud/router'
export default {
@ -93,13 +93,13 @@ export default {
ActionLink,
ActionText,
AppNavigationIconBullet,
AppNavigationItem
AppNavigationItem,
},
props: {
calendar: {
type: Object,
required: true
}
required: true,
},
},
data: function() {
return {
@ -109,7 +109,7 @@ export default {
showCopySubscriptionLinkSuccess: false,
showCopySubscriptionLinkError: false,
// Status of actions menu:
menuOpen: false
menuOpen: false,
}
},
computed: {
@ -133,13 +133,13 @@ export default {
}
// 'dav/principals/users/'.length => 21
let userId = this.calendar.owner.substr(lastIndex + 21)
const userId = this.calendar.owner.substr(lastIndex + 21)
if (userId.endsWith('/')) {
return userId.slice(0, -1)
}
return userId
}
},
},
methods: {
copySubscriptionLink() {
@ -150,7 +150,7 @@ export default {
this.showCopySubscriptionLinkError = false
const rootURL = generateRemoteUrl('dav')
let url = new URL(this.calendar.url + '?export', rootURL)
const url = new URL(this.calendar.url + '?export', rootURL)
if (url.protocol === 'http:') {
url.protocol = 'webcal:'
@ -189,9 +189,9 @@ export default {
},
toggleEnabled() {
this.$store.commit('toggleCalendarEnabled', {
calendar: this.calendar
calendar: this.calendar,
})
}
}
},
},
}
</script>

View File

@ -40,13 +40,13 @@ export default {
computed: {
title() {
return moment().format('ll')
}
},
},
methods: {
today() {
const name = this.$route.name
const params = Object.assign({}, this.$route.params, {
firstDay: 'now'
firstDay: 'now',
})
// Don't push new route when day didn't change
@ -55,7 +55,7 @@ export default {
}
this.$router.push({ name, params })
}
}
},
},
}
</script>

View File

@ -49,13 +49,13 @@ export default {
},
selectedView() {
return this.$route.params.view
}
},
},
methods: {
view(viewName) {
const name = this.$route.name
const params = Object.assign({}, this.$route.params, {
view: viewName
view: viewName,
})
// Don't push new route when view didn't change
@ -64,7 +64,7 @@ export default {
}
this.$router.push({ name, params })
}
}
},
},
}
</script>

View File

@ -36,10 +36,10 @@
import {
Actions,
ActionButton,
ActionLink
ActionLink,
} from '@nextcloud/vue'
import {
mapGetters
mapGetters,
} from 'vuex'
import { generateRemoteUrl } from '@nextcloud/router'
@ -55,17 +55,17 @@ export default {
AppNavigationHeaderViewButtons,
Actions,
ActionButton,
ActionLink
ActionLink,
},
computed: {
...mapGetters({
subscriptions: 'sortedSubscriptions'
})
subscriptions: 'sortedSubscriptions',
}),
},
methods: {
copySubscriptionLink(calendar) {
const rootURL = generateRemoteUrl('dav')
let url = new URL(calendar.url + '?export', rootURL)
const url = new URL(calendar.url + '?export', rootURL)
if (url.protocol === 'http:') {
url.protocol = 'webcal:'
@ -82,7 +82,7 @@ export default {
.catch(e => {
this.$toast.error(this.$t('calendar', 'Calendar link could not be copied to clipboard.'))
})
}
}
},
},
}
</script>

View File

@ -66,14 +66,14 @@
import {
ActionButton,
ActionCheckbox,
AppNavigationSettings
AppNavigationSettings,
} from '@nextcloud/vue'
import {
generateRemoteUrl
generateRemoteUrl,
} from '@nextcloud/router'
import {
mapGetters,
mapState
mapState,
} from 'vuex'
import SettingsImportSection from './Settings/SettingsImportSection.vue'
@ -88,31 +88,31 @@ export default {
ActionCheckbox,
AppNavigationSettings,
SettingsImportSection,
SettingsTimezoneSelect
SettingsTimezoneSelect,
},
props: {
loadingCalendars: {
type: Boolean,
default: false
}
default: false,
},
},
data: function() {
return {
savingBirthdayCalendar: false,
savingPopover: false,
savingWeekend: false,
savingWeekNumber: false
savingWeekNumber: false,
}
},
computed: {
...mapGetters({
birthdayCalendar: 'hasBirthdayCalendar'
birthdayCalendar: 'hasBirthdayCalendar',
}),
...mapState({
showPopover: state => !state.settings.skipPopover,
showWeekends: state => state.settings.showWeekends,
showWeekNumbers: state => state.settings.showWeekNumbers,
timezone: state => state.settings.timezone
timezone: state => state.settings.timezone,
}),
isBirthdayCalendarDisabled() {
return this.savingBirthdayCalendar || this.loadingCalendars
@ -128,7 +128,7 @@ export default {
},
showProgressBar() {
return this.$store.state.importState.importState.stage === 'importing'
}
},
},
methods: {
toggleBirthdayEnabled() {
@ -198,7 +198,7 @@ export default {
this.$copyText(url)
.then(e => this.$toast.success(this.$t('calendar', 'CalDAV link copied to clipboard.')))
.catch(e => this.$toast.error(this.$t('calendar', 'CalDAV link could not be copied to clipboard.')))
}
}
},
},
}
</script>

View File

@ -55,25 +55,25 @@
<script>
import ImportScreenRow from './ImportScreenRow.vue'
import {
Modal
Modal,
} from '@nextcloud/vue'
export default {
name: 'ImportScreen',
components: {
ImportScreenRow,
Modal
Modal,
},
props: {
files: {
type: Array,
required: true
}
required: true,
},
},
computed: {
headerRowKey() {
return this._uid + '-header-row'
}
},
},
methods: {
importCalendar() {
@ -81,7 +81,7 @@ export default {
},
cancelImport() {
this.$emit('cancel-import')
}
}
},
},
}
</script>

View File

@ -39,13 +39,13 @@ import { uidToHexColor } from '../../../utils/color.js'
export default {
name: 'ImportScreenRow',
components: {
CalendarPicker
CalendarPicker,
},
props: {
file: {
type: Object,
required: true
}
required: true,
},
},
computed: {
calendar() {
@ -61,7 +61,7 @@ export default {
displayName: this.$t('calendar', 'New calendar'),
isSharedWithMe: false,
color: uidToHexColor(this.$t('calendar', 'New calendar')),
owner: this.$store.getters.getCurrentUserPrincipal.url
owner: this.$store.getters.getCurrentUserPrincipal.url,
}
}
@ -79,25 +79,25 @@ export default {
displayName: this.$t('calendar', 'New calendar'),
isSharedWithMe: false,
color: uidToHexColor(this.$t('calendar', 'New calendar')),
owner: this.$store.getters.getCurrentUserPrincipal.url
owner: this.$store.getters.getCurrentUserPrincipal.url,
})
return calendars
}
},
},
methods: {
selectCalendar(newCalendar) {
this.$store.commit('setCalendarForFileId', {
fileId: this.file.id,
calendarId: newCalendar.id
calendarId: newCalendar.id,
})
},
setDefaultCalendarId() {
this.$store.commit('setCalendarForFileId', {
fileId: this.file.id,
calendarId: this.calendars[0].id
calendarId: this.calendars[0].id,
})
}
}
},
},
}
</script>

View File

@ -49,7 +49,7 @@
<script>
import {
mapState
mapState,
} from 'vuex'
import { getParserManager } from 'calendar-js'
import ImportScreen from './ImportScreen.vue'
@ -58,13 +58,13 @@ import { readFileAsText } from '../../../services/readFileAsTextService.js'
export default {
name: 'SettingsImportSection',
components: {
ImportScreen
ImportScreen,
},
props: {
isDisabled: {
type: Boolean,
required: true
}
required: true,
},
},
computed: {
...mapState({
@ -72,7 +72,7 @@ export default {
stage: state => state.importState.stage,
total: state => state.importState.total,
accepted: state => state.importState.accepted,
denied: state => state.importState.denied
denied: state => state.importState.denied,
}),
/**
* Total amount of processed calendar-objects, either accepted or failed
@ -134,7 +134,7 @@ export default {
*/
disableImport() {
return this.isDisabled || !this.allowUploadOfFiles
}
},
},
methods: {
/**
@ -166,7 +166,7 @@ export default {
const parser = getParserManager().getParserForFileType(type, {
extractGlobalProperties: true,
includeTimezones: true,
removeRSVPForAttendees: true
removeRSVPForAttendees: true,
})
parser.parse(contents)
@ -176,7 +176,7 @@ export default {
name,
size,
type,
parser
parser,
})
addedFiles = true
}
@ -200,7 +200,7 @@ export default {
} else {
this.$toast.warning(this.$t('calendar', 'Import partially failed. Imported {accepted} out of {total}.', {
accepted: this.accepted,
total: this.total
total: this.total,
}))
}
@ -214,7 +214,7 @@ export default {
cancelImport() {
this.$store.commit('removeAllFiles')
this.$store.commit('resetState')
}
}
},
},
}
</script>

View File

@ -30,7 +30,7 @@
<script>
import {
mapState
mapState,
} from 'vuex'
import TimezoneSelect from '../../Shared/TimezoneSelect.vue'
@ -39,17 +39,17 @@ import detectTimezone from '../../../services/timezoneDetectionService.js'
export default {
name: 'SettingsTimezoneSelect',
components: {
TimezoneSelect
TimezoneSelect,
},
props: {
isDisabled: {
type: Boolean,
required: true
}
required: true,
},
},
computed: {
...mapState({
timezone: state => (state.settings.timezone || 'automatic')
timezone: state => (state.settings.timezone || 'automatic'),
}),
/**
* Offer "Automatic" as an additional timezone
@ -61,10 +61,10 @@ export default {
continent: this.$t('calendar', 'Automatic'),
timezoneId: 'automatic',
label: this.$t('calendar', 'Automatic ({detected})', {
detected: detectTimezone()
})
detected: detectTimezone(),
}),
}]
}
},
},
methods: {
/**
@ -78,7 +78,7 @@ export default {
console.error(error)
this.$toast(this.$t('calendar', 'New setting was not saved successfully.'))
})
}
}
},
},
}
</script>

View File

@ -48,17 +48,17 @@ export default {
components: {
NoAlarmView,
AlarmListItem,
AlarmListNew
AlarmListNew,
},
props: {
isReadOnly: {
type: Boolean,
required: true
required: true,
},
calendarObjectInstance: {
type: Object,
required: true
}
required: true,
},
},
computed: {
alarms() {
@ -71,7 +71,7 @@ export default {
},
isListEmpty() {
return this.alarms.length === 0
}
},
},
methods: {
/**
@ -88,7 +88,7 @@ export default {
this.$store.commit('addAlarmToCalendarObjectInstance', {
calendarObjectInstance: this.calendarObjectInstance,
type: 'DISPLAY',
totalSeconds
totalSeconds,
})
return
}
@ -97,7 +97,7 @@ export default {
this.$store.commit('addAlarmToCalendarObjectInstance', {
calendarObjectInstance: this.calendarObjectInstance,
type: 'DISPLAY',
totalSeconds: defaultAlarms[defaultAlarms.length - 1]
totalSeconds: defaultAlarms[defaultAlarms.length - 1],
})
},
/**
@ -108,9 +108,9 @@ export default {
removeAlarm(alarm) {
this.$store.commit('removeAlarmFromCalendarObjectInstance', {
calendarObjectInstance: this.calendarObjectInstance,
alarm
alarm,
})
}
}
},
},
}
</script>

View File

@ -151,7 +151,7 @@
import {
Actions,
ActionButton,
ActionRadio
ActionRadio,
} from '@nextcloud/vue'
import ClickOutside from 'vue-click-outside'
import formatAlarm from '../../../filters/alarmFormat.js'
@ -168,31 +168,31 @@ export default {
AlarmTimeUnitSelect,
Actions,
ActionButton,
ActionRadio
ActionRadio,
},
directives: {
ClickOutside
ClickOutside,
},
filters: {
formatAlarm
formatAlarm,
},
props: {
alarm: {
type: Object,
required: true
required: true,
},
calendarObjectInstance: {
type: Object,
required: true
required: true,
},
isReadOnly: {
type: Boolean,
required: true
}
required: true,
},
},
data() {
return {
isEditing: false
isEditing: false,
}
},
computed: {
@ -284,9 +284,9 @@ export default {
' [',
this.$t('calendar', 'at'),
'] ',
moment.localeData().longDateFormat('LT')
moment.localeData().longDateFormat('LT'),
].join('')
}
},
},
methods: {
/**
@ -310,7 +310,7 @@ export default {
this.$store.commit('changeAlarmType', {
calendarObjectInstance: this.calendarObjectInstance,
alarm: this.alarm,
type
type,
})
},
/**
@ -323,7 +323,7 @@ export default {
this.$store.dispatch('changeAlarmFromAbsoluteToRelative', {
calendarObjectInstance: this.calendarObjectInstance,
alarm: this.alarm
alarm: this.alarm,
})
},
/**
@ -336,7 +336,7 @@ export default {
this.$store.dispatch('changeAlarmFromRelativeToAbsolute', {
calendarObjectInstance: this.calendarObjectInstance,
alarm: this.alarm
alarm: this.alarm,
})
},
/**
@ -359,7 +359,7 @@ export default {
this.$store.dispatch('changeAlarmAmountTimed', {
calendarObjectInstance: this.calendarObjectInstance,
alarm: this.alarm,
amount: selectedValue
amount: selectedValue,
})
}
},
@ -372,7 +372,7 @@ export default {
this.$store.dispatch('changeAlarmUnitTimed', {
calendarObjectInstance: this.calendarObjectInstance,
alarm: this.alarm,
unit
unit,
})
},
/**
@ -389,7 +389,7 @@ export default {
this.$store.dispatch('changeAlarmAmountAllDay', {
calendarObjectInstance: this.calendarObjectInstance,
alarm: this.alarm,
amount: selectedValue
amount: selectedValue,
})
}
},
@ -402,7 +402,7 @@ export default {
this.$store.dispatch('changeAlarmUnitAllDay', {
calendarObjectInstance: this.calendarObjectInstance,
alarm: this.alarm,
unit
unit,
})
},
/**
@ -418,7 +418,7 @@ export default {
calendarObjectInstance: this.calendarObjectInstance,
alarm: this.alarm,
hours,
minutes
minutes,
})
},
/**
@ -430,9 +430,9 @@ export default {
this.$store.commit('changeAlarmAbsoluteDate', {
calendarObjectInstance: this.calendarObjectInstance,
alarm: this.alarm,
date
date,
})
}
}
},
},
}
</script>

View File

@ -37,7 +37,7 @@ export default {
*/
addReminder() {
this.$emit('addAlarm')
}
}
},
},
}
</script>

View File

@ -33,31 +33,31 @@
<script>
import {
Multiselect
Multiselect,
} from '@nextcloud/vue'
export default {
name: 'AlarmTimeUnitSelect',
components: {
Multiselect
Multiselect,
},
props: {
unit: {
type: String,
required: true
required: true,
},
isAllDay: {
type: Boolean,
required: true
required: true,
},
count: {
type: Number,
required: true
required: true,
},
disabled: {
type: Boolean,
required: true
}
required: true,
},
},
computed: {
/**
@ -74,28 +74,28 @@ export default {
if (this.unit === 'seconds') {
options.push({
'label': this.$n('calendar', 'second', 'seconds', this.count),
'unit': 'seconds'
'unit': 'seconds',
})
}
if (!this.isAllDay || ['minutes', 'hours'].indexOf(this.unit) !== -1) {
options.push({
'label': this.$n('calendar', 'minute', 'minutes', this.count),
'unit': 'minutes'
'unit': 'minutes',
})
options.push({
'label': this.$n('calendar', 'hour', 'hours', this.count),
'unit': 'hours'
'unit': 'hours',
})
}
options.push({
'label': this.$n('calendar', 'day', 'days', this.count),
'unit': 'days'
'unit': 'days',
})
options.push({
'label': this.$n('calendar', 'week', 'weeks', this.count),
'unit': 'weeks'
'unit': 'weeks',
})
return options
@ -107,7 +107,7 @@ export default {
*/
selected() {
return this.options.find(o => o.unit === this.unit)
}
},
},
methods: {
/**
@ -121,7 +121,7 @@ export default {
}
this.$emit('change', value.unit)
}
}
},
},
}
</script>

View File

@ -31,6 +31,6 @@
<script>
export default {
name: 'NoAlarmView'
name: 'NoAlarmView',
}
</script>

View File

@ -40,17 +40,17 @@ export default {
props: {
illustrationUrl: {
type: String,
required: true
required: true,
},
color: {
type: String,
required: true,
validator: (s) => /^(#)((?:[A-Fa-f0-9]{3}){1,2})$/.test(s)
}
validator: (s) => /^(#)((?:[A-Fa-f0-9]{3}){1,2})$/.test(s),
},
},
data() {
return {
svg: ''
svg: '',
}
},
computed: {
@ -69,7 +69,7 @@ export default {
.replace(/<title>[\w\d\s-]*<\/title>/i, '')
.replace(/height="(\d)*(.(\d)*)?"/i, '')
.replace(/width="(\d)*(.(\d)*)?"/i, '')
}
},
},
watch: {
illustrationUrl: {
@ -86,9 +86,9 @@ export default {
this.svg = ''
})
},
immediate: true
}
}
immediate: true,
},
},
}
</script>

View File

@ -31,39 +31,39 @@
<script>
import {
Avatar
Avatar,
} from '@nextcloud/vue'
export default {
name: 'AvatarParticipationStatus',
components: {
Avatar
Avatar,
},
props: {
avatarLink: {
type: String,
required: true
required: true,
},
participationStatus: {
type: String,
required: true
required: true,
},
commonName: {
type: String,
required: true
required: true,
},
isViewedByOrganizer: {
type: Boolean,
required: true
required: true,
},
attendeeIsOrganizer: {
type: Boolean,
required: true
required: true,
},
organizerDisplayName: {
type: String,
required: true
}
required: true,
},
},
computed: {
tooltip() {
@ -73,47 +73,47 @@ export default {
if (this.participationStatus === 'ACCEPTED' && this.isViewedByOrganizer) {
return this.$t('calendar', '{name} accepted your invitation.', {
name: this.commonName
name: this.commonName,
})
}
if (this.participationStatus === 'ACCEPTED' && !this.isViewedByOrganizer) {
return this.$t('calendar', '{name} accepted {organizerName}\'s invitation.', {
name: this.commonName,
organizerName: this.organizerDisplayName
organizerName: this.organizerDisplayName,
})
}
if (this.participationStatus === 'DECLINED' && this.isViewedByOrganizer) {
return this.$t('calendar', '{name} declined your invitation.', {
name: this.commonName
name: this.commonName,
})
}
if (this.participationStatus === 'DECLINED' && !this.isViewedByOrganizer) {
return this.$t('calendar', '{name} declined {organizerName}\'s invitation.', {
name: this.commonName,
organizerName: this.organizerDisplayName
organizerName: this.organizerDisplayName,
})
}
if (this.participationStatus === 'DELEGATED') {
return this.$t('calendar', '{name} has delegated their invitation.', {
name: this.commonName
name: this.commonName,
})
}
if (this.participationStatus === 'TENTATIVE') {
return this.$t('calendar', '{name} marked their participation as tentative.', {
name: this.commonName
name: this.commonName,
})
}
if (this.isViewedByOrganizer) {
return this.$t('calendar', '{name} did not respond to your invitation yet.', {
name: this.commonName
name: this.commonName,
})
} else {
return this.$t('calendar', '{name} did not respond to {organizerName}\'s invitation yet.', {
name: this.commonName,
organizerName: this.organizerDisplayName
organizerName: this.organizerDisplayName,
})
}
},
@ -132,7 +132,7 @@ export default {
}
return ['no-response', 'icon', 'icon-invitees-no-response-white']
}
}
},
},
}
</script>

View File

@ -60,17 +60,17 @@ export default {
NoInviteesView,
InviteesListItem,
InviteesListSearch,
OrganizerListItem
OrganizerListItem,
},
props: {
isReadOnly: {
type: Boolean,
required: true
required: true,
},
calendarObjectInstance: {
type: Object,
required: true
}
required: true,
},
},
computed: {
inviteesWithoutOrganizer() {
@ -126,7 +126,7 @@ export default {
}
return !!principal.emailAddress
}
},
},
methods: {
addAttendee({ commonName, email, calendarUserType, language, timezoneId }) {
@ -139,7 +139,7 @@ export default {
role: 'REQ-PARTICIPANT',
rsvp: true,
language,
timezoneId
timezoneId,
})
if (!this.hasOrganizer) {
@ -151,16 +151,16 @@ export default {
this.$store.commit('setOrganizer', {
calendarObjectInstance: this.calendarObjectInstance,
commonName: principal.displayname,
email: principal.emailAddress
email: principal.emailAddress,
})
}
},
removeAttendee(attendee) {
this.$store.commit('removeAttendee', {
calendarObjectInstance: this.calendarObjectInstance,
attendee
attendee,
})
}
}
},
},
}
</script>

View File

@ -81,7 +81,7 @@ import {
Actions,
ActionCheckbox,
ActionButton,
ActionRadio
ActionRadio,
} from '@nextcloud/vue'
export default {
@ -91,21 +91,21 @@ export default {
ActionButton,
ActionCheckbox,
ActionRadio,
Actions
Actions,
},
props: {
attendee: {
type: Object,
required: true
required: true,
},
organizerDisplayName: {
type: String,
required: true
required: true,
},
isReadOnly: {
type: Boolean,
required: true
}
required: true,
},
},
computed: {
avatarLink() {
@ -141,7 +141,7 @@ export default {
isViewedByOrganizer() {
// TODO: check if also viewed by organizer
return !this.isReadOnly
}
},
},
methods: {
/**
@ -149,7 +149,7 @@ export default {
*/
toggleRSVP() {
this.$store.commit('toggleAttendeeRSVP', {
attendee: this.attendee
attendee: this.attendee,
})
},
/**
@ -160,7 +160,7 @@ export default {
changeRole(role) {
this.$store.commit('changeAttendeesRole', {
attendee: this.attendee,
role
role,
})
},
/**
@ -168,7 +168,7 @@ export default {
*/
removeAttendee() {
this.$emit('removeAttendee', this.attendee)
}
}
},
},
}
</script>

View File

@ -35,7 +35,7 @@
label="dropdownName"
@search-change="findAttendees"
@select="addAttendee">
<!-- <template slot="singleLabel" slot-scope="props"><img class="option__image" :src="props.option.img" alt="No Mans Sky"><span class="option__desc"><span class="option__title">{{ props.option.title }}</span></span></template>-->
<!--<template slot="singleLabel" slot-scope="props"><img class="option__image" :src="props.option.img" alt="No Mans Sky"><span class="option__desc"><span class="option__title">{{ props.option.title }}</span></span></template>-->
<template slot="singleLabel" slot-scope="props">
<div class="invitees-search-list-item">
<Avatar v-if="props.option.isUser" :user="props.option.avatar" :display-name="props.option.dropdownName" />
@ -80,7 +80,7 @@
<script>
import {
Avatar,
Multiselect
Multiselect,
} from '@nextcloud/vue'
import client from '../../../services/caldavService.js'
import HttpClient from '@nextcloud/axios'
@ -91,19 +91,19 @@ export default {
name: 'InviteesListSearch',
components: {
Avatar,
Multiselect
Multiselect,
},
props: {
alreadyInvitedEmails: {
type: Array,
required: true
}
required: true,
},
},
data() {
return {
isLoading: false,
inputGiven: false,
matches: []
matches: [],
}
},
computed: {
@ -112,7 +112,7 @@ export default {
},
noResult() {
return this.$t('calendar', 'No match found')
}
},
},
methods: {
findAttendees: debounce(async function(query) {
@ -122,7 +122,7 @@ export default {
if (query.length > 0) {
const promises = [
this.findAttendeesFromContactsAPI(query),
this.findAttendeesFromDAV(query)
this.findAttendeesFromDAV(query),
]
const [contactsResults, davResults] = await Promise.all(promises)
@ -144,7 +144,7 @@ export default {
language: null,
timezoneId: null,
hasMultipleEMails: false,
dropdownName: query
dropdownName: query,
})
}
}
@ -163,10 +163,10 @@ export default {
},
async findAttendeesFromContactsAPI(query) {
return HttpClient.post(linkTo('calendar', 'index.php') + '/v1/autocompletion/attendee', {
search: query
search: query,
}).then(({ data }) => {
return data.reduce((arr, result) => {
let hasMultipleEMails = result.emails.length > 1
const hasMultipleEMails = result.emails.length > 1
result.emails.forEach((email) => {
let name
@ -191,7 +191,7 @@ export default {
language: result.lang,
timezoneId: result.tzid,
hasMultipleEMails,
dropdownName: name
dropdownName: name,
})
})
@ -228,14 +228,14 @@ export default {
isUser: principal.calendarUserType === 'INDIVIDUAL',
avatar: principal.userId,
hasMultipleEMails: false,
dropdownName: principal.displayname || principal.email
dropdownName: principal.displayname || principal.email,
}
})
}).catch((e) => {
console.debug('ERROR', e)
return []
})
}
}
},
},
}
</script>

View File

@ -31,6 +31,6 @@
<script>
export default {
name: 'NoInviteesView'
name: 'NoInviteesView',
}
</script>

View File

@ -44,17 +44,17 @@ import AvatarParticipationStatus from './AvatarParticipationStatus'
export default {
name: 'OrganizerListItem',
components: {
AvatarParticipationStatus
AvatarParticipationStatus,
},
props: {
organizer: {
type: Object,
required: true
required: true,
},
isReadOnly: {
type: Boolean,
required: true
}
required: true,
},
},
computed: {
avatarLink() {
@ -74,7 +74,7 @@ export default {
},
isViewedByOrganizer() {
return true
}
}
},
},
}
</script>

View File

@ -33,6 +33,6 @@
<script>
export default {
name: 'OrganizerNoEmailError'
name: 'OrganizerNoEmailError',
}
</script>

View File

@ -54,31 +54,31 @@ export default {
name: 'PropertyCalendarPicker',
components: {
CalendarPickerOption,
CalendarPicker
CalendarPicker,
},
props: {
calendar: {
type: Object,
default: undefined
default: undefined,
},
calendars: {
type: Array,
required: true
required: true,
},
isReadOnly: {
type: Boolean,
required: true
}
required: true,
},
},
computed: {
display() {
return this.calendar !== undefined
}
},
},
methods: {
selectCalendar(value) {
this.$emit('selectCalendar', value)
}
}
},
},
}
</script>

View File

@ -58,10 +58,10 @@ import { Multiselect } from '@nextcloud/vue'
export default {
name: 'PropertySelect',
components: {
Multiselect
Multiselect,
},
mixins: [
PropertyMixin
PropertyMixin,
],
computed: {
display() {
@ -73,7 +73,7 @@ export default {
selectedValue() {
const value = this.value || this.propModel.defaultValue
return this.options.find((option) => option.value === value)
}
},
},
methods: {
changeValue(selectedOption) {
@ -82,7 +82,7 @@ export default {
}
this.$emit('update:value', selectedOption.value)
}
}
},
},
}
</script>

View File

@ -78,16 +78,16 @@ export default {
components: {
PropertySelectMultipleColoredOption,
PropertySelectMultipleColoredTag,
Multiselect
Multiselect,
},
mixins: [
PropertyMixin
PropertyMixin,
],
props: {
coloredOptions: {
type: Boolean,
default: false
}
default: false,
},
},
computed: {
display() {
@ -95,7 +95,7 @@ export default {
},
options() {
return this.propModel.options
}
},
},
methods: {
selectValue(value) {
@ -111,7 +111,7 @@ export default {
}
this.$emit('removeSingleValue', value)
}
}
},
},
}
</script>

View File

@ -35,8 +35,8 @@ export default {
props: {
option: {
type: String,
required: true
}
required: true,
},
},
computed: {
colorObject() {
@ -45,7 +45,7 @@ export default {
color() {
const color = this.colorObject
return `rgb(${color.r},${color.g},${color.b})`
}
}
},
},
}
</script>

View File

@ -35,16 +35,16 @@ export default {
props: {
option: {
type: String,
required: true
required: true,
},
search: {
type: String,
default: undefined
default: undefined,
},
remove: {
type: Function,
default: () => {}
}
default: () => {},
},
},
computed: {
colorObject() {
@ -63,9 +63,9 @@ export default {
return generateTextColorForRGB({
red: color.r,
green: color.g,
blue: color.b
blue: color.b,
})
}
}
},
},
}
</script>

View File

@ -56,10 +56,10 @@ import PropertyMixin from '../../../mixins/PropertyMixin'
export default {
name: 'PropertyText',
directives: {
autosize
autosize,
},
mixins: [
PropertyMixin
PropertyMixin,
],
computed: {
display() {
@ -73,7 +73,7 @@ export default {
}
return true
}
},
},
methods: {
changeValue(event) {
@ -82,7 +82,7 @@ export default {
} else {
this.$emit('update:value', event.target.value)
}
}
}
},
},
}
</script>

View File

@ -43,17 +43,17 @@ export default {
props: {
isReadOnly: {
type: Boolean,
required: true
required: true,
},
value: {
type: String,
default: ''
}
default: '',
},
},
methods: {
changeValue(event) {
this.$emit('update:value', event.target.value)
}
}
},
},
}
</script>

View File

@ -96,7 +96,7 @@ import DatePicker from '../../Shared/DatePicker.vue'
export default {
name: 'PropertyTitleTimePicker',
components: {
DatePicker
DatePicker,
},
props: {
/**
@ -104,42 +104,42 @@ export default {
*/
isReadOnly: {
type: Boolean,
required: true
required: true,
},
/**
* Start date of the event
*/
startDate: {
type: Date,
required: true
required: true,
},
/**
* Timezone of the start date
*/
startTimezone: {
type: String,
required: true
required: true,
},
/**
* End date of the event
*/
endDate: {
type: Date,
required: true
required: true,
},
/**
* Timezone of the end date
*/
endTimezone: {
type: String,
required: true
required: true,
},
/**
* Whether or not the event is all-day
*/
isAllDay: {
type: Boolean,
required: true
required: true,
},
/**
* Whether or not the user can toggle the all-day property
@ -147,7 +147,7 @@ export default {
*/
canModifyAllDay: {
type: Boolean,
required: true
required: true,
},
/**
* The current timezone of the user
@ -155,13 +155,13 @@ export default {
*/
userTimezone: {
type: String,
required: true
}
required: true,
},
},
data() {
return {
showStartTimezone: false,
showEndTimezone: false
showEndTimezone: false,
}
},
computed: {
@ -192,7 +192,7 @@ export default {
'[',
this.$t('calendar', 'from'),
'] ',
moment.localeData().longDateFormat('L')
moment.localeData().longDateFormat('L'),
]
if (this.isAllDay) {
@ -218,7 +218,7 @@ export default {
'[',
this.$t('calendar', 'to'),
'] ',
moment.localeData().longDateFormat('L')
moment.localeData().longDateFormat('L'),
]
if (this.isAllDay) {
@ -254,13 +254,13 @@ export default {
if (this.isAllDay) {
return this.$t('calendar', 'from {startDate}', {
startDate: moment(this.startDate).format('L'),
endDate: moment(this.endDate).format('L')
endDate: moment(this.endDate).format('L'),
})
}
return this.$t('calendar', 'from {startDate} at {startTime}', {
startDate: moment(this.startDate).format('L'),
startTime: moment(this.startDate).format('LT')
startTime: moment(this.startDate).format('LT'),
})
},
/**
@ -270,13 +270,13 @@ export default {
formattedEnd() {
if (this.isAllDay) {
return this.$t('calendar', 'to {endDate}', {
endDate: moment(this.endDate).format('L')
endDate: moment(this.endDate).format('L'),
})
}
return this.$t('calendar', 'to {endDate} at {endTime}', {
endDate: moment(this.endDate).format('L'),
endTime: moment(this.endDate).format('LT')
endTime: moment(this.endDate).format('LT'),
})
},
/**
@ -290,7 +290,7 @@ export default {
*/
highlightEndTimezone() {
return this.endTimezone !== this.userTimezone
}
},
},
methods: {
/**
@ -360,7 +360,7 @@ export default {
}
this.$emit('toggleAllDay')
}
}
},
},
}
</script>

View File

@ -28,6 +28,6 @@
<script>
export default {
name: 'PropertyTitleTimePickerLoadingPlaceholder'
name: 'PropertyTitleTimePickerLoadingPlaceholder',
}
</script>

View File

@ -114,7 +114,7 @@ export default {
RepeatFreqMonthlyOptions,
RepeatFreqWeeklyOptions,
RepeatEndRepeat,
RepeatUnsupportedWarning
RepeatUnsupportedWarning,
},
props: {
/**
@ -122,21 +122,21 @@ export default {
*/
calendarObjectInstance: {
type: Object,
required: true
required: true,
},
/**
* The recurrence-rule to display
*/
recurrenceRule: {
type: Object,
required: true
required: true,
},
/**
* Whether or not the event is read-only
*/
isReadOnly: {
type: Boolean,
required: true
required: true,
},
/**
* Whether or not the user is editing the master-item
@ -145,7 +145,7 @@ export default {
*/
isEditingMasterItem: {
type: Boolean,
required: true
required: true,
},
/**
* Whether or not this instance of the event is a recurrence-exception.
@ -153,8 +153,8 @@ export default {
*/
isRecurrenceException: {
type: Boolean,
required: true
}
required: true,
},
},
computed: {
/**
@ -188,7 +188,7 @@ export default {
*/
isFreqYearly() {
return this.recurrenceRule.frequency === 'YEARLY'
}
},
},
methods: {
/**
@ -200,7 +200,7 @@ export default {
this.$store.commit('changeRecurrenceInterval', {
calendarObjectInstance: this.calendarObjectInstance,
recurrenceRule: this.recurrenceRule,
interval
interval,
})
this.modified()
},
@ -213,7 +213,7 @@ export default {
this.$store.dispatch('changeRecurrenceFrequency', {
calendarObjectInstance: this.calendarObjectInstance,
recurrenceRule: this.recurrenceRule,
frequency
frequency,
})
this.modified()
},
@ -226,7 +226,7 @@ export default {
this.$store.commit('addByDayToRecurrenceRule', {
calendarObjectInstance: this.calendarObjectInstance,
recurrenceRule: this.recurrenceRule,
byDay
byDay,
})
this.modified()
},
@ -239,7 +239,7 @@ export default {
this.$store.commit('removeByDayFromRecurrenceRule', {
calendarObjectInstance: this.calendarObjectInstance,
recurrenceRule: this.recurrenceRule,
byDay
byDay,
})
this.modified()
},
@ -252,7 +252,7 @@ export default {
this.$store.commit('addByMonthDayToRecurrenceRule', {
calendarObjectInstance: this.calendarObjectInstance,
recurrenceRule: this.recurrenceRule,
byMonthDay
byMonthDay,
})
this.modified()
},
@ -265,7 +265,7 @@ export default {
this.$store.commit('removeByMonthDayFromRecurrenceRule', {
calendarObjectInstance: this.calendarObjectInstance,
recurrenceRule: this.recurrenceRule,
byMonthDay
byMonthDay,
})
this.modified()
},
@ -278,7 +278,7 @@ export default {
this.$store.commit('addByMonthToRecurrenceRule', {
calendarObjectInstance: this.calendarObjectInstance,
recurrenceRule: this.recurrenceRule,
byMonth
byMonth,
})
this.modified()
},
@ -291,7 +291,7 @@ export default {
this.$store.commit('removeByMonthFromRecurrenceRule', {
calendarObjectInstance: this.calendarObjectInstance,
recurrenceRule: this.recurrenceRule,
byMonth
byMonth,
})
this.modified()
},
@ -304,7 +304,7 @@ export default {
this.$store.commit('changeRecurrenceByDay', {
calendarObjectInstance: this.calendarObjectInstance,
recurrenceRule: this.recurrenceRule,
byDay
byDay,
})
this.modified()
},
@ -319,7 +319,7 @@ export default {
this.$store.commit('changeRecurrenceBySetPosition', {
calendarObjectInstance: this.calendarObjectInstance,
recurrenceRule: this.recurrenceRule,
bySetPosition
bySetPosition,
})
this.modified()
},
@ -330,7 +330,7 @@ export default {
changeToBySetPositionMonthly() {
this.$store.dispatch('changeMonthlyRecurrenceFromByDayToBySetPosition', {
calendarObjectInstance: this.calendarObjectInstance,
recurrenceRule: this.recurrenceRule
recurrenceRule: this.recurrenceRule,
})
this.modified()
},
@ -341,7 +341,7 @@ export default {
changeToByDayMonthly() {
this.$store.dispatch('changeMonthlyRecurrenceFromBySetPositionToByDay', {
calendarObjectInstance: this.calendarObjectInstance,
recurrenceRule: this.recurrenceRule
recurrenceRule: this.recurrenceRule,
})
this.modified()
},
@ -351,7 +351,7 @@ export default {
enableBySetPositionYearly() {
this.$store.dispatch('enableYearlyRecurrenceBySetPosition', {
calendarObjectInstance: this.calendarObjectInstance,
recurrenceRule: this.recurrenceRule
recurrenceRule: this.recurrenceRule,
})
this.modified()
},
@ -361,7 +361,7 @@ export default {
disableBySetPositionYearly() {
this.$store.dispatch('disableYearlyRecurrenceBySetPosition', {
calendarObjectInstance: this.calendarObjectInstance,
recurrenceRule: this.recurrenceRule
recurrenceRule: this.recurrenceRule,
})
this.modified()
},
@ -371,7 +371,7 @@ export default {
setInfinite() {
this.$store.dispatch('setRecurrenceToInfinite', {
calendarObjectInstance: this.calendarObjectInstance,
recurrenceRule: this.recurrenceRule
recurrenceRule: this.recurrenceRule,
})
this.modified()
},
@ -381,7 +381,7 @@ export default {
changeToUntil() {
this.$store.dispatch('enableRecurrenceLimitByUntil', {
calendarObjectInstance: this.calendarObjectInstance,
recurrenceRule: this.recurrenceRule
recurrenceRule: this.recurrenceRule,
})
this.modified()
},
@ -396,7 +396,7 @@ export default {
this.$store.commit('changeRecurrenceUntil', {
calendarObjectInstance: this.calendarObjectInstance,
recurrenceRule: this.recurrenceRule,
until
until,
})
this.modified()
},
@ -406,7 +406,7 @@ export default {
changeToCount() {
this.$store.dispatch('enableRecurrenceLimitByCount', {
calendarObjectInstance: this.calendarObjectInstance,
recurrenceRule: this.recurrenceRule
recurrenceRule: this.recurrenceRule,
})
this.modified()
},
@ -419,7 +419,7 @@ export default {
this.$store.commit('changeRecurrenceCount', {
calendarObjectInstance: this.calendarObjectInstance,
recurrenceRule: this.recurrenceRule,
count
count,
})
this.modified()
},
@ -430,14 +430,14 @@ export default {
if (this.recurrenceRule.isUnsupported) {
this.$store.commit('markRecurrenceRuleAsSupported', {
calendarObjectInstance: this.calendarObjectInstance,
recurrenceRule: this.recurrenceRule
recurrenceRule: this.recurrenceRule,
})
}
if (!this.isEditingMasterItem) {
this.$emit('forceThisAndAllFuture')
}
}
}
},
},
}
</script>

View File

@ -59,14 +59,14 @@
<script>
import DatePicker from '../../Shared/DatePicker.vue'
import {
Multiselect
Multiselect,
} from '@nextcloud/vue'
export default {
name: 'RepeatEndRepeat',
components: {
DatePicker,
Multiselect
Multiselect,
},
props: {
/**
@ -74,16 +74,16 @@ export default {
*/
calendarObjectInstance: {
type: Object,
required: true
required: true,
},
count: {
type: Number,
default: null
default: null,
},
until: {
type: Date,
default: null
}
default: null,
},
},
computed: {
/**
@ -134,13 +134,13 @@ export default {
options() {
return [{
label: this.$t('calendar', 'never'),
value: 'never'
value: 'never',
}, {
label: this.$t('calendar', 'on date'),
value: 'until'
value: 'until',
}, {
label: this.$t('calendar', 'after'),
value: 'count'
value: 'count',
}]
},
/**
@ -156,7 +156,7 @@ export default {
} else {
return this.options.find(option => option.value === 'never')
}
}
},
},
methods: {
/**
@ -206,7 +206,7 @@ export default {
if (selectedValue >= minimumValue && selectedValue <= maximumValue) {
this.$emit('setCount', selectedValue)
}
}
}
},
},
}
</script>

View File

@ -31,6 +31,6 @@
<script>
export default {
name: 'RepeatExceptionWarning'
name: 'RepeatExceptionWarning',
}
</script>

View File

@ -38,7 +38,7 @@ import { Multiselect } from '@nextcloud/vue'
export default {
name: 'RepeatFirstLastSelect',
components: {
Multiselect
Multiselect,
},
props: {
/**
@ -46,44 +46,44 @@ export default {
*/
bySetPosition: {
type: Number,
default: null
default: null,
},
/**
*
*/
disabled: {
type: Boolean,
required: true
}
required: true,
},
},
computed: {
options() {
return [{
label: this.$t('calendar', 'first'),
value: 1
value: 1,
}, {
label: this.$t('calendar', 'second'),
value: 2
value: 2,
}, {
label: this.$t('calendar', 'third'),
value: 3
value: 3,
}, {
label: this.$t('calendar', 'fourth'),
value: 4
value: 4,
}, {
label: this.$t('calendar', 'fifth'),
value: 5
value: 5,
}, {
label: this.$t('calendar', 'second to last'),
value: -2
value: -2,
}, {
label: this.$t('calendar', 'last'),
value: -1
value: -1,
}]
},
selected() {
return this.options.find(option => option.value === this.bySetPosition)
}
},
},
methods: {
select(value) {
@ -94,7 +94,7 @@ export default {
console.debug(value)
this.$emit('change', value.value)
}
}
},
},
}
</script>

View File

@ -31,6 +31,6 @@
<script>
export default {
name: 'RepeatForkWarning'
name: 'RepeatForkWarning',
}
</script>

View File

@ -46,17 +46,17 @@ import RepeatFreqSelect from './RepeatFreqSelect.vue'
export default {
name: 'RepeatFreqInterval',
components: {
RepeatFreqSelect
RepeatFreqSelect,
},
props: {
frequency: {
type: String,
required: true
required: true,
},
interval: {
type: Number,
required: true
}
required: true,
},
},
computed: {
repeatEveryLabel() {
@ -69,7 +69,7 @@ export default {
},
isIntervalDisabled() {
return this.frequency === 'NONE'
}
},
},
methods: {
changeFrequency(value) {
@ -87,7 +87,7 @@ export default {
if (selectedValue >= minimumValue && selectedValue <= maximumValue) {
this.$emit('changeInterval', selectedValue)
}
}
}
},
},
}
</script>

View File

@ -72,7 +72,7 @@ export default {
components: {
RepeatOnTheSelect,
RepeatFirstLastSelect,
ActionRadio
ActionRadio,
},
props: {
/**
@ -80,22 +80,22 @@ export default {
*/
byDay: {
type: Array,
required: true
required: true,
},
/**
*
*/
byMonthDay: {
type: Array,
required: true
required: true,
},
/**
*
*/
bySetPosition: {
type: Number,
default: null
}
default: null,
},
},
computed: {
/**
@ -108,7 +108,7 @@ export default {
options.push({
label: i,
value: String(i),
selected: this.byMonthDay.indexOf(String(i)) !== -1
selected: this.byMonthDay.indexOf(String(i)) !== -1,
})
}
@ -125,7 +125,7 @@ export default {
*/
radioInputId() {
return this._uid + '-radio-select'
}
},
},
methods: {
/**
@ -160,7 +160,7 @@ export default {
},
changeBySetPosition(value) {
this.$emit('changeBySetPosition', value)
}
}
},
},
}
</script>

View File

@ -32,46 +32,46 @@
<script>
import {
Multiselect
Multiselect,
} from '@nextcloud/vue'
export default {
name: 'RepeatFreqSelect',
components: {
Multiselect
Multiselect,
},
props: {
freq: {
type: String,
required: true
required: true,
},
count: {
type: Number,
required: true
}
required: true,
},
},
computed: {
options() {
return [{
'label': this.$t('calendar', 'never'),
'freq': 'NONE'
'freq': 'NONE',
}, {
'label': this.$n('calendar', 'day', 'days', this.count),
'freq': 'DAILY'
'freq': 'DAILY',
}, {
'label': this.$n('calendar', 'week', 'weeks', this.count),
'freq': 'WEEKLY'
'freq': 'WEEKLY',
}, {
'label': this.$n('calendar', 'month', 'months', this.count),
'freq': 'MONTHLY'
'freq': 'MONTHLY',
}, {
'label': this.$n('calendar', 'year', 'years', this.count),
'freq': 'YEARLY'
'freq': 'YEARLY',
}]
},
selected() {
return this.options.find(o => o.freq === this.freq)
}
},
},
methods: {
select(value) {
@ -80,7 +80,7 @@ export default {
}
this.$emit('change', value.freq)
}
}
},
},
}
</script>

View File

@ -46,8 +46,8 @@ export default {
props: {
byDay: {
type: Array,
required: true
}
required: true,
},
},
computed: {
options() {
@ -56,33 +56,33 @@ export default {
return [{
label: dayNamesMin[1],
value: 'MO',
selected: this.byDay.includes('MO')
selected: this.byDay.includes('MO'),
}, {
label: dayNamesMin[2],
value: 'TU',
selected: this.byDay.includes('TU')
selected: this.byDay.includes('TU'),
}, {
label: dayNamesMin[3],
value: 'WE',
selected: this.byDay.includes('WE')
selected: this.byDay.includes('WE'),
}, {
label: dayNamesMin[4],
value: 'TH',
selected: this.byDay.includes('TH')
selected: this.byDay.includes('TH'),
}, {
label: dayNamesMin[5],
value: 'FR',
selected: this.byDay.includes('FR')
selected: this.byDay.includes('FR'),
}, {
label: dayNamesMin[6],
value: 'SA',
selected: this.byDay.includes('SA')
selected: this.byDay.includes('SA'),
}, {
label: dayNamesMin[0],
value: 'SU',
selected: this.byDay.includes('SU')
selected: this.byDay.includes('SU'),
}]
}
},
},
methods: {
toggleByDay(day) {
@ -93,7 +93,7 @@ export default {
this.$emit('removeByDay', day)
}
}
}
}
},
},
}
</script>

View File

@ -65,7 +65,7 @@ export default {
components: {
ActionCheckbox,
RepeatFirstLastSelect,
RepeatOnTheSelect
RepeatOnTheSelect,
},
props: {
/**
@ -73,22 +73,22 @@ export default {
*/
byDay: {
type: Array,
required: true
required: true,
},
/**
*
*/
byMonth: {
type: Array,
required: true
required: true,
},
/**
*
*/
bySetPosition: {
type: Number,
default: null
}
default: null,
},
},
computed: {
options() {
@ -99,51 +99,51 @@ export default {
return [{
label: monthNamesShort[0],
value: 1,
selected: this.byMonth.includes(1)
selected: this.byMonth.includes(1),
}, {
label: monthNamesShort[1],
value: 2,
selected: this.byMonth.includes(2)
selected: this.byMonth.includes(2),
}, {
label: monthNamesShort[2],
value: 3,
selected: this.byMonth.includes(3)
selected: this.byMonth.includes(3),
}, {
label: monthNamesShort[3],
value: 4,
selected: this.byMonth.includes(4)
selected: this.byMonth.includes(4),
}, {
label: monthNamesShort[4],
value: 5,
selected: this.byMonth.includes(5)
selected: this.byMonth.includes(5),
}, {
label: monthNamesShort[5],
value: 6,
selected: this.byMonth.includes(6)
selected: this.byMonth.includes(6),
}, {
label: monthNamesShort[6],
value: 7,
selected: this.byMonth.includes(7)
selected: this.byMonth.includes(7),
}, {
label: monthNamesShort[7],
value: 8,
selected: this.byMonth.includes(8)
selected: this.byMonth.includes(8),
}, {
label: monthNamesShort[8],
value: 9,
selected: this.byMonth.includes(9)
selected: this.byMonth.includes(9),
}, {
label: monthNamesShort[9],
value: 10,
selected: this.byMonth.includes(10)
selected: this.byMonth.includes(10),
}, {
label: monthNamesShort[10],
value: 11,
selected: this.byMonth.includes(11)
selected: this.byMonth.includes(11),
}, {
label: monthNamesShort[11],
value: 12,
selected: this.byMonth.includes(12)
selected: this.byMonth.includes(12),
}]
},
/**
@ -153,7 +153,7 @@ export default {
*/
isBySetPositionEnabled() {
return this.bySetPosition !== null
}
},
},
methods: {
@ -185,7 +185,7 @@ export default {
},
changeBySetPosition(value) {
this.$emit('changeBySetPosition', value)
}
}
},
},
}
</script>

View File

@ -39,7 +39,7 @@ import { getDayNames } from '@nextcloud/l10n'
export default {
name: 'RepeatOnTheSelect',
components: {
Multiselect
Multiselect,
},
props: {
/**
@ -47,12 +47,12 @@ export default {
*/
byDay: {
type: Array,
required: true
required: true,
},
disabled: {
type: Boolean,
required: true
}
required: true,
},
},
computed: {
options() {
@ -60,39 +60,39 @@ export default {
return [{
label: dayNames[1],
value: ['MO']
value: ['MO'],
}, {
label: dayNames[2],
value: ['TU']
value: ['TU'],
}, {
label: dayNames[3],
value: ['WE']
value: ['WE'],
}, {
label: dayNames[4],
value: ['TH']
value: ['TH'],
}, {
label: dayNames[5],
value: ['FR']
value: ['FR'],
}, {
label: dayNames[6],
value: ['SA']
value: ['SA'],
}, {
label: dayNames[0],
value: ['SU']
value: ['SU'],
}, {
label: this.$t('calendar', 'day'),
value: ['SU', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA']
value: ['SU', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA'],
}, {
label: this.$t('calendar', 'weekday'),
value: ['MO', 'TU', 'WE', 'TH', 'FR']
value: ['MO', 'TU', 'WE', 'TH', 'FR'],
}, {
label: this.$t('calendar', 'weekend day'),
value: ['SU', 'SA']
value: ['SU', 'SA'],
}]
},
selected() {
return this.options.find(option => option.value.slice().sort().join(',') === this.byDay.slice().sort().join(','))
}
},
},
methods: {
select(value) {
@ -101,7 +101,7 @@ export default {
}
this.$emit('change', value.value)
}
}
},
},
}
</script>

View File

@ -39,57 +39,57 @@ export default {
*/
frequency: {
type: String,
required: true
required: true,
},
/**
*
*/
interval: {
type: Number,
required: true
required: true,
},
/**
*
*/
byDay: {
type: Array,
required: true
required: true,
},
/**
*
*/
byMonth: {
type: Array,
required: true
required: true,
},
/**
*
*/
byMonthDay: {
type: Array,
required: true
required: true,
},
/**
*
*/
bySetPosition: {
type: Number,
default: null
default: null,
},
/**
*
*/
count: {
type: Number,
default: null
default: null,
},
/**
*
*/
until: {
type: Date,
default: null
}
default: null,
},
},
computed: {
summary() {
@ -142,14 +142,14 @@ export default {
limitPart = this.$n('calendar', 'on {weekday}', 'on {weekdays}', this.byDay.length, {
weekday: formattedDays,
weekdays: formattedDays
weekdays: formattedDays,
})
} else if (this.frequency === 'MONTHLY') {
if (this.byMonthDay.length !== 0) {
const dayOfMonthList = this.byMonthDay.join(', ')
limitPart = this.$n('calendar', 'on day {dayOfMonthList}', 'on days {dayOfMonthList}', this.byMonthDay.length, {
dayOfMonthList
dayOfMonthList,
})
} else {
const ordinalNumber = this.getTranslatedOrdinalNumber(this.bySetPosition)
@ -157,7 +157,7 @@ export default {
limitPart = this.$t('calendar', 'on the {ordinalNumber} {byDaySet}', {
ordinalNumber,
byDaySet
byDaySet,
})
}
} else if (this.frequency === 'YEARLY') {
@ -165,7 +165,7 @@ export default {
if (this.byDay.length === 0) {
limitPart = this.$t('calendar', 'in {monthNames}', {
monthNames
monthNames,
})
} else {
const ordinalNumber = this.getTranslatedOrdinalNumber(this.bySetPosition)
@ -174,17 +174,17 @@ export default {
limitPart = this.$t('calendar', 'in {monthNames} on the {ordinalNumber} {byDaySet}', {
monthNames,
ordinalNumber,
byDaySet
byDaySet,
})
}
}
let endPart = ''
if (this.until !== null) {
let untilDate = moment(this.until).format('L')
const untilDate = moment(this.until).format('L')
endPart = this.$t('calendar', ', until {untilDate}', {
untilDate
untilDate,
})
} else if (this.count !== null) {
endPart = this.$n('calendar', ', %n time', ', %n times', this.count)
@ -193,9 +193,9 @@ export default {
return [
freqPart,
limitPart,
endPart
endPart,
].join(' ').trim()
}
},
},
methods: {
/**
@ -284,7 +284,7 @@ export default {
}
return monthNames.join(', ')
}
}
},
},
}
</script>

View File

@ -34,6 +34,6 @@ import RepeatSummary from './RepeatSummary.vue'
export default {
name: 'RepeatSummaryReadOnly',
extends: RepeatSummary
extends: RepeatSummary,
}
</script>

View File

@ -31,6 +31,6 @@
<script>
export default {
name: 'RepeatUnsupportedWarning'
name: 'RepeatUnsupportedWarning',
}
</script>

View File

@ -60,20 +60,20 @@ export default {
props: {
canCreateRecurrenceException: {
type: Boolean,
required: true
required: true,
},
isNew: {
type: Boolean,
required: true
required: true,
},
forceThisAndAllFuture: {
type: Boolean,
required: true
required: true,
},
showMoreButton: {
type: Boolean,
default: false
}
default: false,
},
},
computed: {
showSaveButton() {
@ -87,7 +87,7 @@ export default {
},
showUpdateThisAndFutureButton() {
return this.canCreateRecurrenceException
}
},
},
methods: {
saveThisOnly() {
@ -98,7 +98,7 @@ export default {
},
showMore() {
this.$emit('showMore')
}
}
},
},
}
</script>

View File

@ -38,6 +38,6 @@
<script>
export default {
name: 'EmptyCalendar'
name: 'EmptyCalendar',
}
</script>

View File

@ -28,6 +28,6 @@
<script>
export default {
name: 'PopoverLoadingIndicator'
name: 'PopoverLoadingIndicator',
}
</script>

View File

@ -16,7 +16,7 @@
</template>
<script>
import {
Multiselect
Multiselect,
} from '@nextcloud/vue'
import CalendarPickerOption from './CalendarPickerOption.vue'
@ -24,26 +24,26 @@ export default {
name: 'CalendarPicker',
components: {
CalendarPickerOption,
Multiselect
Multiselect,
},
props: {
calendar: {
type: Object,
required: true
required: true,
},
calendars: {
type: Array,
required: true
required: true,
},
showCalendarOnSelect: {
type: Boolean,
default: false
}
default: false,
},
},
computed: {
isDisabled() {
return this.calendars.length < 2
}
},
},
methods: {
change(newCalendar) {
@ -53,12 +53,12 @@ export default {
if (!newCalendar.enabled) {
this.$store.dispatch('toggleCalendarEnabled', {
calendar: newCalendar
calendar: newCalendar,
})
}
this.$emit('selectCalendar', newCalendar)
}
}
},
},
}
</script>

View File

@ -47,25 +47,25 @@ import { Avatar } from '@nextcloud/vue'
export default {
name: 'CalendarPickerOption',
components: {
Avatar
Avatar,
},
props: {
color: {
type: String,
required: true
required: true,
},
displayName: {
type: String,
required: true
required: true,
},
owner: {
type: String,
required: true
required: true,
},
isSharedWithMe: {
type: Boolean,
required: true
}
required: true,
},
},
computed: {
/**
@ -99,7 +99,7 @@ export default {
}
return null
}
}
},
},
}
</script>

View File

@ -70,41 +70,41 @@ export default {
components: {
DatetimePicker,
Popover,
TimezoneSelect
TimezoneSelect,
},
props: {
date: {
type: Date,
required: true
required: true,
},
hasTimezone: {
type: Boolean,
default: false
default: false,
},
timezoneId: {
type: String,
default: null
default: null,
},
prefix: {
type: String,
default: null
default: null,
},
isAllDay: {
type: Boolean,
required: true
required: true,
},
userTimezoneId: {
type: String,
default: null
default: null,
},
min: {
type: Date,
default: null
default: null,
},
max: {
type: Date,
default: null
}
default: null,
},
},
data() {
return {
@ -113,11 +113,11 @@ export default {
days: getDayNamesShort(),
months: getMonthNamesShort(),
placeholder: {
date: t('calendar', 'Select Date')
}
date: t('calendar', 'Select Date'),
},
},
firstDay: getFirstDay() === 0 ? 7 : getFirstDay(),
showTimezonePopover: false
showTimezonePopover: false,
}
},
computed: {
@ -207,7 +207,7 @@ export default {
*/
maximumDate() {
return this.max || new Date(this.$store.state.davRestrictions.maximumDate)
}
},
},
async mounted() {
this.locale = await loadMomentLocalization()
@ -234,7 +234,7 @@ export default {
*/
toggleTimezonePopover() {
this.showTimezonePopover = !this.showTimezonePopover
}
}
},
},
}
</script>

View File

@ -40,17 +40,17 @@ import loadMomentLocalization from '../../utils/moment.js'
export default {
name: 'TimePicker',
components: {
DatetimePicker
DatetimePicker,
},
props: {
date: {
type: Date,
required: true
}
required: true,
},
},
data() {
return {
locale: 'en'
locale: 'en',
}
},
computed: {
@ -61,7 +61,7 @@ export default {
*/
format() {
return moment.localeData(this.locale).longDateFormat('LT')
}
},
},
async mounted() {
this.locale = await loadMomentLocalization()
@ -74,7 +74,7 @@ export default {
*/
change(date) {
this.$emit('change', date)
}
}
},
},
}
</script>

View File

@ -15,28 +15,28 @@
<script>
import {
Multiselect
Multiselect,
} from '@nextcloud/vue'
import {
getReadableTimezoneName,
getSortedTimezoneList
getSortedTimezoneList,
} from '../../utils/timezone.js'
import getTimezoneManager from '../../services/timezoneDataProviderService.js'
export default {
name: 'TimezoneSelect',
components: {
Multiselect
Multiselect,
},
props: {
additionalTimezones: {
type: Array,
default: () => []
default: () => [],
},
value: {
type: String,
required: true
}
required: true,
},
},
computed: {
placeholder() {
@ -52,14 +52,14 @@ export default {
return {
label: getReadableTimezoneName(this.value),
timezoneId: this.value
timezoneId: this.value,
}
}
},
},
options() {
const timezoneManager = getTimezoneManager()
return getSortedTimezoneList(timezoneManager.listAllTimezones(), this.additionalTimezones)
}
},
},
methods: {
change(newValue) {
@ -68,7 +68,7 @@ export default {
}
this.$emit('change', newValue.timezoneId)
}
}
},
},
}
</script>

View File

@ -26,7 +26,7 @@ export default function getDefaultAlarms(allDay = false) {
9 * 60 * 60, // On the day of the event at 9am
-15 * 60 * 60, // 1 day before at 9am
-39 * 60 * 60, // 2 days before at 9am
-159 * 60 * 60 // 1 week before at 9am
-159 * 60 * 60, // 1 week before at 9am
]
} else {
return [
@ -38,7 +38,7 @@ export default function getDefaultAlarms(allDay = false) {
-1 * 60 * 60, // 1 hour before
-2 * 60 * 60, // 2 hour before
-1 * 24 * 60 * 60, // 1 day before
-2 * 24 * 60 * 60 // 2 days before
-2 * 24 * 60 * 60, // 2 days before
]
}
}

View File

@ -38,6 +38,6 @@ export default () => {
translate('calendar', 'Sick day'),
translate('calendar', 'Special occasion'),
translate('calendar', 'Travel'),
translate('calendar', 'Vacation')
translate('calendar', 'Vacation'),
]
}

View File

@ -51,19 +51,19 @@ export default (alarm, isAllDay, currentUserTimezone) => {
'%n day before the event at {formattedHourMinute}',
'%n days before the event at {formattedHourMinute}',
alarm.relativeAmountAllDay, {
formattedHourMinute
formattedHourMinute,
})
} else {
return translatePlural('calendar',
'%n week before the event at {formattedHourMinute}',
'%n weeks before the event at {formattedHourMinute}',
alarm.relativeAmountAllDay, {
formattedHourMinute
formattedHourMinute,
})
}
}
return translate('calendar', 'on the day of the event at {formattedHourMinute}', {
formattedHourMinute
formattedHourMinute,
})
} else {
// Alarms at the event's start or end
@ -93,12 +93,12 @@ export default (alarm, isAllDay, currentUserTimezone) => {
// absolute trigger
if (currentUserTimezone === alarm.absoluteTimezoneId) {
return translate('calendar', 'on {time}', {
time: moment(alarm.absoluteDate).format('LLLL')
time: moment(alarm.absoluteDate).format('LLLL'),
})
} else {
return translate('calendar', 'on {time} {timezoneId}', {
time: moment(alarm.absoluteDate).format('LLLL'),
timezoneId: alarm.absoluteTimezoneId
timezoneId: alarm.absoluteTimezoneId,
})
}
}

View File

@ -30,7 +30,7 @@ export default (value, view) => {
case 'timeGridWeek':
return translate('calendar', 'Week {number} of {year}', {
number: moment(value).week(),
year: moment(value).year()
year: moment(value).year(),
})
case 'dayGridMonth':

View File

@ -51,7 +51,7 @@ export function getDurationValueFromFullCalendarDuration(fcDuration) {
*/
export function getFullCalendarDurationFromDurationValue(durationValue) {
return {
seconds: durationValue.totalSeconds
seconds: durationValue.totalSeconds,
}
}
@ -69,47 +69,47 @@ function getDurationValueFromFullCalendarDurationEncodedAsObject(fcDuration) {
const durations = []
if (fcDuration.days) {
durations.push(DurationValue.fromData({
days: fcDuration.days
days: fcDuration.days,
}))
}
if (fcDuration.day) {
durations.push(DurationValue.fromData({
days: fcDuration.day
days: fcDuration.day,
}))
}
if (fcDuration.minutes) {
durations.push(DurationValue.fromData({
minutes: fcDuration.minutes
minutes: fcDuration.minutes,
}))
}
if (fcDuration.minute) {
durations.push(DurationValue.fromData({
minutes: fcDuration.minute
minutes: fcDuration.minute,
}))
}
if (fcDuration.seconds) {
durations.push(DurationValue.fromData({
seconds: fcDuration.seconds
seconds: fcDuration.seconds,
}))
}
if (fcDuration.second) {
durations.push(DurationValue.fromData({
seconds: fcDuration.second
seconds: fcDuration.second,
}))
}
if (fcDuration.milliseconds) {
durations.push(DurationValue.fromData({
seconds: Math.floor(fcDuration.milliseconds / 1000)
seconds: Math.floor(fcDuration.milliseconds / 1000),
}))
}
if (fcDuration.millisecond) {
durations.push(DurationValue.fromData({
seconds: Math.floor(fcDuration.millisecond / 1000)
seconds: Math.floor(fcDuration.millisecond / 1000),
}))
}
if (fcDuration.ms) {
durations.push(DurationValue.fromData({
seconds: Math.floor(fcDuration.ms / 1000)
seconds: Math.floor(fcDuration.ms / 1000),
}))
}
@ -135,7 +135,7 @@ function getDurationValueFromFullCalendarDurationEncodedAsString(fcDuration) {
return DurationValue.fromData({
hours: parseInt(hours, 10),
minutes: parseInt(minutes, 10),
seconds: parseInt(seconds, 10)
seconds: parseInt(seconds, 10),
})
}
@ -146,7 +146,7 @@ function getDurationValueFromFullCalendarDurationEncodedAsString(fcDuration) {
return DurationValue.fromData({
hours: parseInt(hours, 10),
minutes: parseInt(minutes, 10),
seconds: parseInt(seconds, 10)
seconds: parseInt(seconds, 10),
})
}
@ -156,7 +156,7 @@ function getDurationValueFromFullCalendarDurationEncodedAsString(fcDuration) {
return DurationValue.fromData({
hours: parseInt(hours, 10),
minutes: parseInt(minutes, 10)
minutes: parseInt(minutes, 10),
})
}

View File

@ -44,7 +44,7 @@ export default function(store, router, route, window) {
const name = getPrefixedRoute(route.name, desiredRoute)
const params = Object.assign({}, store.state.route.params, {
object: event.extendedProps.objectId,
recurrenceId: String(event.extendedProps.recurrenceId)
recurrenceId: String(event.extendedProps.recurrenceId),
})
// Don't push new route when day didn't change

View File

@ -63,7 +63,7 @@ export default function(store, fcAPI) {
}
return store.dispatch('updateCalendarObject', {
calendarObject
calendarObject,
})
})
.catch((err) => {

View File

@ -64,7 +64,7 @@ export default function(store) {
}
return store.dispatch('updateCalendarObject', {
calendarObject
calendarObject,
})
})
.catch((err) => {

View File

@ -20,7 +20,7 @@
*
*/
import {
generateTextColorForRGBString
generateTextColorForRGBString,
} from '../utils/color.js'
import getTimezoneManager from '../services/timezoneDataProviderService'
import { getUnixTimestampFromDate } from '../utils/date.js'
@ -48,7 +48,7 @@ export default function(store) {
store.dispatch('getEventsFromCalendarInTimeRange', {
calendar: calendar,
from: start,
to: end
to: end,
}).then(() => {
const timeRange = store.getters.getTimeRangeForCalendarCoveringRange(calendar.id, getUnixTimestampFromDate(start), getUnixTimestampFromDate(end))
const calendarObjects = store.getters.getCalendarObjectsByTimeRangeId(timeRange.id)
@ -58,7 +58,7 @@ export default function(store) {
const calendarObjects = store.getters.getCalendarObjectsByTimeRangeId(timeRange.id)
successCallback(eventSourceFunction(calendarObjects, start, end, timezoneObject))
}
}
},
}
if (calendar.isReadOnly) {

View File

@ -20,7 +20,7 @@
*
*/
import {
generateTextColorForRGBString
generateTextColorForRGBString,
} from '../utils/color.js'
import { translate } from '@nextcloud/l10n'
@ -56,8 +56,8 @@ export function eventSourceFunction(calendarObjects, start, end, timezone) {
extendedProps: {
objectId: calendarObject.id,
recurrenceId: object.getReferenceRecurrenceId().unixTime,
canModifyAllDay: object.canModifyAllDay()
}
canModifyAllDay: object.canModifyAllDay(),
},
}
if (calendarObject.color) {

View File

@ -43,7 +43,7 @@ export default function(store, router, window) {
const params = Object.assign({}, store.state.route.params, {
allDay: allDay ? '1' : '0',
dtstart: String(Math.floor(start.getTime() / 1000)),
dtend: String(Math.floor(end.getTime() / 1000))
dtend: String(Math.floor(end.getTime() / 1000)),
})
// Don't push new route when day didn't change

View File

@ -21,7 +21,7 @@
*/
import {
NamedTimeZoneImpl,
createPlugin
createPlugin,
} from '@fullcalendar/core'
import getTimezoneManager from '../services/timezoneDataProviderService'
@ -64,5 +64,5 @@ class VTimezoneNamedTimezone extends NamedTimeZoneImpl {
}
export default createPlugin({
namedTimeZonedImpl: VTimezoneNamedTimezone
namedTimeZonedImpl: VTimezoneNamedTimezone,
})

View File

@ -65,5 +65,5 @@ export default new Vue({
el: '#content',
router,
store,
render: h => h(App)
render: h => h(App),
})

View File

@ -54,7 +54,7 @@ export default {
// Whether or not the master item is being edited
isEditingMasterItem: false,
// Whether or not it is a recurrence-exception
isRecurrenceException: false
isRecurrenceException: false,
}
},
computed: {
@ -97,7 +97,7 @@ export default {
calendars() {
if (this.isReadOnly && this.calendarObject) {
return [
this.$store.getters.getCalendarById(this.calendarObject.calendarId)
this.$store.getters.getCalendarById(this.calendarObject.calendarId),
]
}
@ -225,7 +225,7 @@ export default {
}
return this.calendarObjectInstance.canModifyAllDay
}
},
},
methods: {
/**
@ -261,7 +261,7 @@ export default {
this.$router.push({
name: getPrefixedRoute(this.$store.state.route.name, 'CalendarView'),
params
params,
})
},
/**
@ -312,13 +312,13 @@ export default {
}
await this.$store.dispatch('updateCalendarObject', {
calendarObject: this.calendarObject
calendarObject: this.calendarObject,
})
if (!isNewEvent && thisAndAllFuture && original.root !== fork.root) {
await this.$store.dispatch('createCalendarObjectFromFork', {
eventComponent: fork,
calendarId: this.calendarId
calendarId: this.calendarId,
})
}
}
@ -328,7 +328,7 @@ export default {
await this.$store.dispatch('moveCalendarObject', {
calendarObject: this.calendarObject,
newCalendarId: this.calendarId
newCalendarId: this.calendarId,
})
}
@ -365,11 +365,11 @@ export default {
const isRecurrenceSetEmpty = this.eventComponent.removeThisOccurrence(thisAndAllFuture)
if (isRecurrenceSetEmpty) {
await this.$store.dispatch('deleteCalendarObject', {
calendarObject: this.calendarObject
calendarObject: this.calendarObject,
})
} else {
await this.$store.dispatch('updateCalendarObject', {
calendarObject: this.calendarObject
calendarObject: this.calendarObject,
})
}
@ -398,7 +398,7 @@ export default {
this.$store.commit('changeTitle', {
calendarObjectInstance: this.calendarObjectInstance,
title
title,
})
},
/**
@ -409,7 +409,7 @@ export default {
updateDescription(description) {
this.$store.commit('changeDescription', {
calendarObjectInstance: this.calendarObjectInstance,
description
description,
})
},
/**
@ -420,7 +420,7 @@ export default {
updateLocation(location) {
this.$store.commit('changeLocation', {
calendarObjectInstance: this.calendarObjectInstance,
location
location,
})
},
/**
@ -432,7 +432,7 @@ export default {
console.debug('updating start date ...', startDate)
this.$store.commit('changeStartDate', {
calendarObjectInstance: this.calendarObjectInstance,
startDate
startDate,
})
},
/**
@ -447,7 +447,7 @@ export default {
this.$store.dispatch('changeStartTimezone', {
calendarObjectInstance: this.calendarObjectInstance,
startTimezone
startTimezone,
})
},
/**
@ -459,7 +459,7 @@ export default {
console.debug('updating end date ...', endDate)
this.$store.commit('changeEndDate', {
calendarObjectInstance: this.calendarObjectInstance,
endDate
endDate,
})
},
/**
@ -474,7 +474,7 @@ export default {
this.$store.dispatch('changeEndTimezone', {
calendarObjectInstance: this.calendarObjectInstance,
endTimezone
endTimezone,
})
},
/**
@ -482,9 +482,9 @@ export default {
*/
toggleAllDay() {
this.$store.dispatch('toggleAllDay', {
calendarObjectInstance: this.calendarObjectInstance
calendarObjectInstance: this.calendarObjectInstance,
})
}
},
},
/**
* This is executed before entering the Editor routes
@ -576,7 +576,7 @@ export default {
start,
end,
isAllDay,
timezoneId
timezoneId,
})
next()
@ -639,5 +639,5 @@ export default {
// TODO - show proper error message
next(false)
})
}
},
}

View File

@ -35,7 +35,7 @@ export default {
*/
propModel: {
type: Object,
required: true
required: true,
},
/**
* An indicator whether or not the event is being viewed
@ -43,15 +43,15 @@ export default {
*/
isReadOnly: {
type: Boolean,
required: true
required: true,
},
/**
* The value to be displayed inside the property.
* The type varies from property to property.
*/
value: {
required: true
}
required: true,
},
},
computed: {
/**
@ -109,6 +109,6 @@ export default {
*/
hasInfo() {
return this.propModel.info !== undefined && !this.isReadOnly
}
}
},
},
}

View File

@ -69,7 +69,7 @@ export const getDefaultCalendarObject = (props = {}) => Object.assign({}, {
// All calendar-objects from this calendar that have already been fetched
calendarObjects: [],
// Time-ranges that have already been fetched for this calendar
fetchedTimeRanges: []
fetchedTimeRanges: [],
}, props)
/**
@ -127,7 +127,7 @@ export function mapDavCollectionToCalendar(calendar, currentUserPrincipal) {
enabled = !isSharedWithMe
}
let shares = []
const shares = []
if (!!currentUserPrincipal && Array.isArray(calendar.shares)) {
for (const share of calendar.shares) {
if (share.href === currentUserPrincipal.principalScheme) {
@ -156,7 +156,7 @@ export function mapDavCollectionToCalendar(calendar, currentUserPrincipal) {
canBePublished,
shares,
timezone,
dav: calendar
dav: calendar,
}
}
@ -193,6 +193,6 @@ export function mapDavShareeToSharee(sharee) {
writeable,
isGroup,
isCircle,
uri
uri,
}
}

View File

@ -64,7 +64,7 @@ export const getDefaultCalendarObjectInstanceObject = (props = {}) => Object.ass
byMonthDay: [],
bySetPosition: null,
isUnsupported: false,
recurrenceRuleValue: null
recurrenceRuleValue: null,
},
// Attendees of this event
attendees: [],
@ -73,7 +73,7 @@ export const getDefaultCalendarObjectInstanceObject = (props = {}) => Object.ass
// name of the organizer
name: null,
// email of the organzier:
uri: null
uri: null,
},
// Alarm of the event
alarms: [],
@ -84,7 +84,7 @@ export const getDefaultCalendarObjectInstanceObject = (props = {}) => Object.ass
// Wether or not the user is allowed to toggle the all-day checkbox
canModifyAllDay: true,
// The real event-component coming from calendar-js
eventComponent: null
eventComponent: null,
}, props)
/**
@ -103,7 +103,7 @@ export const mapEventComponentToCalendarObjectInstanceObject = (eventComponent)
timeTransparency: eventComponent.timeTransparency,
color: eventComponent.color,
canModifyAllDay: eventComponent.canModifyAllDay(),
eventComponent
eventComponent,
}
// The end date of an event is non-inclusive. This is rather intuitive for timed-events, but very unintuitive for all-day events.
@ -143,7 +143,7 @@ function getOrganizerFromEventComponent(eventComponent) {
const organizerProperty = eventComponent.getFirstProperty('ORGANIZER')
return {
commonName: organizerProperty.commonName,
uri: organizerProperty.email
uri: organizerProperty.email,
}
}
@ -180,7 +180,7 @@ function getRecurrenceRuleFromEventComponent(eventComponent) {
byMonthDay: [],
bySetPosition: null,
isUnsupported: false,
recurrenceRuleValue: recurrenceRule
recurrenceRuleValue: recurrenceRule,
}
if (recurrenceRule.until) {
@ -222,7 +222,7 @@ function getRecurrenceRuleFromEventComponent(eventComponent) {
byMonthDay: [],
bySetPosition: null,
isUnsupported: false,
recurrenceRuleValue: null
recurrenceRuleValue: null,
}
}
@ -260,7 +260,7 @@ function getAttendeesFromEventComponent(eventComponent) {
role: attendee.role,
rsvp: attendee.rsvp,
uri: attendee.email,
attendeeProperty: attendee
attendeeProperty: attendee,
})
}
@ -319,7 +319,7 @@ function getRecurrenceComponentFromDailyRule(recurrenceRule, recurrenceComponent
'BYYEARDAY',
'BYWEEKNO',
'BYMONTH',
'BYSETPOS'
'BYSETPOS',
]
if (containsRecurrenceComponent(recurrenceRule, forbiddenComponents)) {
@ -352,7 +352,7 @@ function getRecurrenceComponentFromWeeklyRule(recurrenceRule, recurrenceComponen
'BYYEARDAY',
'BYWEEKNO',
'BYMONTH',
'BYSETPOS'
'BYSETPOS',
]
if (containsRecurrenceComponent(recurrenceRule, forbiddenComponents)) {
@ -406,7 +406,7 @@ function getRecurrenceComponentFromMonthlyRule(recurrenceRule, recurrenceCompone
'BYHOUR',
'BYYEARDAY',
'BYWEEKNO',
'BYMONTH'
'BYMONTH',
]
if (containsRecurrenceComponent(recurrenceRule, forbiddenComponents)) {
@ -505,7 +505,7 @@ function getRecurrenceComponentFromYearlyRule(recurrenceRule, recurrenceComponen
'BYHOUR',
'BYMONTHDAY',
'BYYEARDAY',
'BYWEEKNO'
'BYWEEKNO',
]
if (containsRecurrenceComponent(recurrenceRule, forbiddenComponents)) {
@ -581,7 +581,7 @@ function isAllowedByDay(byDay) {
'SU',
'FR,MO,SA,SU,TH,TU,WE',
'FR,MO,TH,TU,WE',
'SA,SU'
'SA,SU',
]
return allowedByDay.includes(byDay.slice().sort().join(','))
@ -601,7 +601,7 @@ function isAllowedBySetPos(bySetPos) {
'2',
'3',
'4',
'5'
'5',
]
return allowedBySetPos.includes(bySetPos.toString())

View File

@ -49,5 +49,5 @@ export const getDefaultContactsObject = (props = {}) => Object.assign({}, {
// Language of the user
language: null,
// Timezone of the user
timezoneId: null
timezoneId: null,
}, props)

View File

@ -42,7 +42,7 @@ export const getDefaultPrincipalObject = (props) => Object.assign({}, {
// url to the DAV-principal-resource
url: '',
// The cdav-library object
dav: false
dav: false,
}, props)
/**
@ -60,6 +60,6 @@ export function mapDavToPrincipal(principal) {
displayname: principal.displayname,
userId: principal.userId,
url: principal.principalUrl,
dav: principal
dav: principal,
}
}

View File

@ -30,23 +30,23 @@ export default {
options: [
{ value: 'PUBLIC', label: translate('calendar', 'When shared show full event') },
{ value: 'CONFIDENTIAL', label: translate('calendar', 'When shared show only busy') },
{ value: 'PRIVATE', label: translate('calendar', 'When shared hide this event') }
{ value: 'PRIVATE', label: translate('calendar', 'When shared hide this event') },
],
multiple: false,
info: translate('calendar', 'The visibility of this event in shared calendars.'),
defaultValue: 'PUBLIC'
defaultValue: 'PUBLIC',
},
location: {
name: 'location',
readableName: translate('calendar', 'Location'),
placeholder: translate('calendar', 'Add a location'),
icon: 'icon-address'
icon: 'icon-address',
},
description: {
name: 'description',
readableName: translate('calendar', 'Description'),
placeholder: translate('calendar', 'Add a description'),
icon: 'icon-menu'
icon: 'icon-menu',
},
geo: {
name: 'geo',
@ -54,7 +54,7 @@ export default {
icon: 'icon-timezone',
multiple: false,
default: false,
info: translate('calendar', 'The geographical position this events take place at.')
info: translate('calendar', 'The geographical position this events take place at.'),
},
priority: {
readableName: translate('calendar', 'Priority'),
@ -65,8 +65,8 @@ export default {
options: [
{ value: 7, label: translate('calendar', 'Low') },
{ value: 5, label: translate('calendar', 'Medium') },
{ value: 3, label: translate('calendar', 'High') }
]
{ value: 3, label: translate('calendar', 'High') },
],
},
status: {
@ -76,12 +76,12 @@ export default {
options: [
{ value: 'CONFIRMED', label: translate('calendar', 'Confirmed') },
{ value: 'TENTATIVE', label: translate('calendar', 'Tentative') },
{ value: 'CANCELLED', label: translate('calendar', 'Cancelled') }
{ value: 'CANCELLED', label: translate('calendar', 'Cancelled') },
],
multiple: false,
default: true,
info: translate('calendar', 'Confirmation about the overall status of the event.'),
defaultValue: 'CONFIRMED'
defaultValue: 'CONFIRMED',
},
timeTransparency: {
name: 'timeTransparency',
@ -92,22 +92,21 @@ export default {
info: translate('calendar', 'Take this event into account when calculating free-busy information'),
options: [
{ value: 'TRANSPARENT', label: translate('calendar', 'Free') },
{ value: 'OPAQUE', label: translate('calendar', 'Busy') }
{ value: 'OPAQUE', label: translate('calendar', 'Busy') },
],
defaultValue: 'TRANSPARENT'
defaultValue: 'TRANSPARENT',
},
// url: {
// readableName: translate('calendar', 'URL'),
// icon: '',
// multiple: false,
// default: false,
// info: translate('calendar', '')
// readableName: translate('calendar', 'URL'),
// icon: '',
// multiple: false,
// default: false,
// info: translate('calendar', '')
// },
// To be implemented later:
// attach: {
// readableName: translate('calendar', 'Attachments'),
// multiple: true,
//
// readableName: translate('calendar', 'Attachments'),
// multiple: true,
// },
categories: {
readableName: translate('calendar', 'Categories'),
@ -117,14 +116,14 @@ export default {
info: translate('calendar', 'Categories help you to structure and organize your events'),
placeholder: translate('calendar', 'Search or add categories'),
tagPlaceholder: translate('calendar', 'Add this as a new category'),
options: getDefaultCategories()
options: getDefaultCategories(),
},
resources: {
readableName: translate('calendar', 'Additional resources'),
icon: '',
multiple: true,
default: false,
info: translate('calendar', '')
info: translate('calendar', ''),
},
// RFC 7986
@ -133,12 +132,12 @@ export default {
icon: '',
multiple: false,
default: false,
info: translate('calendar', 'Special color of this event. Overrides the calendar-color.')
}
info: translate('calendar', 'Special color of this event. Overrides the calendar-color.'),
},
// To be implemented later:
// conference: {
// readableName: translate('calendar', 'Conference system'),
// icon: '',
// multiple: false,
// readableName: translate('calendar', 'Conference system'),
// icon: '',
// multiple: false,
// },
}

View File

@ -43,14 +43,14 @@ const router = new Router({
{
path: '/p/:tokens/:view/:firstDay/view/popover/:object/:recurrenceId',
name: 'PublicEditPopoverView',
component: EditSimple
component: EditSimple,
},
{
path: '/p/:tokens/:view/:firstDay/view/sidebar/:object/:recurrenceId',
name: 'PublicEditSidebarView',
component: EditSidebar
}
]
component: EditSidebar,
},
],
},
{
path: '/embed/:tokens/:view/:firstDay',
@ -60,14 +60,14 @@ const router = new Router({
{
path: '/embed/:tokens/:view/:firstDay/view/popover/:object/:recurrenceId',
name: 'EmbedEditPopoverView',
component: EditSimple
component: EditSimple,
},
{
path: '/embed/:tokens/:view/:firstDay/view/sidebar/:object/:recurrenceId',
name: 'EmbedEditSidebarView',
component: EditSidebar
}
]
component: EditSidebar,
},
],
},
/**
* This route is the root-view that does not contain any parameters so far.
@ -78,19 +78,19 @@ const router = new Router({
*/
{
path: '/',
redirect: `/${getInitialView()}/now`
redirect: `/${getInitialView()}/now`,
},
{
path: '/p/:tokens/:fancyName?',
redirect: `/p/:tokens/${getInitialView()}/now`
redirect: `/p/:tokens/${getInitialView()}/now`,
},
{
path: '/public/:tokens/:fancyName?',
redirect: `/p/:tokens/${getInitialView()}/now`
redirect: `/p/:tokens/${getInitialView()}/now`,
},
{
path: '/embed/:tokens',
redirect: `/embed/:tokens/${getInitialView()}/now`
redirect: `/embed/:tokens/${getInitialView()}/now`,
},
/**
* This is the main route that contains the current view and viewed day
@ -107,48 +107,28 @@ const router = new Router({
{
path: '/:view/:firstDay/edit/popover/:object/:recurrenceId',
name: 'EditPopoverView',
component: EditSimple
component: EditSimple,
},
{
path: '/:view/:firstDay/edit/sidebar/:object/:recurrenceId',
name: 'EditSidebarView',
component: EditSidebar
component: EditSidebar,
},
{
path: '/:view/:firstDay/new/popover/:allDay/:dtstart/:dtend',
name: 'NewPopoverView',
component: EditSimple
component: EditSimple,
},
{
path: '/:view/:firstDay/new/sidebar/:allDay/:dtstart/:dtend',
name: 'NewSidebarView',
component: EditSidebar
}
]
}
]
component: EditSidebar,
},
],
},
],
})
windowTitleService(router)
export default router
//
// {
// // This route can be used in order to link to events without knowing it's date
// path: '/edit/:object',
// name: 'EditNoDateNoRecurrenceId',
// redirect: {
// name: 'Edit',
//
// }
// },
// {
// // This route can be used in order to link to events without knowing it's date
// path: '/edit/:object/:recurrenceId',
// name: 'EditNoDate',
// redirect: {
// name: 'Edit',
//
// }
// },

View File

@ -26,7 +26,7 @@ import { getRequestToken } from '@nextcloud/auth'
function xhrProvider() {
const headers = {
'X-Requested-With': 'XMLHttpRequest',
'requesttoken': getRequestToken()
'requesttoken': getRequestToken(),
}
const xhr = new XMLHttpRequest()
const oldOpen = xhr.open
@ -34,7 +34,7 @@ function xhrProvider() {
// override open() method to add headers
xhr.open = function() {
const result = oldOpen.apply(this, arguments)
for (let name in headers) {
for (const name in headers) {
xhr.setRequestHeader(name, headers[name])
}
@ -46,5 +46,5 @@ function xhrProvider() {
}
export default new DavClient({
rootUrl: generateRemoteUrl('dav')
rootUrl: generateRemoteUrl('dav'),
}, xhrProvider)

View File

@ -22,7 +22,7 @@
import dateRangeFormat from '../filters/dateRangeFormat.js'
import { getDateFromFirstdayParam } from '../utils/date.js'
let originalWindowTitle = document.title
const originalWindowTitle = document.title
/**
* This function listens to the router and
@ -43,7 +43,7 @@ export default function(router) {
const title = dateRangeFormat(date, currentView)
document.title = [
title,
originalWindowTitle
originalWindowTitle,
].join(' - ')
next()

View File

@ -22,7 +22,7 @@
import Vue from 'vue'
import getTimezoneManager from '../services/timezoneDataProviderService'
import {
getDateFromDateTimeValue
getDateFromDateTimeValue,
} from '../utils/date.js'
import DurationValue from 'calendar-js/src/values/durationValue.js'
import AttendeeProperty from 'calendar-js/src/properties/attendeeProperty.js'
@ -32,12 +32,12 @@ import Property from 'calendar-js/src/properties/property.js'
import { getBySetPositionAndBySetFromDate, getWeekDayFromDate } from '../utils/recurrence.js'
import {
getAlarmFromAlarmComponent,
getDefaultCalendarObjectInstanceObject
getDefaultCalendarObjectInstanceObject,
} from '../models/calendarObjectInstance.js'
import {
getAmountAndUnitForTimedEvents,
getAmountHoursMinutesAndUnitForAllDayEvents,
getTotalSecondsFromAmountAndUnitForTimedEvents, getTotalSecondsFromAmountHourMinutesAndUnitForAllDayEvents
getTotalSecondsFromAmountAndUnitForTimedEvents, getTotalSecondsFromAmountHourMinutesAndUnitForAllDayEvents,
} from '../utils/alarms.js'
const state = {}
@ -351,7 +351,7 @@ const mutations = {
role,
rsvp,
uri,
attendeeProperty: attendee
attendeeProperty: attendee,
})
},
@ -570,7 +570,7 @@ const mutations = {
'BYYEARDAY',
'BYWEEKNO',
'BYMONTH',
'BYSETPOS'
'BYSETPOS',
]
for (const part of parts) {
@ -633,7 +633,7 @@ const mutations = {
if (recurrenceRule.recurrenceRuleValue) {
const {
byDay,
bySetPosition
bySetPosition,
} = getBySetPositionAndBySetFromDate(calendarObjectInstance.startDate)
recurrenceRule.recurrenceRuleValue.setComponent('BYDAY', [byDay])
recurrenceRule.recurrenceRuleValue.setComponent('BYSETPOS', [bySetPosition])
@ -1242,7 +1242,7 @@ const mutations = {
calendarObjectInstance.alarms.splice(index, 1)
}
}
}
},
}
const getters = {}
@ -1265,7 +1265,7 @@ const actions = {
// of start and end and trigger an update of end if necessary
commit('changeStartDate', {
calendarObjectInstance,
startDate: calendarObjectInstance.startDate
startDate: calendarObjectInstance.startDate,
})
},
@ -1285,7 +1285,7 @@ const actions = {
// of start and end and trigger an update of start if necessary
commit('changeEndDate', {
calendarObjectInstance,
endDate: calendarObjectInstance.endDate
endDate: calendarObjectInstance.endDate,
})
},
@ -1312,16 +1312,16 @@ const actions = {
commit('changeRecurrenceFrequency', {
calendarObjectInstance,
recurrenceRule: calendarObjectInstance.recurrenceRule,
frequency
frequency,
})
commit('changeRecurrenceInterval', {
calendarObjectInstance,
recurrenceRule: calendarObjectInstance.recurrenceRule,
interval: 1
interval: 1,
})
commit('changeRecurrenceToInfinite', {
calendarObjectInstance,
recurrenceRule: calendarObjectInstance.recurrenceRule
recurrenceRule: calendarObjectInstance.recurrenceRule,
})
dispatch('setDefaultRecurrenceByParts', { calendarObjectInstance, recurrenceRule, frequency })
@ -1336,7 +1336,7 @@ const actions = {
commit('changeRecurrenceFrequency', {
calendarObjectInstance,
recurrenceRule: calendarObjectInstance.recurrenceRule,
frequency
frequency,
})
dispatch('setDefaultRecurrenceByParts', { calendarObjectInstance, recurrenceRule, frequency })
}
@ -1378,7 +1378,7 @@ const actions = {
setRecurrenceToInfinite({ commit }, { calendarObjectInstance, recurrenceRule }) {
commit('changeRecurrenceToInfinite', {
calendarObjectInstance,
recurrenceRule
recurrenceRule,
})
},
@ -1421,7 +1421,7 @@ const actions = {
enableYearlyRecurrenceBySetPosition({ commit }, { calendarObjectInstance, recurrenceRule }) {
commit('setDefaultRecurrenceByPartsForMonthlyBySetPosition', {
calendarObjectInstance,
recurrenceRule
recurrenceRule,
})
},
@ -1437,11 +1437,11 @@ const actions = {
commit('changeRecurrenceByDay', {
calendarObjectInstance,
recurrenceRule,
byDay: []
byDay: [],
})
commit('unsetRecurrenceBySetPosition', {
calendarObjectInstance,
recurrenceRule
recurrenceRule,
})
},
@ -1496,7 +1496,7 @@ const actions = {
commit('changeRecurrenceUntil', {
calendarObjectInstance,
recurrenceRule,
until
until,
})
},
@ -1513,7 +1513,7 @@ const actions = {
commit('changeRecurrenceCount', {
calendarObjectInstance,
recurrenceRule,
count: 2 // Default value is two
count: 2, // Default value is two
})
},
@ -1565,7 +1565,7 @@ const actions = {
commit('changeTimeToDefaultForTimedEvents', { calendarObjectInstance })
}
}
},
}

View File

@ -29,7 +29,7 @@ import { createEvent, getTimezoneManager } from 'calendar-js'
const state = {
calendarObjects: {},
modificationCount: 0
modificationCount: 0,
}
const mutations = {
@ -88,7 +88,7 @@ const mutations = {
*/
incrementModificationCount(state) {
state.modificationCount++
}
},
}
const getters = {
@ -99,7 +99,7 @@ const getters = {
* @param {Object} state The store data
* @returns {function({String}): CalendarObject}
*/
getCalendarObjectById: (state) => (id) => state.calendarObjects[id]
getCalendarObjectById: (state) => (id) => state.calendarObjects[id],
}
const actions = {
@ -133,31 +133,31 @@ const actions = {
}
context.commit('deleteCalendarObject', {
calendarObject
calendarObject,
})
await calendarObject.dav.move(newCalendarObject.dav)
context.commit('appendCalendarObject', { calendarObject })
context.commit('addCalendarObjectToCalendar', {
calendar: {
id: newCalendarId
id: newCalendarId,
},
calendarObjectId: calendarObject.id
calendarObjectId: calendarObject.id,
})
context.commit('addCalendarObjectIdToAllTimeRangesOfCalendar', {
calendarId: newCalendarId,
calendarObjectId: calendarObject.id
calendarObjectId: calendarObject.id,
})
context.commit('deleteCalendarObjectFromCalendar', {
calendar: {
id: oldCalendarId
id: oldCalendarId,
},
calendarObjectId: oldCalendarObjectId
calendarObjectId: oldCalendarObjectId,
})
context.commit('removeCalendarObjectIdFromAllTimeRangesOfCalendar', {
calendarId: oldCalendarId,
calendarObjectId: oldCalendarObjectId
calendarObjectId: oldCalendarObjectId,
})
context.commit('incrementModificationCount')
@ -178,7 +178,7 @@ const actions = {
context.commit('addCalendarObjectIdToAllTimeRangesOfCalendar', {
calendarId: calendarObject.calendarId,
calendarObjectId: calendarObject.id
calendarObjectId: calendarObject.id,
})
context.commit('incrementModificationCount')
@ -193,13 +193,13 @@ const actions = {
context.commit('appendCalendarObject', { calendarObject })
context.commit('addCalendarObjectToCalendar', {
calendar: {
id: calendarObject.calendarId
id: calendarObject.calendarId,
},
calendarObjectId: calendarObject.id
calendarObjectId: calendarObject.id,
})
context.commit('addCalendarObjectIdToAllTimeRangesOfCalendar', {
calendarId: calendarObject.calendarId,
calendarObjectId: calendarObject.id
calendarObjectId: calendarObject.id,
})
context.commit('incrementModificationCount')
},
@ -221,13 +221,13 @@ const actions = {
context.commit('appendCalendarObject', { calendarObject })
context.commit('addCalendarObjectToCalendar', {
calendar: {
id: calendarObject.calendarId
id: calendarObject.calendarId,
},
calendarObjectId: calendarObject.id
calendarObjectId: calendarObject.id,
})
context.commit('addCalendarObjectIdToAllTimeRangesOfCalendar', {
calendarId: calendar.id,
calendarObjectId: calendarObject.id
calendarObjectId: calendarObject.id,
})
context.commit('incrementModificationCount')
},
@ -250,12 +250,12 @@ const actions = {
context.commit('deleteCalendarObject', { calendarObject })
context.commit('deleteCalendarObjectFromCalendar', {
calendar: {
id: calendarObject.calendarId
id: calendarObject.calendarId,
},
calendarObjectId: calendarObject.id
calendarObjectId: calendarObject.id,
})
context.commit('removeCalendarObjectIdFromAnyTimeRange', {
calendarObjectId: calendarObject.id
calendarObjectId: calendarObject.id,
})
context.commit('incrementModificationCount')
},
@ -278,10 +278,10 @@ const actions = {
const startDate = new Date(start * 1000)
const endDate = new Date(end * 1000)
let startDateTime = DateTimeValue
const startDateTime = DateTimeValue
.fromJSDate(startDate, true)
.getInTimezone(timezone)
let endDateTime = DateTimeValue
const endDateTime = DateTimeValue
.fromJSDate(endDate, true)
.getInTimezone(timezone)
@ -323,16 +323,16 @@ const actions = {
dispatch('changeStartTimezone', {
calendarObjectInstance,
startTimezone: timezoneId
startTimezone: timezoneId,
})
dispatch('changeEndTimezone', {
calendarObjectInstance,
endTimezone: timezoneId
endTimezone: timezoneId,
})
commit('changeStartDate', {
calendarObjectInstance,
startDate
startDate,
})
if (isAllDay) {
@ -340,19 +340,19 @@ const actions = {
// that changeEndDate expects is inclusive, so we have to deduct one day.
commit('changeEndDate', {
calendarObjectInstance,
endDate: new Date(endDate.getTime() - 24 * 60 * 60 * 1000)
endDate: new Date(endDate.getTime() - 24 * 60 * 60 * 1000),
})
} else {
commit('changeEndDate', {
calendarObjectInstance,
endDate
endDate,
})
}
if (!isDirty) {
calendarObjectInstance.eventComponent.undirtify()
}
}
},
}
export default { state, mutations, getters, actions }

View File

@ -38,7 +38,7 @@ import CalendarComponent from 'calendar-js/src/components/calendarComponent.js'
const state = {
calendars: [],
calendarsById: {},
initialCalendarsLoaded: false
initialCalendarsLoaded: false,
}
const mutations = {
@ -209,7 +209,7 @@ const mutations = {
writeable: false,
isGroup,
isCircle,
uri
uri,
}
state.calendarsById[calendar.id].shares.push(newSharee)
},
@ -224,7 +224,7 @@ const mutations = {
*/
unshareCalendar(state, { calendar, uri }) {
calendar = state.calendars.find(search => search.id === calendar.id)
let shareIndex = calendar.shares.findIndex(sharee => sharee.uri === uri)
const shareIndex = calendar.shares.findIndex(sharee => sharee.uri === uri)
calendar.shares.splice(shareIndex, 1)
},
@ -238,7 +238,7 @@ const mutations = {
*/
toggleCalendarShareWritable(state, { calendar, uri }) {
calendar = state.calendars.find(search => search.id === calendar.id)
let sharee = calendar.shares.find(sharee => sharee.uri === uri)
const sharee = calendar.shares.find(sharee => sharee.uri === uri)
sharee.writeable = !sharee.writeable
},
@ -296,7 +296,7 @@ const mutations = {
*/
markCalendarAsNotLoading(state, { calendar }) {
state.calendarsById[calendar.id].loading = false
}
},
}
const getters = {
@ -401,7 +401,7 @@ const getters = {
return true
})
}
},
}
const actions = {
@ -714,12 +714,12 @@ const actions = {
from: getUnixTimestampFromDate(from),
to: getUnixTimestampFromDate(to),
lastFetched: getUnixTimestampFromDate(dateFactory()),
calendarObjectIds: []
calendarObjectIds: [],
})
const insertId = context.getters.getLastTimeRangeInsertId
context.commit('addFetchedTimeRangeToCalendar', {
calendar,
fetchedTimeRangeId: insertId
fetchedTimeRangeId: insertId,
})
const calendarObjects = []
@ -734,7 +734,7 @@ const actions = {
context.commit('appendCalendarObjectsToCalendar', { calendar, calendarObjectIds })
context.commit('appendCalendarObjectIdsToTimeFrame', {
timeRangeId: insertId,
calendarObjectIds
calendarObjectIds,
})
context.commit('markCalendarAsNotLoading', { calendar })
@ -775,9 +775,9 @@ const actions = {
context.commit('appendCalendarObject', { calendarObject })
context.commit('addCalendarObjectToCalendar', {
calendar: {
id: calendarId
id: calendarId,
},
calendarObjectId: calendarObject.id
calendarObjectId: calendarObject.id,
})
},
@ -799,7 +799,7 @@ const actions = {
const calendarId = context.rootState.importFiles.importCalendarRelation[file.id]
if (calendarId === 'new') {
const displayName = file.parser.getName() || translate('calendar', 'Imported {filename}', {
filename: file.name
filename: file.name,
})
const color = file.parser.getColor() || uidToHexColor(displayName)
const components = []
@ -819,7 +819,7 @@ const actions = {
context.commit('addCalendar', { calendar })
context.commit('setCalendarForFileId', {
fileId: file.id,
calendarId: calendar.id
calendarId: calendar.id,
})
})
.catch((error) => { throw error })
@ -843,11 +843,11 @@ const actions = {
context.commit('appendCalendarObject', { calendarObject })
context.commit('addCalendarObjectToCalendar', {
calendar,
calendarObjectId: calendarObject.id
calendarObjectId: calendarObject.id,
})
context.commit('addCalendarObjectIdToAllTimeRangesOfCalendar', {
calendarId: calendar.id,
calendarObjectId: calendarObject.id
calendarObjectId: calendarObject.id,
})
context.commit('incrementAccepted')
}).catch((error) => {
@ -862,7 +862,7 @@ const actions = {
return Promise.all(requests).then(() => {
context.commit('changeStage', 'default')
})
}
},
}
export default { state, mutations, getters, actions }

View File

@ -23,7 +23,7 @@ import Vue from 'vue'
const state = {
contacts: [],
contactByEMail: {}
contactByEMail: {},
}
const mutations = {
@ -82,7 +82,7 @@ const mutations = {
if (index !== -1) {
state.contacts.splice(index, 1)
}
}
},
}
const getters = {}

View File

@ -21,7 +21,7 @@
*/
const state = {
minimumDate: '1970-01-01T00:00:00Z',
maximumDate: '2036-12-31T23:59:59Z'
maximumDate: '2036-12-31T23:59:59Z',
}
const mutations = {
@ -35,7 +35,7 @@ const mutations = {
loadDavRestrictionsFromServer(state, davRestrictions) {
state.minimumDate = davRestrictions.minimumDate
state.maximumDate = davRestrictions.maximumDate
}
},
}
const getters = {}

View File

@ -24,7 +24,7 @@ import Vue from 'vue'
const state = {
lastTimeRangeInsertId: -1,
fetchedTimeRanges: [],
fetchedTimeRangesById: {}
fetchedTimeRangesById: {},
}
const mutations = {
@ -47,7 +47,7 @@ const mutations = {
from,
to,
lastFetched,
calendarObjectIds
calendarObjectIds,
}
state.fetchedTimeRanges.push(fetchedTimeRange)
@ -189,7 +189,7 @@ const mutations = {
timerange.calendarObjectIds.splice(index, 1)
}
}
}
},
}
const getters = {
@ -245,7 +245,7 @@ const getters = {
return state.fetchedTimeRangesById[timeRangeId].calendarObjectIds.map((calendarObjectId) => {
return getters.getCalendarObjectById(calendarObjectId)
})
}
},
}
const actions = {}

View File

@ -27,7 +27,7 @@ const state = {
lastFileInsertId: -1,
importFiles: [],
importFilesById: {},
importCalendarRelation: {}
importCalendarRelation: {},
}
const mutations = {
@ -52,7 +52,7 @@ const mutations = {
name,
parser,
size,
type
type,
}
state.importFiles.push(file)
@ -97,7 +97,7 @@ const mutations = {
Vue.set(state, 'importFiles', [])
Vue.set(state, 'importFilesById', {})
Vue.set(state, 'importCalendarRelation', {})
}
},
}
const getters = {}

View File

@ -26,7 +26,7 @@ const state = {
total: 0,
accepted: 0,
denied: 0,
stage: 'default'
stage: 'default',
}
const mutations = {
@ -79,7 +79,7 @@ const mutations = {
state.accepted = 0
state.denied = 0
state.stage = 'default'
}
},
}
const getters = {}

View File

@ -50,8 +50,8 @@ export default new Vuex.Store({
importFiles,
importState,
principals,
settings
}
settings,
},
// // Throw errors when the state is edited outside of mutations
// strict: true
})

View File

@ -27,7 +27,7 @@ import { getDefaultPrincipalObject, mapDavToPrincipal } from '../models/principa
const state = {
principals: [],
principalsById: {},
currentUserPrincipal: null
currentUserPrincipal: null,
}
const mutations = {
@ -59,7 +59,7 @@ const mutations = {
*/
setCurrentUserPrincipal(state, { principalId }) {
state.currentUserPrincipal = principalId
}
},
}
const getters = {
@ -94,7 +94,7 @@ const getters = {
* @param {Object} state the store data
* @returns {String}
*/
getCurrentUserPrincipalEmail: (state) => state.principalsById[state.currentUserPrincipal].emailAddress
getCurrentUserPrincipalEmail: (state) => state.principalsById[state.currentUserPrincipal].emailAddress,
}
const actions = {
@ -119,7 +119,7 @@ const actions = {
}
context.commit('addPrincipal', {
principal: mapDavToPrincipal(principal)
principal: mapDavToPrincipal(principal),
})
},
@ -140,7 +140,7 @@ const actions = {
context.commit('addPrincipal', { principal })
context.commit('setCurrentUserPrincipal', { principalId: principal.id })
logger.debug(`Current user principal is ${principal.url}`)
}
},
}
export default { state, mutations, getters, actions }

View File

@ -32,7 +32,7 @@ const state = {
showWeekends: null,
showWeekNumbers: null,
skipPopover: null,
timezone: null
timezone: null,
}
const mutations = {
@ -90,7 +90,7 @@ const mutations = {
state.showWeekends = settings.showWeekends
state.skipPopover = settings.skipPopover
state.timezone = settings.timezone
}
},
}
const getters = {
@ -116,7 +116,7 @@ const getters = {
*/
getResolvedTimezone: (state) => state.timezone === 'automatic'
? detectTimezone()
: state.timezone
: state.timezone,
}
const actions = {
@ -204,7 +204,7 @@ const actions = {
*/
async setInitialView(context, { initialView }) {
await HttpClient.post(getLinkToConfig('view'), {
value: initialView
value: initialView,
})
},
@ -222,7 +222,7 @@ const actions = {
}
await HttpClient.post(getLinkToConfig('timezone'), {
value: timezoneId
value: timezoneId,
}).then((response) => {
context.commit('setTimezone', { timezoneId })
}).catch((error) => {
@ -241,9 +241,9 @@ const actions = {
setConfig('component-list-significant-change', [
'SUMMARY',
'LOCATION',
'DESCRIPTION'
'DESCRIPTION',
])
}
},
}
export default { state, mutations, getters, actions }

Some files were not shown because too many files have changed in this diff Show More