Skip to content

Commit 79ce0ac

Browse files
Merge pull request #1971 from nextcloud/vue3
chore: migrate the app to vue 3
2 parents b998341 + 931dfe2 commit 79ce0ac

37 files changed

+923
-1270
lines changed

package-lock.json

Lines changed: 610 additions & 908 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@
3131
"@nextcloud/axios": "^2.4.0",
3232
"@nextcloud/calendar-js": "6.1.0",
3333
"@nextcloud/cdav-library": "1.1.0",
34-
"@nextcloud/dialogs": "^5.1.1",
34+
"@nextcloud/dialogs": "4.1.0",
3535
"@nextcloud/event-bus": "^3.1.0",
3636
"@nextcloud/initial-state": "2.1.0",
3737
"@nextcloud/l10n": "^2.2.0",
3838
"@nextcloud/logger": "^2.7.0",
3939
"@nextcloud/moment": "^1.3.1",
4040
"@nextcloud/router": "^2.2.1",
41-
"@nextcloud/vue": "8.5.1",
41+
"@nextcloud/vue": "9.0.0-alpha.0",
4242
"@vueuse/components": "^10.7.2",
4343
"color-convert": "^2.0.1",
4444
"debounce": "^2.0.0",
@@ -51,25 +51,22 @@
5151
"markdown-it-task-lists": "^2.1.1",
5252
"md5": "^2.3.0",
5353
"p-limit": "^5.0.0",
54+
"sortablejs-vue3": "^1.2.11",
5455
"uuid": "^9.0.1",
55-
"vue": "^2.7.16",
56-
"vue-material-design-icons": "^5.2.0",
57-
"vue-router": "^3.6.5",
58-
"vuedraggable": "^2.24.3",
59-
"vuex": "^3.6.2",
60-
"vuex-router-sync": "^5.0.0"
56+
"vue": "^3.4.15",
57+
"vue-material-design-icons": "^5.3.0",
58+
"vue-router": "^4.2.5",
59+
"vuex": "^4.1.0"
6160
},
6261
"devDependencies": {
6362
"@nextcloud/babel-config": "^1.0.0",
6463
"@nextcloud/browserslist-config": "^3.0.0",
65-
"@nextcloud/eslint-config": "^8.3.0",
64+
"@nextcloud/eslint-config": "github:nextcloud-libraries/eslint-config#vue3",
6665
"@nextcloud/stylelint-config": "^2.4.0",
67-
"@nextcloud/vite-config": "^1.2.0",
68-
"@vue/test-utils": "^1.3.6",
69-
"babel-core": "^7.0.0-bridge.0",
70-
"happy-dom": "^13.3.1",
66+
"@nextcloud/vite-config": "github:nextcloud-libraries/nextcloud-vite-config#vue3",
67+
"@vue/test-utils": "^2.4.4",
68+
"happy-dom": "^13.3.8",
7169
"mockdate": "^3.0.5",
72-
"regenerator-runtime": "^0.14.1",
7370
"vitest": "^1.2.2"
7471
},
7572
"engines": {

src/App.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
2121

2222
<template>
2323
<NcContent app-name="tasks">
24-
<AppNavigation @click.native="closeAppSidebar($event)" />
24+
<AppNavigation @click="closeAppSidebar($event)" />
2525

26-
<NcAppContent @click.native="closeAppSidebar($event)">
26+
<NcAppContent @click="closeAppSidebar($event)">
2727
<RouterView />
2828
</NcAppContent>
2929

@@ -49,6 +49,7 @@ export default {
4949
NcAppContent,
5050
NcContent,
5151
},
52+
inject: ['$OCA'],
5253
data() {
5354
return {
5455
searchString: '',

src/components/AppNavigation/CalendarSharee.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
3939

4040
<template #counter>
4141
<NcCheckboxRadioSwitch :disabled="loading"
42-
:checked="writeable"
43-
@update:checked="editSharee">
42+
:model-value="writeable"
43+
@update:model-value="editSharee">
4444
{{ t('tasks', 'Can edit') }}
4545
</NcCheckboxRadioSwitch>
4646
</template>

src/components/AppNavigation/ListItemCalendar.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
2727
:name="calendar.displayName"
2828
:class="{'list--edit': editing, 'list--deleted': !!deleteTimeout}"
2929
class="list reactive"
30-
@drop.native="dropTask"
31-
@dragover.native="dragOver"
32-
@dragenter.native="dragEnter"
33-
@dragleave.native="dragLeave">
30+
@drop="dropTask"
31+
@dragover="dragOver"
32+
@dragenter="dragEnter"
33+
@dragleave="dragLeave">
3434
<template #icon>
3535
<NcAppNavigationIconBullet :color="calendar.color" />
3636
</template>
@@ -111,6 +111,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
111111
<ShareCalendar v-if="shareOpen && !calendar.readOnly && !deleteTimeout" :calendar="calendar" />
112112
<div v-if="!deleteTimeout" :class="{error: nameError}" class="app-navigation-entry-edit">
113113
<NcTextField ref="editListInput"
114+
v-model="newCalendarName"
114115
v-tooltip="{
115116
content: tooltipMessage,
116117
shown: showTooltip('list_' + calendar.id),
@@ -119,14 +120,13 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
119120
type="text"
120121
:show-trailing-button="newCalendarName !== ''"
121122
trailing-button-icon="arrowRight"
122-
:value.sync="newCalendarName"
123123
:error="nameError"
124124
:label="t('tasks', 'List name')"
125125
@trailing-button-click="save(calendar)"
126126
@keyup="checkName($event, calendar)">
127127
<Pencil :size="16" />
128128
</NcTextField>
129-
<Colorpicker :selected-color="selectedColor" @color-selected="setColor(...arguments)" />
129+
<Colorpicker :selected-color="selectedColor" @color-selected="setColor" />
130130
</div>
131131
</li>
132132
</NcAppNavigationItem>

src/components/AppNavigation/Trashbin.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
7070
<div class="table__header">
7171
&nbsp;
7272
</div>
73-
<template v-for="item in items">
74-
<div :key="`${item.url}desc`" class="table__body">
73+
<template v-for="item in items" :key="`${item.url}body`">
74+
<div class="table__body">
7575
<div class="icon-bullet"
7676
:style="{ 'background-color': item.color }" />
7777
<div class="item-description">
@@ -83,10 +83,10 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
8383
</div>
8484
</div>
8585
</div>
86-
<div :key="`${item.url}date`" class="table__body table__body--deletedAt">
86+
<div class="table__body table__body--deletedAt">
8787
<NcDateTime class="timestamp" :timestamp="item.deletedAt" :ignore-seconds="true" />
8888
</div>
89-
<div :key="`${item.url}action`" class="table__body">
89+
<div class="table__body">
9090
<NcButton @click="restore(item)">
9191
<template #icon>
9292
<Undo :size="20" />

src/components/AppSidebar/CalendarPickerItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
2828
:disabled="isDisabled"
2929
:clearable="false"
3030
:options="calendarsMap"
31-
:value="calendarMap"
31+
:model-value="calendarMap"
3232
:placeholder="t('tasks', 'Select a calendar')"
3333
:append-to-body="false"
3434
@option:selected="change">

src/components/AppSidebar/MultiselectItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
2727
<NcSelect label="displayName"
2828
:disabled="isDisabled"
2929
:options="options"
30-
:value="value"
30+
:model-value="value"
3131
:placeholder="placeholder"
3232
:multiple="false"
3333
:searchable="false"

src/components/AppSidebar/NotesItem.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
3434
<pre><span>{{ newValue }}</span><br><br></pre>
3535
<textarea ref="note__editor"
3636
v-model="newValue"
37-
@keyup.27="setEditing(false)"
37+
@keyup.escape="setEditing(false)"
3838
@keydown.enter.ctrl.prevent="setValue()"
3939
@change="setValue()" />
4040
</div>
@@ -101,7 +101,7 @@ export default {
101101
mounted() {
102102
subscribe('tasks:edit-appsidebar-notes', this.setNotes)
103103
},
104-
beforeDestroy() {
104+
beforeUnmount() {
105105
unsubscribe('tasks:edit-appsidebar-notes', this.setNotes)
106106
},
107107
methods: {

src/components/AppSidebar/SliderItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
3939
type="number"
4040
:min="minValue"
4141
:max="maxValue"
42-
@keyup.27="setEditing(false)"
42+
@keyup.escape="setEditing(false)"
4343
@keydown.enter.prevent="setValue()">
4444
<input v-model="newValue"
4545
type="range"

0 commit comments

Comments
 (0)