Merge branch 'master' of github.com:bobdenotter/symfony-skeleton

This commit is contained in:
Bob den Otter
2018-10-11 08:47:39 +02:00
5 changed files with 28 additions and 24 deletions

View File

@@ -27,14 +27,16 @@ export default {
this.news = DashboardNewsAPI.getNews();
// Asynchronously fetch (might take a while)
DashboardNewsAPI.fetchNews()
.then( news => {
this.news = news
})
.catch(error => console.log(error))
.finally(() => {
this.loading = false
});
setTimeout(() => {
DashboardNewsAPI.fetchNews()
.then( news => {
this.news = news
})
.catch(error => console.log(error))
.finally(() => {
this.loading = false
});
}, 200)
}
}
</script>

View File

@@ -85,11 +85,13 @@
for(let i = 0; i < sidebarmenudata.length; i++) {
if(sidebarmenudata[i].contenttype) {
ContentAPI.fetchRecords(sidebarmenudata[i].contenttype)
.then( records => {
this.$set(this.records, sidebarmenudata[i].contenttype, records)
})
.catch(error => console.log(error))
setTimeout(() => {
ContentAPI.fetchRecords(sidebarmenudata[i].contenttype)
.then( records => {
this.$set(this.records, sidebarmenudata[i].contenttype, records)
})
.catch(error => console.log(error))
}, 200)
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.2/workbox-sw.js");
importScripts(
"/assets/sw/precache-manifest.a2b916e275ac4ef8da0742994f9328be.js"
"/assets/sw/precache-manifest.22c74b24e659a80171ea593550c00b77.js"
);
workbox.clientsClaim();

View File

@@ -20,15 +20,15 @@ Encore
// .enableVersioning()
// Workbox should always be the last plugin to add @see: https://developers.google.com/web/tools/workbox/guides/codelabs/webpack#optional-config
.addPlugin(
new WorkboxPlugin.GenerateSW({
// these options encourage the ServiceWorkers to get in there fast
// and not allow any straggling "old" SWs to hang around
clientsClaim: true,
skipWaiting: false,
importsDirectory: 'sw/',
}))
// .addPlugin(
// new WorkboxPlugin.GenerateSW({
// // these options encourage the ServiceWorkers to get in there fast
// // and not allow any straggling "old" SWs to hang around
// clientsClaim: true,
// skipWaiting: false,
// importsDirectory: 'sw/',
// }))
;
// export the final configuration
module.exports = Encore.getWebpackConfig();
module.exports = Encore.getWebpackConfig();