This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
@echo **************************************************************
|
||||
@echo ******************** BUILD CLIENT ****************************
|
||||
@echo **************************************************************
|
||||
rmdir c:\data\code\raven\server\AyaNova\wwwroot /s/q
|
||||
mkdir c:\data\code\raven\server\AyaNova\wwwroot
|
||||
cd c:\data\code\raven\docs\8.0\ayanova
|
||||
mkdocs build
|
||||
cd c:\data\code\raven-client\ayanova
|
||||
call npm run build
|
||||
xcopy c:\data\code\raven-client\ayanova\dist\* C:\data\code\raven\server\AyaNova\wwwroot\ /e
|
||||
pause
|
||||
@@ -6,7 +6,6 @@ mkdir c:\data\code\raven\server\AyaNova\wwwroot
|
||||
cd c:\data\code\raven\docs\8.0\ayanova
|
||||
mkdocs build
|
||||
cd c:\data\code\raven-client\ayanova
|
||||
rem https://stackoverflow.com/questions/52800904/disable-pwa-plugin-in-vue-cli-3
|
||||
call npm run buildnopwa
|
||||
call npm run build
|
||||
xcopy c:\data\code\raven-client\ayanova\dist\* C:\data\code\raven\server\AyaNova\wwwroot\ /e
|
||||
pause
|
||||
@@ -51,9 +51,23 @@ bugbug: menu won't drop down top right when running ayanova from a local win64 s
|
||||
added pwa block to vue.config.js under transpiledependencies
|
||||
added sw.jw
|
||||
TRY: reversing 5725 by commenting out
|
||||
TRY: manifest starturl reversal
|
||||
TRY: updateexists is still set to true in app.vue by default when it was set that way for testing only!
|
||||
|
||||
TRIED build 33: app.vue comment out "swUpdated" event listener in created
|
||||
FIXED!!!!! WTF? Actually I commented out two lines and it wasn't the swUpdated one at all it was the next one...
|
||||
|
||||
Tried build 38: comment out navigator.serviceWorker.addEventListener("controllerchange", () => { line in app.vue
|
||||
FIXED, did not comment ou the other line
|
||||
This is an alternative to the controllerchange in the app.vue approach:
|
||||
https://levelup.gitconnected.com/vue-pwa-example-298a8ea953c9
|
||||
|
||||
TRIED build 31: manifest starturl reversal
|
||||
Revert starturl back in manifest.json build 31
|
||||
did not fix, reverted back
|
||||
TRIED build 32: updateexists is still set to true in app.vue by default when it was set that way for testing only!
|
||||
set to false build 32
|
||||
NOT fixed, not reverting back since it's supposed to be that way
|
||||
TRY: made showrefreshui async in 5727
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -64,6 +78,12 @@ todo: chrome "Lighthouse" test against devops and implement recommendations
|
||||
particularly favor time to first
|
||||
change .png to .webp
|
||||
|
||||
todo: precache workbox trying to cache api routes:
|
||||
workbox Precaching did not find a match for /api/v8.0/notify/new-count
|
||||
workbox Precaching did not find a match for /api/v8.0/notify/hello
|
||||
workbox Precaching did not find a match for /api/v8.0/logo/small
|
||||
Find a way to turn off
|
||||
https://developers.google.com/web/tools/workbox/modules/workbox-precaching#how_workbox-precaching_works
|
||||
|
||||
### SMALL QUICK ITEMS #####
|
||||
todo: known issues has some efficiency settings for themes and good stuff to know, check it: https://github.com/vuetifyjs/vuetify/releases/tag/v2.3.0#user-content-known-issues
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build --modern --report",
|
||||
"build": "vue-cli-service build --modern",
|
||||
"buildnopwa": "vue-cli-service build --modern --skip-plugins pwa,workbox",
|
||||
"test:unit": "vue-cli-service test:unit",
|
||||
"test:e2e": "vue-cli-service test:e2e",
|
||||
|
||||
@@ -275,18 +275,25 @@ export default {
|
||||
//https://medium.com/@dougallrich/give-users-control-over-app-updates-in-vue-cli-3-pwas-20453aedc1f2
|
||||
refreshing: false,
|
||||
registration: null,
|
||||
updateExists: true
|
||||
updateExists: false
|
||||
};
|
||||
},
|
||||
created() {
|
||||
//pwa update
|
||||
//https://medium.com/@dougallrich/give-users-control-over-app-updates-in-vue-cli-3-pwas-20453aedc1f2
|
||||
document.addEventListener("swUpdated", this.showRefreshUI, { once: true });
|
||||
navigator.serviceWorker.addEventListener("controllerchange", () => {
|
||||
if (this.refreshing) return;
|
||||
this.refreshing = true;
|
||||
window.location.reload();
|
||||
});
|
||||
async created() {
|
||||
//Don't call this unless there is a service worker (https or localhost only, not private network) or else vuetify goes snakey and things start breaking
|
||||
if (navigator.serviceWorker) {
|
||||
//pwa update
|
||||
//https://medium.com/@dougallrich/give-users-control-over-app-updates-in-vue-cli-3-pwas-20453aedc1f2
|
||||
document.addEventListener("swUpdated", await this.showRefreshUI, {
|
||||
once: true
|
||||
});
|
||||
|
||||
//for the record, this is the breaking code if there is no serviceworker
|
||||
navigator.serviceWorker.addEventListener("controllerchange", () => {
|
||||
if (this.refreshing) return;
|
||||
this.refreshing = true;
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
|
||||
//Removed this when I added the PWA update code because in reality it should not be required for
|
||||
//regular updates as it would be very intrusive, instead, on a new version it should internally fixup the
|
||||
@@ -398,6 +405,9 @@ export default {
|
||||
newNotificationCount() {
|
||||
return this.$store.state.newNotificationCount;
|
||||
},
|
||||
test() {
|
||||
alert("App.vue::test() method");
|
||||
},
|
||||
//PWA update
|
||||
async showRefreshUI(e) {
|
||||
this.registration = e.detail;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export default {
|
||||
version: "8.0.0-alpha.31",
|
||||
version: "8.0.0-alpha.57",
|
||||
copyright: "© 1999-2020, Ground Zero Tech-Works Inc."
|
||||
};
|
||||
|
||||
@@ -15,6 +15,7 @@ if (process.env.NODE_ENV === "production") {
|
||||
},
|
||||
updated(registration) {
|
||||
console.log("New content is available; please refresh.");
|
||||
|
||||
//https://medium.com/@dougallrich/give-users-control-over-app-updates-in-vue-cli-3-pwas-20453aedc1f2
|
||||
document.dispatchEvent(
|
||||
new CustomEvent("swUpdated", { detail: registration })
|
||||
|
||||
Reference in New Issue
Block a user