Skip to content

Commit cfa7a4f

Browse files
committed
chore(vue3): update eslint config for Vue3 features support
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
1 parent eb2ac22 commit cfa7a4f

File tree

4 files changed

+17
-16
lines changed

4 files changed

+17
-16
lines changed

eslint.config.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
55

6-
import { recommendedVue2Javascript } from '@nextcloud/eslint-config'
6+
import { recommendedJavascript } from '@nextcloud/eslint-config'
77

88
export default [
9-
...recommendedVue2Javascript,
10-
// Disabled rules from recommendedVue2Javascript pack
9+
...recommendedJavascript,
10+
1111
{
12+
name: 'notifications/disabled',
1213
rules: {
1314
'no-console': 'off',
1415
},

src/NotificationsApp.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
<NcHeaderMenu
77
v-if="!shutdown"
88
id="notifications"
9+
v-model:open="open"
910
class="notifications-button"
1011
:exclude-click-outside-selectors="['.popover']"
11-
:open.sync="open"
1212
:aria-label="t('notifications', 'Notifications')"
1313
:title="t('notifications', 'Notifications')"
1414
@open="onOpen">
@@ -238,7 +238,7 @@ export default {
238238
subscribe('user_status:status.updated', this.userStatusUpdated)
239239
},
240240
241-
beforeDestroy() {
241+
beforeUnmount() {
242242
unsubscribe('user_status:status.updated', this.userStatusUpdated)
243243
unsubscribe('networkOffline', this.handleNetworkOffline)
244244
unsubscribe('networkOnline', this.handleNetworkOnline)

src/views/AdminSettings.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
</p>
2424

2525
<NcCheckboxRadioSwitch
26-
:checked.sync="config.sound_notification"
27-
@update:checked="updateSettings">
26+
v-model="config.sound_notification"
27+
@update:model-value="updateSettings">
2828
{{ t('notifications', 'Play sound when a new notification arrives') }}
2929
</NcCheckboxRadioSwitch>
3030
<NcCheckboxRadioSwitch
31-
:checked.sync="config.sound_talk"
32-
@update:checked="updateSettings">
31+
v-model="config.sound_talk"
32+
@update:model-value="updateSettings">
3333
{{ t('notifications', 'Play sound when a call started (requires Nextcloud Talk)') }}
3434
</NcCheckboxRadioSwitch>
3535
</NcSettingsSection>

src/views/UserSettings.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,22 @@
2525
</p>
2626

2727
<NcCheckboxRadioSwitch
28-
:checked.sync="config.sound_notification"
29-
@update:checked="updateSettings">
28+
v-model="config.sound_notification"
29+
@update:model-value="updateSettings">
3030
{{ t('notifications', 'Play sound when a new notification arrives') }}
3131
</NcCheckboxRadioSwitch>
3232
<NcCheckboxRadioSwitch
33-
:checked.sync="config.sound_talk"
34-
@update:checked="updateSettings">
33+
v-model="config.sound_talk"
34+
@update:model-value="updateSettings">
3535
{{ t('notifications', 'Play sound when a call started (requires Nextcloud Talk)') }}
3636
</NcCheckboxRadioSwitch>
3737

3838
<template v-if="config.sound_talk">
3939
<NcCheckboxRadioSwitch
40+
v-model="storage.secondary_speaker"
4041
class="additional-margin-top"
41-
:checked.sync="storage.secondary_speaker"
4242
:disabled="isSafari"
43-
@update:checked="updateLocalSettings">
43+
@update:model-value="updateLocalSettings">
4444
{{ t('notifications', 'Also repeat sound on a secondary speaker') }}
4545
</NcCheckboxRadioSwitch>
4646
<div v-if="isSafari" class="notification-frequency__warning">
@@ -56,7 +56,7 @@
5656
:clearable="false"
5757
:placeholder="t('notifications', 'Select a device')"
5858
@open="initializeDevices"
59-
@input="updateLocalSettings" />
59+
@update:model-value="updateLocalSettings" />
6060
</template>
6161
</NcSettingsSection>
6262
</template>

0 commit comments

Comments
 (0)