diff --git a/.env.development b/.env.development index aa25661b..fcc0fd2d 100755 --- a/.env.development +++ b/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="0.5.60" +APP_VERSION="0.5.61" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL="newfreeplanet" diff --git a/.env.example.production b/.env.example.production index 134b5560..aff48d4d 100755 --- a/.env.example.production +++ b/.env.example.production @@ -1,4 +1,4 @@ -APP_VERSION="0.5.60" +APP_VERSION="0.5.61" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL=newfreeplanet diff --git a/_ALL_SITES/riso.app/.env.development b/_ALL_SITES/riso.app/.env.development index aa25661b..fcc0fd2d 100755 --- a/_ALL_SITES/riso.app/.env.development +++ b/_ALL_SITES/riso.app/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="0.5.60" +APP_VERSION="0.5.61" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL="newfreeplanet" diff --git a/_ALL_SITES/riso.app/.env.production b/_ALL_SITES/riso.app/.env.production index d6ea20e6..39933cbe 100644 --- a/_ALL_SITES/riso.app/.env.production +++ b/_ALL_SITES/riso.app/.env.production @@ -1,4 +1,4 @@ -APP_VERSION="0.5.60" +APP_VERSION="0.5.61" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL=newfreeplanet diff --git a/_ALL_SITES/terradellavisione.app/.env.development b/_ALL_SITES/terradellavisione.app/.env.development index 3e2e369b..3d315b35 100755 --- a/_ALL_SITES/terradellavisione.app/.env.development +++ b/_ALL_SITES/terradellavisione.app/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="0.5.60" +APP_VERSION="0.5.61" SERVICE_WORKER_FILE="service-worker.js" APP_ID="14" DIRECTORY_LOCAL="newfreeplanet" diff --git a/package.json b/package.json index e1feeb46..4f9948a4 100755 --- a/package.json +++ b/package.json @@ -123,15 +123,7 @@ "crypto": false }, "browserslist": [ - "last 30 Chrome versions", - "last 30 Firefox versions", - "last 4 Edge versions", - "last 30 Safari versions", - "last 30 Android versions", - "last 30 ChromeAndroid versions", - "last 30 FirefoxAndroid versions", - "last 18 iOS versions", - "last 11 Opera versions" + "defaults" ], "engines": { "node": ">= 16.14.0", diff --git a/public/images/install_app_on_android_1.jpg b/public/images/install_app_on_android_1.jpg new file mode 100644 index 00000000..ec5a0899 Binary files /dev/null and b/public/images/install_app_on_android_1.jpg differ diff --git a/public/images/install_app_on_android_2.jpg b/public/images/install_app_on_android_2.jpg new file mode 100644 index 00000000..ed162689 Binary files /dev/null and b/public/images/install_app_on_android_2.jpg differ diff --git a/public/images/install_app_on_ios_1.png b/public/images/install_app_on_ios_1.png new file mode 100644 index 00000000..bfe9f9de Binary files /dev/null and b/public/images/install_app_on_ios_1.png differ diff --git a/public/images/install_app_on_ios_1b.jpg b/public/images/install_app_on_ios_1b.jpg new file mode 100644 index 00000000..a9ff9893 Binary files /dev/null and b/public/images/install_app_on_ios_1b.jpg differ diff --git a/public/images/install_app_on_ios_2.jpg b/public/images/install_app_on_ios_2.jpg new file mode 100644 index 00000000..f05f86d8 Binary files /dev/null and b/public/images/install_app_on_ios_2.jpg differ diff --git a/quasar.conf.js b/quasar.conf.js index d67628ce..c28d345f 100755 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -97,7 +97,7 @@ module.exports = configure((ctx) => ({ chainWebpack(chain, { isServer, isClient }) { chain.resolve.alias - // .set('myalias', path.resolve(__dirname, './src/somefolder')) + // .set('myalias', path.resolve(__dirname, './src/somefolder')) .set('@', helpers.root('src')) .set('@components', helpers.root('src/components/index.ts')) .set('@boot', helpers.root('src/boot/*')) @@ -293,7 +293,7 @@ module.exports = configure((ctx) => ({ pwa: { workboxPluginMode: 'InjectManifest', // 'GenerateSW' or 'InjectManifest' workboxOptions: {}, // only for GenerateSW - extendGenerateSWOptions (cfg) { + extendGenerateSWOptions(cfg) { cfg.skipWaiting = false cfg.clientsClaim = false }, @@ -310,9 +310,11 @@ module.exports = configure((ctx) => ({ description: 'Siamo la Rete Italiana di Scambio Orizzontale, abbiamo creato questa piattaforma per metterla al servizio di chi vuole riscoprire il valore della condivisione e della cooperazione. Valori semplici e profondi che ci aiutano a ritrovare il Senso della Vita, perduto in questa società consumista, e riporti quei Sani Pricìpi Naturali ed Umani di Fratellanza che intere popolazioni antiche conoscevano bene.', display: 'standalone', orientation: 'portrait', - background_color: '#ffffff', + background_color: '#fff', theme_color: '#027be3', - start_url: '/', + scope: "/", + id: "/?homescreen=1", + start_url: "/?homescreen=1", icons: [ { src: 'images/riso-android-icon-512x512.png', @@ -360,6 +362,10 @@ module.exports = configure((ctx) => ({ type: 'image/png', }, ], + related_applications: [{ + "platform": "webapp", + "url": "https://test.riso.app/manifest.json" + }] }, }, diff --git a/src/App.ts b/src/App.ts index 6acd3444..0eccbfc7 100755 --- a/src/App.ts +++ b/src/App.ts @@ -28,6 +28,7 @@ export default { const $q = useQuasar() const userStore = useUserStore() const $router = useRouter() + const $route = useRoute() const globalStore = useGlobalStore() const { t } = useI18n(); @@ -82,6 +83,8 @@ export default { console.log('app mounted') darkcookie.value = tools.getCookie('darkmode', false, false, false) === '-1' + globalStore.homescreen = $route.query.homescreen ? $route.query.homescreen : '' + scroll() } diff --git a/src/components/CCheckAppRunning/CCheckAppRunning.ts b/src/components/CCheckAppRunning/CCheckAppRunning.ts index 1337b148..0032d857 100755 --- a/src/components/CCheckAppRunning/CCheckAppRunning.ts +++ b/src/components/CCheckAppRunning/CCheckAppRunning.ts @@ -24,6 +24,11 @@ export default defineComponent({ const finishLoading = computed(() => globalStore.finishLoading) const deferredPrompt = computed(() => globalStore.deferredPrompt) + const homescreen = computed(() => globalStore.homescreen) + + + const viewiOS = ref(false) + const viewAndroid = ref(false) function installApp() { if (globalStore.deferredPrompt) { @@ -56,6 +61,9 @@ export default defineComponent({ installApp, isAppRunning, deferredPrompt, + viewiOS, + viewAndroid, + homescreen, } } }) diff --git a/src/components/CCheckAppRunning/CCheckAppRunning.vue b/src/components/CCheckAppRunning/CCheckAppRunning.vue index e477a586..1ab8a83b 100755 --- a/src/components/CCheckAppRunning/CCheckAppRunning.vue +++ b/src/components/CCheckAppRunning/CCheckAppRunning.vue @@ -1,20 +1,96 @@