diff --git a/.eslintrc.js b/.eslintrc.js
index d01b545ec..3a676f5dc 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -1,78 +1,5 @@
module.exports = {
- root: true,
- env: {
- browser: true,
- es6: true,
- node: true,
- jest: true
- },
- globals: {
- dayNames: true,
- dayNamesMin: true,
- monthNames: true,
- monthNamesShort: true,
- },
- parserOptions: {
- parser: 'babel-eslint'
- },
extends: [
- 'eslint:recommended',
- 'plugin:node/recommended',
- 'plugin:vue/essential',
- 'plugin:vue/recommended',
- 'standard'
- ],
- plugins: ['vue', 'node'],
- rules: {
- // space before function ()
- 'space-before-function-paren': ['error', 'never'],
- // curly braces always space
- 'object-curly-spacing': ['error', 'always'],
- // stay consistent with array brackets
- 'array-bracket-newline': ['error', 'consistent'],
- // 1tbs brace style
- 'brace-style': 'error',
- // tabs only
- indent: ['error', 'tab'],
- 'no-tabs': 0,
- 'vue/html-indent': ['error', 'tab'],
- // only debug console
- 'no-console': ['error', { allow: ['error', 'warn', 'debug'] }],
- // classes blocks
- 'padded-blocks': ['error', { classes: 'always' }],
- // always add a trailing comma, for diff readability
- 'comma-dangle': ["error", "only-multiline"],
- // always have the operator in front
- 'operator-linebreak': ['error', 'before'],
- // ternary on multiline
- 'multiline-ternary': ['error', 'always-multiline'],
- // force proper JSDocs
- 'valid-jsdoc': [2, {
- 'prefer': {
- 'return': 'returns'
- },
- 'requireReturn': false,
- 'requireReturnDescription': false
- }],
- // es6 import/export and require
- 'node/no-unpublished-require': ['off'],
- 'node/no-unsupported-features/es-syntax': ['off'],
- 'node/no-unsupported-features/es-builtins': ['off'],
- // space before self-closing elements
- 'vue/html-closing-bracket-spacing': 'error',
- // code spacing with attributes
- 'vue/max-attributes-per-line': [
- 'error',
- {
- singleline: 3,
- multiline: {
- max: 3,
- allowFirstLine: true
- }
- }
- ],
- "node/no-missing-import": ["error", {
- "tryExtensions": [".js", ".vue"]
- }]
- }
+ 'nextcloud'
+ ]
};
diff --git a/css/app-sidebar.scss b/css/app-sidebar.scss
index 3d6d8ce12..3dca86c13 100644
--- a/css/app-sidebar.scss
+++ b/css/app-sidebar.scss
@@ -491,24 +491,6 @@
}
}
- .calendar-picker-option {
- width: 100%;
- display: flex;
- align-items: center;
-
- &__color-indicator {
- width: 12px;
- height: 12px;
- border-radius: 50%;
- border: none;
- margin-right: 8px;
- }
-
- &__avatar {
- margin-left: auto;
- }
- }
-
.illustration-header {
max-height: 150px;
height: 150px;
@@ -601,3 +583,21 @@
border-bottom-color: var(--color-background-dark);
}
}
+
+.calendar-picker-option {
+ width: 100%;
+ display: flex;
+ align-items: center;
+
+ &__color-indicator {
+ width: 12px;
+ height: 12px;
+ border-radius: 50%;
+ border: none;
+ margin-right: 8px;
+ }
+
+ &__avatar {
+ margin-left: auto;
+ }
+}
diff --git a/package-lock.json b/package-lock.json
index ae8a9628b..aeccbdd48 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -6400,6 +6400,12 @@
}
}
},
+ "eslint-config-nextcloud": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/eslint-config-nextcloud/-/eslint-config-nextcloud-0.0.6.tgz",
+ "integrity": "sha512-ktCzXVA8GrqZVljutkBKOq2hgKvzKyLhNCAB5bCjdmMo7DIky2ZYeMtDmiEUZCPoXbSJY0kyvnZPbcN4VYzyCg==",
+ "dev": true
+ },
"eslint-config-standard": {
"version": "12.0.0",
"resolved": "http://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-12.0.0.tgz",
@@ -6689,6 +6695,15 @@
}
}
},
+ "eslint-plugin-nextcloud": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-nextcloud/-/eslint-plugin-nextcloud-0.3.0.tgz",
+ "integrity": "sha512-LUD2qdirGL0BRt4uaMDGxen17mWVq9JwuGDt7P7Celz7bzdu0X48RrS8mhXn9e0w78+nYN5kPoULG2Bw04r4HA==",
+ "dev": true,
+ "requires": {
+ "requireindex": "~1.2.0"
+ }
+ },
"eslint-plugin-node": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-10.0.0.tgz",
@@ -12392,6 +12407,12 @@
"integrity": "sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4=",
"dev": true
},
+ "requireindex": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz",
+ "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==",
+ "dev": true
+ },
"resolve": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz",
diff --git a/package.json b/package.json
index 659ded1a2..d326df69a 100644
--- a/package.json
+++ b/package.json
@@ -83,10 +83,12 @@
"browserslist-config-nextcloud": "0.0.1",
"css-loader": "^3.2.0",
"eslint": "^5.16.0",
+ "eslint-config-nextcloud": "0.0.6",
"eslint-config-standard": "^12.0.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-loader": "^3.0.2",
"eslint-plugin-import": "^2.18.2",
+ "eslint-plugin-nextcloud": "^0.3.0",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
diff --git a/src/components/AppNavigation/AppNavigationHeader/AppNavigationHeaderDatePicker.vue b/src/components/AppNavigation/AppNavigationHeader/AppNavigationHeaderDatePicker.vue
index c75c2ff81..b2f00b9e8 100644
--- a/src/components/AppNavigation/AppNavigationHeader/AppNavigationHeaderDatePicker.vue
+++ b/src/components/AppNavigation/AppNavigationHeader/AppNavigationHeaderDatePicker.vue
@@ -27,17 +27,15 @@
class="datepicker-button-section__previous button icon icon-leftarrow"
:title="previousLabel"
type="button"
- @click="navigateToPreviousTimeRange"
- />
+ @click="navigateToPreviousTimeRange" />
-
+ @change="navigateToDate" />
+ @click="navigateToNextTimeRange" />
diff --git a/src/components/AppNavigation/AppNavigationHeader/AppNavigationHeaderTodayButton.vue b/src/components/AppNavigation/AppNavigationHeader/AppNavigationHeaderTodayButton.vue
index 8b31fdfa9..c8aa45030 100644
--- a/src/components/AppNavigation/AppNavigationHeader/AppNavigationHeaderTodayButton.vue
+++ b/src/components/AppNavigation/AppNavigationHeader/AppNavigationHeaderTodayButton.vue
@@ -26,8 +26,7 @@
:aria-label="title"
class="button"
:title="title"
- @click="today()"
- >
+ @click="today()">
{{ $t('calendar', 'Today') }}
diff --git a/src/components/AppNavigation/CalendarList.vue b/src/components/AppNavigation/CalendarList.vue
index 731e0b3d7..29ae22167 100644
--- a/src/components/AppNavigation/CalendarList.vue
+++ b/src/components/AppNavigation/CalendarList.vue
@@ -20,40 +20,38 @@
-->
-
-
-
-
+
+
+
+ :calendar="calendar" />
+ :key="spacerKey" />
-
-
-
+
+
+ :calendar="calendar" />
-
-
-
+
+
+ :calendar="calendar" />
diff --git a/src/components/AppNavigation/CalendarList/CalendarListItem.vue b/src/components/AppNavigation/CalendarList/CalendarListItem.vue
index b9ebcf592..471b73de0 100644
--- a/src/components/AppNavigation/CalendarList/CalendarListItem.vue
+++ b/src/components/AppNavigation/CalendarList/CalendarListItem.vue
@@ -25,19 +25,16 @@
:loading="calendar.loading"
:title="calendar.displayName || $t('calendar', 'Untitled calendar')"
:class="{deleted: !!deleteTimeout, disabled: !calendar.enabled, 'open-sharing': shareMenuOpen}"
- @click.prevent.stop="toggleEnabled"
- >
+ @click.prevent.stop="toggleEnabled">
+ @click.prevent.stop="toggleEnabled" />
+ @click.prevent.stop="toggleEnabled" />
@@ -54,27 +51,23 @@
+ @click.prevent.stop="openRenameInput">
{{ $t('calendar', 'Edit name') }}
+ @submit.prevent.stop="saveRenameInput" />
+ icon="icon-loading-small">
{{ $t('calendar', 'Saving name ...') }}
+ @click.prevent.stop="openColorInput">
{{ $t('calendar', 'Edit color') }}
+ @submit.prevent.stop="saveColorInput" />
+ icon="icon-loading-small">
{{ $t('calendar', 'Saving color ...') }}
+ @click.stop.prevent="copyLink">
{{ $t('calendar', 'Copy private link') }}
+ :title="$t('calendar', 'Download')" />
+ @click.prevent.stop="deleteCalendar">
{{ $t('calendar', 'Unshare from me') }}
+ @click.prevent.stop="deleteCalendar">
{{ $t('calendar', 'Delete') }}
@@ -122,26 +109,26 @@
+ @click.prevent.stop="cancelDeleteCalendar">
{{ $n('calendar', 'Unsharing the calendar in {countdown} second', 'Unsharing the calendar in {countdown} seconds', countdown, { countdown }) }}
+ @click.prevent.stop="cancelDeleteCalendar">
{{ $n('calendar', 'Deleting the calendar in {countdown} second', 'Deleting the calendar in {countdown} seconds', countdown, { countdown }) }}
-
-
-
+
+
+
@@ -150,6 +137,7 @@
diff --git a/src/components/AppNavigation/CalendarList/CalendarListItemSharingPublishItem.vue b/src/components/AppNavigation/CalendarList/CalendarListItemSharingPublishItem.vue
index e1173828c..fb6518712 100644
--- a/src/components/AppNavigation/CalendarList/CalendarListItemSharingPublishItem.vue
+++ b/src/components/AppNavigation/CalendarList/CalendarListItemSharingPublishItem.vue
@@ -22,8 +22,7 @@
+ :menu-open.sync="menuOpen">
@@ -32,15 +31,13 @@
+ @click.prevent.stop="publishCalendar">
{{ $t('calendar', 'Publish calendar') }}
+ :disabled="true">
{{ $t('calendar', 'Publishing calendar') }}
@@ -49,8 +46,7 @@
+ @click.prevent.stop="copyPublicLink">
{{ $t('calendar', 'Copy public link') }}
@@ -59,85 +55,72 @@
+ @click.prevent.stop="openEMailLinkInput">
{{ $t('calendar', 'Send link to calendar via email') }}
+ @submit.prevent.stop="sendLinkViaEMail" />
+ icon="icon-loading-small">
{{ $t('calendar', 'Sending email ...') }}
+ @click.prevent.stop="copySubscriptionLink">
{{ $t('calendar', 'Copy subscription link') }}
+ icon="icon-loading-small">
{{ $t('calendar', 'Copying link ...') }}
+ icon="icon-calendar-dark">
{{ $t('calendar', 'Copied link') }}
+ icon="icon-calendar-dark">
{{ $t('calendar', 'Could not copy link') }}
+ @click.prevent.stop="copyEmbedCode">
{{ $t('calendar', 'Copy embedding code') }}
+ icon="icon-loading-small">
{{ $t('calendar', 'Copying code ...') }}
+ icon="icon-embed">
{{ $t('calendar', 'Copied code') }}
+ icon="icon-embed">
{{ $t('calendar', 'Could not copy code') }}
+ @click.prevent.stop="unpublishCalendar">
{{ $t('calendar', 'Delete share link') }}
+ icon="icon-loading-small">
{{ $t('calendar', 'Deleting share link ...') }}
@@ -146,6 +129,7 @@
diff --git a/src/components/AppNavigation/Settings/ImportScreen.vue b/src/components/AppNavigation/Settings/ImportScreen.vue
index 8b782f37a..2a862555a 100644
--- a/src/components/AppNavigation/Settings/ImportScreen.vue
+++ b/src/components/AppNavigation/Settings/ImportScreen.vue
@@ -21,7 +21,7 @@
-->
-
+
{{ $t('calendar', 'Import calendars') }}
@@ -38,7 +38,7 @@
{{ $t('calendar', 'Calendar to import into') }}
-
+
@@ -49,7 +49,7 @@
{{ $n('calendar', 'Import calendar', 'Import calendars', files.length) }}
-
+
diff --git a/src/components/Editor/Alarm/AlarmList.vue b/src/components/Editor/Alarm/AlarmList.vue
index 754184e58..19f6e4be3 100644
--- a/src/components/Editor/Alarm/AlarmList.vue
+++ b/src/components/Editor/Alarm/AlarmList.vue
@@ -22,21 +22,18 @@
-
-
+
-
+ @addAlarm="addAlarm" />
+
@@ -61,7 +58,7 @@ export default {
calendarObjectInstance: {
type: Object,
required: true
- },
+ }
},
computed: {
alarms() {
diff --git a/src/components/Editor/Alarm/AlarmListItem.vue b/src/components/Editor/Alarm/AlarmListItem.vue
index f57f0839a..8e8ecc69f 100644
--- a/src/components/Editor/Alarm/AlarmListItem.vue
+++ b/src/components/Editor/Alarm/AlarmListItem.vue
@@ -24,55 +24,47 @@
+ class="property-alarm-item">
+ class="property-alarm-item__label">
{{ alarm | formatAlarm(isAllDay, currentUserTimezone) }}
+ class="property-alarm-item__edit property-alarm-item__edit--all-day">
{{ $t('calendar', 'before at') }}
@@ -82,31 +74,26 @@
:format="timeFormat"
type="time"
:value="relativeAllDayDate"
- @change="changeRelativeHourMinuteAllDay"
- />
+ @change="changeRelativeHourMinuteAllDay" />
+ class="property-alarm-item__edit property-alarm-item__edit--absolute">
+ @change="changeAbsoluteDate" />
+ class="property-alarm-item__options">
+ @click="editAlarm">
{{ $t('calendar', 'Edit reminder') }}
@@ -114,32 +101,28 @@
v-if="isEditing"
:name="alarmTypeName"
:checked="isAlarmTypeDisplay"
- @change="changeType('DISPLAY')"
- >
+ @change="changeType('DISPLAY')">
{{ $t('calendar', 'Notification') }}
+ @change="changeType('EMAIL')">
{{ $t('calendar', 'Email') }}
+ @change="changeType('AUDIO')">
{{ $t('calendar', 'Audio notification') }}
+ @change="changeType(alarm.type)">
{{ $t('calendar', 'Other notification') }}
@@ -147,23 +130,20 @@
v-if="isEditing && !isRecurring"
:name="alarmTriggerName"
:checked="isRelativeAlarm"
- @change="switchToRelativeAlarm"
- >
+ @change="switchToRelativeAlarm">
{{ $t('calendar', 'Relative to event') }}
+ @change="switchToAbsoluteAlarm">
{{ $t('calendar', 'On date') }}
+ @click="removeAlarm">
{{ $t('calendar', 'Remove reminder') }}
diff --git a/src/components/Editor/Alarm/AlarmListNew.vue b/src/components/Editor/Alarm/AlarmListNew.vue
index 415ed0f77..f66f8f308 100644
--- a/src/components/Editor/Alarm/AlarmListNew.vue
+++ b/src/components/Editor/Alarm/AlarmListNew.vue
@@ -23,8 +23,7 @@
diff --git a/src/components/Editor/Alarm/AlarmTimeUnitSelect.vue b/src/components/Editor/Alarm/AlarmTimeUnitSelect.vue
index d9287fc32..80bb83060 100644
--- a/src/components/Editor/Alarm/AlarmTimeUnitSelect.vue
+++ b/src/components/Editor/Alarm/AlarmTimeUnitSelect.vue
@@ -28,8 +28,7 @@
:disabled="disabled"
track-by="unit"
label="label"
- @select="select"
- />
+ @select="select" />
diff --git a/src/components/Editor/Properties/PropertyCalendarPicker.vue b/src/components/Editor/Properties/PropertyCalendarPicker.vue
index 28d8e4263..b4efdcf93 100644
--- a/src/components/Editor/Properties/PropertyCalendarPicker.vue
+++ b/src/components/Editor/Properties/PropertyCalendarPicker.vue
@@ -24,28 +24,24 @@
+ :title="$t('calendar', 'Calendar')" />
-
+
+ @selectCalendar="selectCalendar" />
-
+ :owner="calendar.owner" />
@@ -67,17 +63,17 @@ export default {
},
calendars: {
type: Array,
- required: true,
+ required: true
},
isReadOnly: {
type: Boolean,
required: true
- },
+ }
},
computed: {
display() {
return this.calendar !== undefined
- },
+ }
},
methods: {
selectCalendar(value) {
diff --git a/src/components/Editor/Properties/PropertySelect.vue b/src/components/Editor/Properties/PropertySelect.vue
index a3f7004fc..c38495cca 100644
--- a/src/components/Editor/Properties/PropertySelect.vue
+++ b/src/components/Editor/Properties/PropertySelect.vue
@@ -25,14 +25,12 @@
+ :title="readableName" />
@@ -50,16 +47,19 @@
+ class="property-select__info icon-details" />
diff --git a/src/components/Editor/Properties/PropertyText.vue b/src/components/Editor/Properties/PropertyText.vue
index e61d1b75b..29538bded 100644
--- a/src/components/Editor/Properties/PropertyText.vue
+++ b/src/components/Editor/Properties/PropertyText.vue
@@ -25,13 +25,11 @@
+ :title="readableName" />
+ :class="{ 'property-text__input--readonly': isReadOnly }">
+ @input.prevent.stop="changeValue" />
{{ value }}
@@ -48,8 +45,7 @@
+ class="property-text__info icon-details" />
@@ -86,7 +82,7 @@ export default {
} else {
this.$emit('update:value', event.target.value)
}
- },
+ }
}
}
diff --git a/src/components/Editor/Properties/PropertyTitle.vue b/src/components/Editor/Properties/PropertyTitle.vue
index 9a034485c..8a857b55b 100644
--- a/src/components/Editor/Properties/PropertyTitle.vue
+++ b/src/components/Editor/Properties/PropertyTitle.vue
@@ -24,15 +24,13 @@
@@ -50,12 +48,12 @@ export default {
value: {
type: String,
default: ''
- },
+ }
},
methods: {
changeValue(event) {
this.$emit('update:value', event.target.value)
- },
+ }
}
}
diff --git a/src/components/Editor/Properties/PropertyTitleTimePicker.vue b/src/components/Editor/Properties/PropertyTitleTimePicker.vue
index 202d1f8cc..c450fc858 100644
--- a/src/components/Editor/Properties/PropertyTitleTimePicker.vue
+++ b/src/components/Editor/Properties/PropertyTitleTimePicker.vue
@@ -26,37 +26,32 @@
+ class="property-title-time-picker__time-pickers">
+ @change="changeStart">
+ @click.stop.prevent="showTimezonePickerForStartDate" />
+ open-class="timezone-popover-wrapper">
{{ $t('calendar', 'Please select a timezone for the start-date:') }}
-
+ @change="changeStartTimezone" />
@@ -67,37 +62,32 @@
:format="endDateFormat"
:value="endDate"
:type="timeType"
- @change="changeEnd"
- >
+ @change="changeEnd">
+ @click.stop.prevent="showTimezonePickerForEndDate" />
+ open-class="timezone-popover-wrapper">
{{ $t('calendar', 'Please select a timezone for the end-date:') }}
-
+ @change="changeEndTimezone" />
+ class="property-title-time-picker__time-pickers property-title-time-picker__time-pickers--readonly">
{{ formattedStart }}
@@ -106,8 +96,7 @@
v-if="!isAllDay"
v-tooltip="startTimezone"
class="property-title-time-picker-read-only-wrapper__icon icon icon-timezone"
- :class="{ 'property-title-time-picker-read-only-wrapper__icon--highlighted': highlightStartTimezone } "
- />
+ :class="{ 'property-title-time-picker-read-only-wrapper__icon--highlighted': highlightStartTimezone } " />
@@ -117,8 +106,7 @@
v-if="!isAllDay"
v-tooltip="endTimezone"
class="property-title-time-picker-read-only-wrapper__icon icon icon-timezone"
- :class="{ 'property-title-time-picker-read-only-wrapper__icon--highlighted': highlightEndTimezone }"
- />
+ :class="{ 'property-title-time-picker-read-only-wrapper__icon--highlighted': highlightEndTimezone }" />
@@ -129,12 +117,10 @@
type="checkbox"
class="checkbox"
:disabled="!canModifyAllDay || isReadOnly"
- @change="toggleAllDay"
- >
+ @change="toggleAllDay">
@@ -144,9 +130,6 @@
diff --git a/src/components/Editor/Repeat/RepeatFreqYearlyOptions.vue b/src/components/Editor/Repeat/RepeatFreqYearlyOptions.vue
index 8396bbc18..47200dcfd 100644
--- a/src/components/Editor/Repeat/RepeatFreqYearlyOptions.vue
+++ b/src/components/Editor/Repeat/RepeatFreqYearlyOptions.vue
@@ -29,8 +29,7 @@
:key="option.value"
class="repeat-option-set-section-grid-item"
:class="{ primary: option.selected }"
- @click="toggleByMonth(option.value)"
- >
+ @click="toggleByMonth(option.value)">
{{ option.label }}
@@ -39,20 +38,17 @@
+ @change="toggleBySetPosition">
{{ $t('calendar', 'On the') }}
-
-
+
+ @change="changeByDay" />
@@ -84,7 +80,7 @@ export default {
*/
byMonth: {
type: Array,
- required: true,
+ required: true
},
/**
*
diff --git a/src/components/Editor/Repeat/RepeatOnTheSelect.vue b/src/components/Editor/Repeat/RepeatOnTheSelect.vue
index 139c16c04..a87372670 100644
--- a/src/components/Editor/Repeat/RepeatOnTheSelect.vue
+++ b/src/components/Editor/Repeat/RepeatOnTheSelect.vue
@@ -29,8 +29,7 @@
:placeholder="$t('calendar', 'Monday')"
track-by="value"
label="label"
- @select="select"
- />
+ @select="select" />
diff --git a/src/views/EditSimple.vue b/src/views/EditSimple.vue
index 4aaa666e3..4a7271c49 100644
--- a/src/views/EditSimple.vue
+++ b/src/views/EditSimple.vue
@@ -27,20 +27,16 @@
:placement="placement"
boundaries-element="#app-content"
open-class="event-popover"
- trigger="manual"
- >
+ trigger="manual">
+ v-if="isLoading" />
+ class="event-popover__close-action">
+ @click="cancel">
{{ $t('calendar', 'Close') }}
@@ -48,17 +44,15 @@
+ :illustration-url="backgroundImage" />
+ @update:value="updateTitle" />
-
+ @toggleAllDay="toggleAllDay" />
-
+ @selectCalendar="changeCalendar" />
-
-
+
+ @update:value="updateDescription" />
-
+ @showMore="showMore" />