Drop Nextcloud 22-24 support

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2022-09-05 11:24:47 +02:00
parent 34a9fb75ae
commit a87dfb4bc0
No known key found for this signature in database
GPG Key ID: CC42AC2A7F0E56D8
6 changed files with 19 additions and 43 deletions

View File

@ -12,14 +12,12 @@ jobs:
strategy:
matrix:
php-versions: ['7.4']
nextcloud-versions: ['stable22', 'stable23']
nextcloud-versions: ['master']
include:
- php-versions: '7.4'
nextcloud-versions: 'stable24'
- php-versions: '8.0'
nextcloud-versions: 'stable24'
nextcloud-versions: 'master'
- php-versions: '8.1'
nextcloud-versions: 'stable24'
nextcloud-versions: 'master'
- php-versions: '7.4'
nextcloud-versions: 'master'
- php-versions: '8.0'

View File

@ -33,7 +33,7 @@
<screenshot>https://raw.githubusercontent.com/nextcloud/calendar/main/screenshots/week_sidebar.png</screenshot>
<dependencies>
<php min-version="7.4" max-version="8.1" />
<nextcloud min-version="22" max-version="25" />
<nextcloud min-version="25" max-version="25" />
</dependencies>
<background-jobs>
<job>OCA\Calendar\BackgroundJob\CleanUpOutdatedBookingsJob</job>

View File

@ -95,8 +95,7 @@
</template>
{{ $t('calendar', 'Copy iOS/macOS CalDAV address') }}
</ActionButton>
<ActionLink v-if="hasAppointmentsFeature"
:href="availabilitySettingsUrl"
<ActionLink :href="availabilitySettingsUrl"
target="_blank">
<template #icon>
<OpenInNewIcon :size="20" decorative />
@ -260,10 +259,6 @@ export default {
selectedDefaultReminderOption() {
return this.defaultReminderOptions.find(o => o.value === this.defaultReminder)
},
hasAppointmentsFeature() {
// TODO: Remove me when Calendar doesn't support server < 23
return parseInt(OC.config.version.split('.')[0]) >= 23
},
availabilitySettingsUrl() {
return generateUrl('/settings/user/groupware')
},

View File

@ -102,10 +102,6 @@ export default {
return !['RESOURCE', 'ROOM'].includes(attendee.attendeeProperty.userType)
})
},
hasAdvancedFilters() {
// TODO: Remove me when Calendar doesn't support server < 23
return parseInt(OC.config.version.split('.')[0]) >= 23
},
noResourcesMessage() {
return this.$t('calendar', 'No rooms or resources yet')
},
@ -154,7 +150,7 @@ export default {
})
},
async loadRoomSuggestions() {
if (this.resources.length > 0 || !this.hasAdvancedFilters) {
if (this.resources.length > 0) {
this.suggestedRooms = []
return
}

View File

@ -56,11 +56,10 @@
</template>
</Multiselect>
<template v-if="hasAdvancedFilters">
<template>
<div class="resource-search__capacity">
<ResourceSeatingCapacity :value.sync="capacity" />
<Actions v-if="hasAdvancedFilters"
class="resource-search__capacity__actions">
<Actions class="resource-search__capacity__actions">
<ActionCheckbox :checked.sync="isAvailable">
<!-- Translators room or resource is not yet booked -->
{{ $t('calendar', 'Available') }}
@ -133,10 +132,6 @@ export default {
noResult() {
return this.$t('calendar', 'No match found')
},
hasAdvancedFilters() {
// TODO: Remove me when Calendar doesn't support server < 23
return parseInt(OC.config.version.split('.')[0]) >= 23
},
features() {
const features = []
if (this.isAccessible) {
@ -174,11 +169,9 @@ export default {
let results
try {
const query = { displayName: input }
if (this.hasAdvancedFilters) {
query.capacity = this.capacity
query.features = this.features
query.roomType = this.roomType
}
query.capacity = this.capacity
query.features = this.features
query.roomType = this.roomType
results = await advancedPrincipalPropertySearch(query)
} catch (error) {
logger.debug('Could not find resources', { error })
@ -226,17 +219,15 @@ export default {
})
// Check resource availability
if (this.hasAdvancedFilters) {
await checkResourceAvailability(
options,
this.$store.getters.getCurrentUserPrincipalEmail,
this.calendarObjectInstance.eventComponent.startDate,
this.calendarObjectInstance.eventComponent.endDate,
)
}
await checkResourceAvailability(
options,
this.$store.getters.getCurrentUserPrincipalEmail,
this.calendarObjectInstance.eventComponent.startDate,
this.calendarObjectInstance.eventComponent.endDate,
)
// Filter by availability
if (this.hasAdvancedFilters && this.isAvailable) {
if (this.isAvailable) {
options = options.filter(option => option.isAvailable)
}

View File

@ -34,7 +34,7 @@
:disabled="loadingCalendars" />
<!-- Appointment Configuration List -->
<template v-if="hasAppointmentsFeature && isAuthenticatedUser">
<template v-if="isAuthenticatedUser">
<AppNavigationSpacer />
<AppointmentConfigList />
</template>
@ -178,10 +178,6 @@ export default {
return null
},
hasAppointmentsFeature() {
// TODO: Remove the end condition when Calendar doesn't support server < 23
return !this.disableAppointments && parseInt(OC.config.version.split('.')[0]) >= 23
},
},
created() {
this.timeFrameCacheExpiryJob = setInterval(() => {