Skip to content

Commit 10661bf

Browse files
authored
Merge pull request #57556 from nextcloud/refactor/updater
refactor(core): migrate web updater to Vue
2 parents 75a43ff + bf190c4 commit 10661bf

File tree

108 files changed

+1125
-400
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1125
-400
lines changed

build/frontend-legacy/webpack.modules.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ module.exports = {
2929
public: path.join(__dirname, 'core/src', 'public.ts'),
3030
public_share_auth: path.join(__dirname, 'core/src', 'public-share-auth.ts'),
3131
'twofactor-request-token': path.join(__dirname, 'core/src', 'twofactor-request-token.ts'),
32+
update: path.join(__dirname, 'core/src', 'update.ts'),
3233
},
3334
dashboard: {
3435
main: path.join(__dirname, 'apps/dashboard/src', 'main.js'),

core/ajax/update.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ function (MigratorExecuteSqlEvent $event) use ($eventSource, $l): void {
106106
});
107107
$updater->listen('\OC\Updater', 'failure', function ($message) use ($eventSource, $config): void {
108108
$eventSource->send('failure', $message);
109-
$eventSource->close();
110109
$config->setSystemValue('maintenance', false);
111110
});
112111
$updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use ($eventSource, $l): void {

core/js/update.js

Lines changed: 0 additions & 160 deletions
This file was deleted.

core/src/update.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*!
2+
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
3+
* SPDX-License-Identifier: AGPL-3.0-or-later
4+
*/
5+
6+
import { getCSPNonce } from '@nextcloud/auth'
7+
import { loadState } from '@nextcloud/initial-state'
8+
import Vue, { defineAsyncComponent } from 'vue'
9+
10+
__webpack_nonce__ = getCSPNonce()
11+
12+
const UpdaterAdmin = defineAsyncComponent(() => import('./views/UpdaterAdmin.vue'))
13+
const UpdaterAdminCli = defineAsyncComponent(() => import('./views/UpdaterAdminCli.vue'))
14+
15+
const view = loadState('core', 'updaterView')
16+
const app = new Vue({
17+
name: 'NextcloudUpdater',
18+
render: (h) => view === 'adminCli' ? h(UpdaterAdminCli) : h(UpdaterAdmin),
19+
})
20+
app.$mount('#core-updater')

0 commit comments

Comments
 (0)