fix js-routing bug

This commit is contained in:
Simon Vieille 2021-06-15 12:52:57 +02:00
parent 4caf6c71f3
commit 5e3c23ef3d
3 changed files with 7 additions and 2 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@
/.env.*.local
/config/secrets/prod/prod.decrypt.private.php
/public/bundles/
/public/js/
/src/Command/TestCommand.php
/var/
/vendor/

View File

@ -15,10 +15,13 @@ dep:
asset-watch:
$(WEBPACK) -w
asset:
asset: js-routing
$(YARN)
$(WEBPACK)
js-routing:
$(PHP) bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
clean:
rm -fr var/cache/dev/*
rm -fr var/cache/prod/*

View File

@ -171,6 +171,8 @@ const routes = require('../../../../../public/js/fos_js_routes.json')
import Routing from '../../../../../vendor/friendsofsymfony/jsrouting-bundle/Resources/public/js/router.min.js';
import FileIcon from './FileIcon';
Routing.setRoutingData(routes);
export default {
name: "Files",
components: {
@ -240,7 +242,6 @@ export default {
}
},
mounted() {
Routing.setRoutingData(routes)
let view = localStorage.getItem('file-manager.view')
if (['grid', 'list'].indexOf(view) !== -1) {