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" /> 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 @@ --> 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" /> @@ -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 @@ @@ -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 @@ --> 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 @@ @@ -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--timed"> - + + @change="changeRelativeUnitTimed" />
+ class="property-alarm-item__edit property-alarm-item__edit--all-day">
- + + @change="changeRelativeUnitAllDay" />
{{ $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" />
- + + @select="changeValue" />
{{ selectedValue.label }}
@@ -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 }">