diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php
index b8090e1cf29..7931686c92e 100644
--- a/apps/files/lib/Controller/ViewController.php
+++ b/apps/files/lib/Controller/ViewController.php
@@ -283,16 +283,9 @@ class ViewController extends Controller {
$this->initialState->provideInitialState('templates_path', $this->templateManager->hasTemplateDirectory() ? $this->templateManager->getTemplatePath() : false);
$this->initialState->provideInitialState('templates', $this->templateManager->listCreators());
- $params = [
- 'fileNotFound' => $fileNotFound ? 1 : 0,
- 'id-app-content' => '#app-content-vue',
- 'id-app-navigation' => '#app-navigation-vue',
- ];
-
$response = new TemplateResponse(
Application::APP_ID,
'index',
- $params
);
$policy = new ContentSecurityPolicy();
$policy->addAllowedFrameDomain('\'self\'');
diff --git a/apps/files/src/FilesApp.vue b/apps/files/src/FilesApp.vue
new file mode 100644
index 00000000000..a2a7f495c09
--- /dev/null
+++ b/apps/files/src/FilesApp.vue
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
diff --git a/apps/files/src/main.ts b/apps/files/src/main.ts
index 1206b9cc711..08fb3f562ab 100644
--- a/apps/files/src/main.ts
+++ b/apps/files/src/main.ts
@@ -9,6 +9,7 @@ import router from './router/router'
import RouterService from './services/RouterService'
import SettingsModel from './models/Setting.js'
import SettingsService from './services/Settings.js'
+import FilesApp from './FilesApp.vue'
// @ts-expect-error __webpack_nonce__ is injected by webpack
__webpack_nonce__ = btoa(getRequestToken())
@@ -42,23 +43,8 @@ const Settings = new SettingsService()
Object.assign(window.OCA.Files, { Settings })
Object.assign(window.OCA.Files.Settings, { Setting: SettingsModel })
-// Init Navigation View
-const View = Vue.extend(NavigationView)
-const FilesNavigationRoot = new View({
- name: 'FilesNavigationRoot',
- propsData: {
- Navigation,
- },
+const FilesAppVue = Vue.extend(FilesApp)
+new FilesAppVue({
router,
pinia,
-})
-FilesNavigationRoot.$mount('#app-navigation-files')
-
-// Init content list view
-const ListView = Vue.extend(FilesListView)
-const FilesList = new ListView({
- name: 'FilesListRoot',
- router,
- pinia,
-})
-FilesList.$mount('#app-content-vue')
+}).$mount('#content')
diff --git a/apps/files/src/views/Navigation.cy.ts b/apps/files/src/views/Navigation.cy.ts
index cf3512bce0e..07d9eee80cb 100644
--- a/apps/files/src/views/Navigation.cy.ts
+++ b/apps/files/src/views/Navigation.cy.ts
@@ -7,11 +7,15 @@ import router from '../router/router'
import { useViewConfigStore } from '../store/viewConfig'
import { Folder, View, getNavigation } from '@nextcloud/files'
+import Vue from 'vue'
+
describe('Navigation renders', () => {
delete window._nc_navigation
const Navigation = getNavigation()
before(() => {
+ Vue.prototype.$navigation = Navigation
+
cy.mockInitialState('files', 'storageStats', {
used: 1000 * 1000 * 1000,
quota: -1,
@@ -22,9 +26,6 @@ describe('Navigation renders', () => {
it('renders', () => {
cy.mount(NavigationView, {
- propsData: {
- Navigation,
- },
global: {
plugins: [createTestingPinia({
createSpy: cy.spy,
@@ -42,6 +43,10 @@ describe('Navigation API', () => {
delete window._nc_navigation
const Navigation = getNavigation()
+ before(() => {
+ Vue.prototype.$navigation = Navigation
+ })
+
it('Check API entries rendering', () => {
Navigation.register(new View({
id: 'files',
@@ -52,9 +57,6 @@ describe('Navigation API', () => {
}))
cy.mount(NavigationView, {
- propsData: {
- Navigation,
- },
global: {
plugins: [createTestingPinia({
createSpy: cy.spy,
@@ -79,9 +81,6 @@ describe('Navigation API', () => {
}))
cy.mount(NavigationView, {
- propsData: {
- Navigation,
- },
global: {
plugins: [createTestingPinia({
createSpy: cy.spy,
@@ -107,9 +106,6 @@ describe('Navigation API', () => {
}))
cy.mount(NavigationView, {
- propsData: {
- Navigation,
- },
global: {
plugins: [createTestingPinia({
createSpy: cy.spy,
@@ -159,13 +155,14 @@ describe('Quota rendering', () => {
delete window._nc_navigation
const Navigation = getNavigation()
+ before(() => {
+ Vue.prototype.$navigation = Navigation
+ })
+
afterEach(() => cy.unmockInitialState())
it('Unknown quota', () => {
cy.mount(NavigationView, {
- propsData: {
- Navigation,
- },
global: {
plugins: [createTestingPinia({
createSpy: cy.spy,
@@ -183,9 +180,6 @@ describe('Quota rendering', () => {
})
cy.mount(NavigationView, {
- propsData: {
- Navigation,
- },
global: {
plugins: [createTestingPinia({
createSpy: cy.spy,
@@ -206,9 +200,6 @@ describe('Quota rendering', () => {
})
cy.mount(NavigationView, {
- propsData: {
- Navigation,
- },
global: {
plugins: [createTestingPinia({
createSpy: cy.spy,
@@ -230,9 +221,6 @@ describe('Quota rendering', () => {
})
cy.mount(NavigationView, {
- propsData: {
- Navigation,
- },
global: {
plugins: [createTestingPinia({
createSpy: cy.spy,
diff --git a/apps/files/src/views/Navigation.vue b/apps/files/src/views/Navigation.vue
index 9e7a630128e..0895bd060ab 100644
--- a/apps/files/src/views/Navigation.vue
+++ b/apps/files/src/views/Navigation.vue
@@ -75,7 +75,7 @@