Skip to content

Commit 287c13b

Browse files
authored
Merge pull request #1488 from nextcloud/chore/vue3
chore: Upgrade to nextcloud-vue v9 and vue v3
2 parents bdb83be + 823a871 commit 287c13b

7 files changed

Lines changed: 9588 additions & 7885 deletions

File tree

File renamed without changes.

.github/workflows/cluster-faces-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ jobs:
259259
- name: Parse face assignments
260260
if: steps.clustering-cache.outputs.cache-hit != 'true'
261261
run: |
262+
PATH=$PATH:/home/runner/.local/bin
262263
cat out.xml | xq '.["d:multistatus"]["d:response"] | map(select(.["d:href"] | test("faces/.+?/.+?"))) | map({"href": .["d:href"], "realpath": .["d:propstat"][0]["d:prop"]["nc:realpath"], "face-detections": .["d:propstat"][0]["d:prop"]["nc:face-detections"] | fromjson | map({userId, x, y, height, width, clusterId}) })' > out.json
263264
cat out.json
264265

package-lock.json

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

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,18 @@
4747
},
4848
"devDependencies": {
4949
"@nextcloud/axios": "^2.4.0",
50-
"@nextcloud/babel-config": "^1.0.0",
5150
"@nextcloud/browserslist-config": "^2.3.0",
5251
"@nextcloud/eslint-config": "^8.4.2",
5352
"@nextcloud/initial-state": "^2.0.0",
5453
"@nextcloud/router": "^2.1.2",
5554
"@nextcloud/stylelint-config": "^2.3.1",
56-
"@nextcloud/vue": "8.x",
57-
"@nextcloud/webpack-vue-config": "^5.5.1",
58-
"@vue/test-utils": "^1.1.3",
55+
"@nextcloud/vue": "9.x",
56+
"@nextcloud/webpack-vue-config": "7.x",
5957
"async-parallel": "^1.2.3",
6058
"fast-glob": "^3.2.11",
6159
"flickr-sdk": "^6.0.0",
6260
"google-img-scrap": "^1.0.6",
63-
"vue": "^2.7.14"
61+
"vue": "3.x"
6462
},
6563
"engines": {
6664
"node": "20.x",

src/admin.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import Vue from 'vue'
1+
import { createApp } from 'vue'
22
import App from './components/ViewAdmin.vue'
33
import AppGlobal from './mixins/AppGlobal.js'
44

5-
Vue.mixin(AppGlobal)
5+
const app = createApp(App)
6+
app.mixin(AppGlobal)
67

7-
global.Recognize = new Vue({
8-
el: '#recognize',
9-
render: h => h(App),
10-
})
8+
global.Recognize = app.mount('#recognize')

src/components/ViewAdmin.vue

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@
6161
</NcNoteCard>
6262
</template>
6363
<p>
64-
<NcCheckboxRadioSwitch :checked.sync="settings['faces.enabled']" type="switch" @update:checked="onChange">
64+
<NcCheckboxRadioSwitch v-model="settings['faces.enabled']" type="switch" @update:model-value="onChange">
6565
{{ t('recognize', 'Enable face recognition (groups photos by faces that appear in them; UI is in the photos app)') }}
6666
</NcCheckboxRadioSwitch>
6767
<NcTextField :disabled="!settings['faces.enabled']"
68-
:value.sync="settings['faces.batchSize']"
68+
v-model="settings['faces.batchSize']"
6969
:label-visible="true"
7070
:label="t('recognize', 'The number of files to process per job run (A job will be scheduled every 5 minutes; For normal operation ~500 or more, in WASM mode ~50 is recommended)')"
7171
:title="t('recognize', 'The number of files to process per job run (A job will be scheduled every 5 minutes; For normal operation ~500 or more, in WASM mode ~50 is recommended)')"
72-
@update:value="onChange" />
72+
@update:model-value="onChange" />
7373
</p>
7474
</NcSettingsSection>
7575
<NcSettingsSection :name="t('recognize', 'Object detection & landmark recognition')">
@@ -109,30 +109,30 @@
109109
</template>
110110

111111
<p>
112-
<NcCheckboxRadioSwitch :checked.sync="settings['imagenet.enabled']" type="switch" @update:checked="onChange">
112+
<NcCheckboxRadioSwitch v-model="settings['imagenet.enabled']" type="switch" @update:model-value="onChange">
113113
{{ t('recognize', 'Enable object recognition (e.g. food, vehicles, landscapes)') }}
114114
</NcCheckboxRadioSwitch>
115115
<NcTextField :disabled="!settings['imagenet.enabled']"
116-
:value.sync="settings['imagenet.batchSize']"
116+
v-model="settings['imagenet.batchSize']"
117117
:label-visible="true"
118118
:label="t('recognize', 'The number of files to process per job run (A job will be scheduled every 5 minutes; For normal operation ~100 or more, in WASM mode ~20 is recommended)')"
119119
:title="t('recognize', 'The number of files to process per job run (A job will be scheduled every 5 minutes; For normal operation ~100 or more, in WASM mode ~20 is recommended)')"
120-
@update:value="onChange" />
120+
@update:model-value="onChange" />
121121
</p>
122122
<p>&nbsp;</p>
123123
<p>
124-
<NcCheckboxRadioSwitch :checked.sync="settings['landmarks.enabled']"
124+
<NcCheckboxRadioSwitch v-model="settings['landmarks.enabled']"
125125
type="switch"
126126
:disabled="!settings['imagenet.enabled']"
127-
@update:checked="onChange">
127+
@update:model-value="onChange">
128128
{{ t('recognize', 'Enable landmark recognition (e.g. Eiffel Tower, Golden Gate Bridge)') }}
129129
</NcCheckboxRadioSwitch>
130130
<NcTextField :disabled="!settings['imagenet.enabled'] || !settings['landmarks.enabled']"
131-
:value.sync="settings['landmarks.batchSize']"
131+
v-model="settings['landmarks.batchSize']"
132132
:label-visible="true"
133133
:label="t('recognize', 'The number of files to process per job run (A job will be scheduled every 5 minutes; For normal operation ~100 or more, in WASM mode ~20 is recommended)')"
134134
:title="t('recognize', 'The number of files to process per job run (A job will be scheduled every 5 minutes; For normal operation ~100 or more, in WASM mode ~20 is recommended)')"
135-
@update:value="onChange" />
135+
@update:model-value="onChange" />
136136
</p>
137137
</NcSettingsSection>
138138
<NcSettingsSection :name="t('recognize', 'Audio tagging')">
@@ -154,15 +154,15 @@
154154
</NcNoteCard>
155155
</template>
156156
<p>
157-
<NcCheckboxRadioSwitch :checked.sync="settings['musicnn.enabled']" type="switch" @update:checked="onChange">
157+
<NcCheckboxRadioSwitch v-model="settings['musicnn.enabled']" type="switch" @update:model-value="onChange">
158158
{{ t('recognize', 'Enable music genre recognition (e.g. pop, rock, folk, metal, new age)') }}
159159
</NcCheckboxRadioSwitch>
160160
<NcTextField :disabled="!settings['musicnn.enabled']"
161-
:value.sync="settings['musicnn.batchSize']"
161+
v-model="settings['musicnn.batchSize']"
162162
:label-visible="true"
163163
:label="t('recognize', 'The number of files to process per job run (A job will be scheduled every 5 minutes; For normal operation ~100 or more, in WASM mode ~20 is recommended)')"
164164
:title="t('recognize', 'The number of files to process per job run (A job will be scheduled every 5 minutes; For normal operation ~100 or more, in WASM mode ~20 is recommended)')"
165-
@update:value="onChange" />
165+
@update:model-value="onChange" />
166166
</p>
167167
</NcSettingsSection>
168168
<NcSettingsSection :name="t('recognize', 'Video tagging')">
@@ -184,18 +184,18 @@
184184
</NcNoteCard>
185185
</template>
186186
<p>
187-
<NcCheckboxRadioSwitch :checked.sync="settings['movinet.enabled']"
187+
<NcCheckboxRadioSwitch v-model="settings['movinet.enabled']"
188188
type="switch"
189189
:disabled="(platform !== 'x86_64' || settings['tensorflow.purejs']) && !settings['movinet.enabled']"
190-
@update:checked="onChange">
190+
@update:model-value="onChange">
191191
{{ t('recognize', 'Enable human action recognition (e.g. arm wrestling, dribbling basketball, hula hooping)') }}
192192
</NcCheckboxRadioSwitch>
193193
<NcTextField :disabled="!settings['movinet.enabled']"
194-
:value.sync="settings['movinet.batchSize']"
194+
v-model="settings['movinet.batchSize']"
195195
:label-visible="true"
196196
:label="t('recognize', 'The number of files to process per job run (A job will be scheduled every 5 minutes; For normal operation ~20 or more, in WASM mode ~5 is recommended)')"
197197
:title="t('recognize', 'The number of files to process per job run (A job will be scheduled every 5 minutes; For normal operation ~20 or more, in WASM mode ~5 is recommended)')"
198-
@update:value="onChange" />
198+
@update:model-value="onChange" />
199199
</p>
200200
</NcSettingsSection>
201201
<NcSettingsSection :name="t('recognize', 'Reset')">
@@ -222,21 +222,21 @@
222222
<NcSettingsSection :name="t('recognize', 'Resource usage') ">
223223
<p>{{ t('recognize', 'By default all available CPU cores will be used which may put your system under considerable load. To avoid this, you can limit the amount of CPU Cores used. (Note: In WASM mode, currently only 1 core can be used at all times.)') }}</p>
224224
<p>
225-
<NcTextField :value.sync="settings['tensorflow.cores']"
225+
<NcTextField v-model="settings['tensorflow.cores']"
226226
type="number"
227227
:min="0"
228228
:step="1"
229229
:max="32"
230230
:label="t('recognize', 'Number of CPU Cores (0 for no limit)')"
231231
:label-visible="true"
232-
@update:value="onChange" />
232+
@update:model-value="onChange" />
233233
</p>
234234
<p>&nbsp;</p>
235235
<p>{{ t('recognize', 'By default, recognize will only ever run one classifier process at a time. If you have a lot of resources available and want to run as many processes in parallel as possible, you can turn on concurrency here.') }}</p>
236236
<p>
237-
<NcCheckboxRadioSwitch :checked.sync="settings['concurrency.enabled']"
237+
<NcCheckboxRadioSwitch v-model="settings['concurrency.enabled']"
238238
type="switch"
239-
@update:checked="onChange">
239+
@update:model-value="onChange">
240240
{{ t('recognize', 'Enable unlimited concurrency of classifier processes') }}
241241
</NcCheckboxRadioSwitch>
242242
</p>
@@ -262,7 +262,7 @@
262262
</ul>
263263
</template>
264264
<p>
265-
<NcCheckboxRadioSwitch :checked.sync="settings['tensorflow.purejs']" type="switch" @update:checked="onChange">
265+
<NcCheckboxRadioSwitch v-model="settings['tensorflow.purejs']" type="switch" @update:model-value="onChange">
266266
{{ t('recognize', 'Enable WASM mode') }}
267267
</NcCheckboxRadioSwitch>
268268
</p>
@@ -272,10 +272,10 @@
272272
</NcSettingsSection>
273273
<NcSettingsSection :name="t('recognize', 'Tensorflow GPU mode')">
274274
<p>
275-
<NcCheckboxRadioSwitch :checked.sync="settings['tensorflow.gpu']"
275+
<NcCheckboxRadioSwitch v-model="settings['tensorflow.gpu']"
276276
type="switch"
277277
:disabled="settings['tensorflow.purejs']"
278-
@update:checked="onChange">
278+
@update:model-value="onChange">
279279
{{ t('recognize', 'Enable GPU mode') }}
280280
</NcCheckboxRadioSwitch>
281281
</p>
@@ -325,7 +325,7 @@
325325
{{ t('recognize', 'If the shipped Node.js binary doesn\'t work on your system for some reason you can set the path to a custom node.js binary. Currently supported is Node v20.9 and newer v20 releases.') }}
326326
</p>
327327
<p>
328-
<NcTextField :value.sync="settings['node_binary']" @update:value="onChange" />
328+
<NcTextField v-model="settings['node_binary']" @update:model-value="onChange" />
329329
</p>
330330
<p>{{ t('recognize', 'For Nextcloud Snap users, you need to adjust this path to point to the snap\'s "current" directory as the pre-configured path will change with each update. For example, set it to "/var/snap/nextcloud/current/nextcloud/extra-apps/recognize/bin/node" instead of "/var/snap/nextcloud/9337974/nextcloud/extra-apps/recognize/bin/node"') }}</p>
331331
</NcSettingsSection>
@@ -343,7 +343,7 @@
343343
{{ t('recognize', 'If the shipped FFmpeg binary doesn\'t work on your system for some reason you can set the path to a custom FFmpeg binary.') }}
344344
</p>
345345
<p>
346-
<NcTextField :value.sync="settings['ffmpeg_binary']" @update:value="onChange" />
346+
<NcTextField v-model="settings['ffmpeg_binary']" @update:model-value="onChange" />
347347
</p>
348348
</NcSettingsSection>
349349
<NcSettingsSection :name="t('recognize', 'Classifier process priority')">
@@ -357,23 +357,23 @@
357357
{{ t('recognize', 'Nice binary path') }}
358358
</p>
359359
<p>
360-
<NcTextField :value.sync="settings['nice_binary']"
360+
<NcTextField v-model="settings['nice_binary']"
361361
:label-visible="true"
362362
:label="t('recognize', 'Nice binary path')"
363-
@update:value="onChange" />
363+
@update:model-value="onChange" />
364364
</p>
365365
<p>&nbsp;</p>
366366
<p>
367367
{{ t('recognize', 'Nice value to set the priority of the Node.js processes. The value can only be from 0 to 19 since the Node.js process runs without superuser privileges. The higher the nice value, the lower the priority of the process.') }}
368368
</p>
369369
<p>
370-
<NcTextField :value.sync="settings['nice_value']"
370+
<NcTextField v-model="settings['nice_value']"
371371
type="number"
372372
:min="0"
373373
:max="19"
374374
:step="1"
375375
:disabled="nice === false"
376-
@update:value="onChange" />
376+
@update:model-value="onChange" />
377377
</p>
378378
</NcSettingsSection>
379379
<NcSettingsSection :name="t('recognize', 'Terminal commands') ">

webpack.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright (c) 2026 The Recognize contributors.
3+
* This file is licensed under the Affero General Public License version 3 or later. See the COPYING file.
4+
*/
5+
16
const path = require('path')
27
const webpackConfig = require('@nextcloud/webpack-vue-config')
38

0 commit comments

Comments
 (0)