diff --git a/.env.test.risosrv b/.env.test.risosrv new file mode 100755 index 00000000..5399fbdf --- /dev/null +++ b/.env.test.risosrv @@ -0,0 +1,27 @@ +APP_VERSION="0.5.66" +SERVICE_WORKER_FILE="service-worker.js" +APP_ID="13" +DIRECTORY_LOCAL=newfreeplanet +DIRECTORY_SERVER=test.freeplanet_serverside +SERVERDIR_WEBSITE="splendidus.it/riso" +APP_URL="https://riso.splendidus.it" +URL_FACEBOOK="" +PROVA_PAOLO="" +LANG_DEFAULT="it" +PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF" +MASTER_KEY="KKPPSS5KJK435J3KSS9F9D8S9F8SD3CR3T" +MONGODB_HOST="https://splendidus.it:3001" +LOGO_REG='riso-logo-full.png' +TEST_NAME="" +TEST_SURNAME="" +TEST_EMAIL="" +TEST_USERNAME="" +TEST_PASSWORD="" +TEST_APORTADOR="" +PUBLICKEY_PUSH="BGXRf1TgcqocqD6J7qnRgCG7AvM2lxAoW7peb7UEzB4SxBb6DxGRdJ0UvD9ewnrB9KrSrh0-aDCODXBm7sZ1DDs" +IN_CONSTRUCTION="0" +DEBUG="1" +TELEGRAM_SUPPORT="" +PROJECT_ID_MAIN="5cc0a13fe5c9d156728f400a" +TEST_CELL="" +ISTEST=1 diff --git a/deploy_risosrv_on_test_server.sh b/deploy_risosrv_on_test_server.sh new file mode 100755 index 00000000..0c3eee20 --- /dev/null +++ b/deploy_risosrv_on_test_server.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +source ./.env.test.risosrv + +msg="*** Sincronizzazione ??? $DIRECTORY_LOCAL e $SERVERDIR_WEBSITE (Y/N) ? " + +if [ "$1" = "" ]; then + read -p "$msg" risposta +else + risposta=$1 +fi + +cp .env.production .env.prod.bak +cp .env.test.risosrv .env.production + +sleep 1 + +npm run buildpwa + +echo "Sincronizzazione $SERVERDIR_WEBSITE in remoto..." +rsync -e 'ssh -p 5522' -a dist/pwa/ root@risosrv:/home/$SERVERDIR_WEBSITE + +cp .env.prod.bak .env.production + +sleep 1 + +echo "Finito $SERVERDIR_WEBSITE" diff --git a/send_pwa_to_risotest.sh b/send_pwa_to_risotest.sh new file mode 100755 index 00000000..eef33578 --- /dev/null +++ b/send_pwa_to_risotest.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +source .env.test.risosrv + +cp .env.test.risosrv .env.production + +echo "Sincronizzazione in remoto $SERVERDIR_WEBSITE ..." +rsync -e 'ssh -p 5522' -a dist/pwa/ root@risosrv:/home/$SERVERDIR_WEBSITE/ +echo "Finito $SERVERDIR_WEBSITE" + +cp .env.prod.bak .env.production diff --git a/src/components/CMyPageElem/CMyPageElem.ts b/src/components/CMyPageElem/CMyPageElem.ts index 707485b8..2a2153af 100755 --- a/src/components/CMyPageElem/CMyPageElem.ts +++ b/src/components/CMyPageElem/CMyPageElem.ts @@ -97,7 +97,7 @@ export default defineComponent({ } if (tools.isManager()) { - console.log('getcookie: ', editOn.value, mypathin.value) + // console.log('getcookie: ', editOn.value, mypathin.value) } } diff --git a/src/components/CMyPopupEdit/CMyPopupEdit.vue b/src/components/CMyPopupEdit/CMyPopupEdit.vue index d84a5da0..9225dd58 100755 --- a/src/components/CMyPopupEdit/CMyPopupEdit.vue +++ b/src/components/CMyPopupEdit/CMyPopupEdit.vue @@ -141,7 +141,7 @@ > - + diff --git a/src/components/LandingFooter/LandingFooter.ts b/src/components/LandingFooter/LandingFooter.ts index e77fa7ee..ea5ce180 100755 --- a/src/components/LandingFooter/LandingFooter.ts +++ b/src/components/LandingFooter/LandingFooter.ts @@ -38,7 +38,7 @@ export default defineComponent({ return 'linear-gradient(180deg, ' + mycol + ' 95%, #FFF)' }) - console.log('LandingFooter - INIT') + // console.log('LandingFooter - INIT') function TelegramSupport() { return globalStore.getValueSettingsByKey('TELEGRAM_SUPPORT', false) diff --git a/src/db/lang/ws_it.js b/src/db/lang/ws_it.js index c9142a70..df3c3d53 100755 --- a/src/db/lang/ws_it.js +++ b/src/db/lang/ws_it.js @@ -31,6 +31,7 @@ const msg_website_it = { mygood2: 'mygood2', fundraising: 'Sostieni il Progetto', notifs: 'Configura le Notifiche', + unsubscribe: 'Disiscriviti', test: 'Test', projects: 'Progetti', report: 'Report Ore', diff --git a/src/rootgen/admin/newsletter/newsletter.ts b/src/rootgen/admin/newsletter/newsletter.ts index c961ac35..2f42a54d 100755 --- a/src/rootgen/admin/newsletter/newsletter.ts +++ b/src/rootgen/admin/newsletter/newsletter.ts @@ -58,13 +58,12 @@ export default defineComponent({ const idparam = computed( () => $route.params.idparam ? $route.params.idparam.toString() : '') - async function mounted() { await load() newsstate.value = DefaultNewsState // tab = tools.getCookie('formnews', 'check') - tab.value = $route.params.idparam.toString() - emailtextheader.value = getValDb('EMAIL_TEXT', true) + tab.value = idparam.value + // emailtextheader.value = getValDb('EMAIL_TEXT', true) } @@ -308,6 +307,7 @@ export default defineComponent({ costanti, fieldsTable, globalStore, + idparam, } } }) diff --git a/src/rootgen/admin/newsletter/newsletter.vue b/src/rootgen/admin/newsletter/newsletter.vue index 28f51d67..66e1ceb9 100755 --- a/src/rootgen/admin/newsletter/newsletter.vue +++ b/src/rootgen/admin/newsletter/newsletter.vue @@ -1,547 +1,860 @@ diff --git a/src/router/routesAdmin.ts b/src/router/routesAdmin.ts index ba1264ff..81772adb 100644 --- a/src/router/routesAdmin.ts +++ b/src/router/routesAdmin.ts @@ -453,6 +453,16 @@ function getRoutesAd(site: ISites) { inmenu: false, infooter: false, }, + { + active: true, + order: 200, + path: '/unsubscribe', + materialIcon: 'fas fa-envelope', + name: 'pages.unsubscribe', + component: () => import('@/views/email/unsubscribe/unsubscribe.vue'), + inmenu: false, + infooter: false, + }, { active: true, order: 400, diff --git a/src/store/Modules/tools.ts b/src/store/Modules/tools.ts index 7e0d5d2a..b56f69c8 100644 --- a/src/store/Modules/tools.ts +++ b/src/store/Modules/tools.ts @@ -5592,7 +5592,7 @@ export const tools = { // console.log('OUT', res) if (res && res.userprofile) { - console.log('updateMyData', res.userprofile) + // console.log('updateMyData', res.userprofile) userStore.my.profile = res.userprofile if (res.listcircuits) { @@ -7599,7 +7599,7 @@ export const tools = { checkApp() { const globalStore = useGlobalStore() - console.log('checkApp (homescreen=', globalStore.homescreen) + // console.log('checkApp (homescreen=', globalStore.homescreen) try { let displayMode = 'browser' @@ -7607,11 +7607,11 @@ export const tools = { // @ts-ignore if (((navigator && (navigator.standalone))) || (window.matchMedia(mqStandAlone).matches)) { - console.log('navigator.standalone') + // console.log('navigator.standalone') displayMode = 'standalone' } // prova altro 2 - console.log('displayMode = ', displayMode) + // console.log('displayMode = ', displayMode) globalStore.isAppRunning = displayMode === 'standalone' || globalStore.homescreen } catch (e) { @@ -7620,7 +7620,7 @@ export const tools = { }, initprompt() { - console.log('initprompt') + // console.log('initprompt') const globalStore = useGlobalStore() window.addEventListener('beforeinstallprompt', (event) => { diff --git a/src/store/NotifStore.ts b/src/store/NotifStore.ts index ee1b1c7c..7a752c67 100755 --- a/src/store/NotifStore.ts +++ b/src/store/NotifStore.ts @@ -85,7 +85,7 @@ export const useNotifStore = defineStore('NotifStore', { } }, updateArrRecNotifFromServer(arrrecnotif: INotif[]) { - console.log('arrrecnotif', arrrecnotif) + // console.log('arrrecnotif', arrrecnotif) if (arrrecnotif && arrrecnotif.length > 0) { this.last_notifs = arrrecnotif diff --git a/src/store/globalStore.ts b/src/store/globalStore.ts index 1e0e1283..06754fff 100644 --- a/src/store/globalStore.ts +++ b/src/store/globalStore.ts @@ -503,7 +503,7 @@ export const useGlobalStore = defineStore('GlobalStore', { static_data.routes = [...baseroutes, ...adminRoutes, ...arrpagesroute, last] } - for (const menu of static_data.routes) { + /*for (const menu of static_data.routes) { if (menu.active && menu.routes2) { for (const menu2 of menu.routes2) { if (menu2.active && !menu2.noroute) { @@ -511,7 +511,7 @@ export const useGlobalStore = defineStore('GlobalStore', { } } } - } + }*/ // Sort array static_data.routes = static_data.routes.sort((a, myb) => a.order - myb.order) @@ -522,19 +522,19 @@ export const useGlobalStore = defineStore('GlobalStore', { if ($router) { static_data.routes.forEach((route: any) => { - if (!$router.hasRoute(route.name)) { + if (!$router.hasRoute(route.name) && !route.noroute) { $router.addRoute(route) } if (route.routes2) { for (const route2 of route.routes2) { - if (!$router.hasRoute(route2.name)) { + if (!$router.hasRoute(route2.name) && !route2.noroute) { $router.addRoute(route2) } if (route2.routes2) { for (const route3 of route2.routes2) { - if (!$router.hasRoute(route3.name)) { + if (!$router.hasRoute(route3.name) && !route3.noroute) { $router.addRoute(route3) } } @@ -1040,7 +1040,7 @@ export const useGlobalStore = defineStore('GlobalStore', { if (res) { const index = this.mypage.findIndex((rec) => rec.path === path) if (index >= 0) { - console.log('load page', path, '...') + // console.log('load page', path, '...') this.mypage[index] = res.data.mypage this.mypage[index].loaded = true } diff --git a/src/views/email/unsubscribe/unsubscribe.ts b/src/views/email/unsubscribe/unsubscribe.ts index afb7bc46..53df45f2 100755 --- a/src/views/email/unsubscribe/unsubscribe.ts +++ b/src/views/email/unsubscribe/unsubscribe.ts @@ -2,7 +2,7 @@ import { serv_constants } from '@store/Modules/serv_constants' import { tools } from '@store/Modules/tools' -import { defineComponent, ref } from 'vue' +import { computed, defineComponent, ref } from 'vue' import { useI18n } from '@src/boot/i18n' import { useUserStore } from '@store/UserStore' import { useGlobalStore } from '@store/globalStore' @@ -11,22 +11,6 @@ import { useRoute } from 'vue-router' export default defineComponent({ name: 'Unsubscribe', - props: { - mystr: { - type: String, - required: true, - }, - myval: { - type: Number, - required: true, - default: 0, - }, - mybool: { - type: Boolean, - required: true, - default: false, - }, - }, components: {}, setup(props, { emit }) { const $q = useQuasar() @@ -36,25 +20,25 @@ export default defineComponent({ const risultato = ref('...') const riscode = ref(0) + const param = ref(null) - function disiscritto() { + const disiscritto = computed(() => { return riscode.value === serv_constants.RIS_UNSUBSCRIBED_OK - } + }) - function errore() { + const errore = computed(() => { return riscode.value !== serv_constants.RIS_UNSUBSCRIBED_OK - } + }) - function email() { + const email = computed(() => { return $route.query.email - } + }) function load() { // console.log('load') - let param - param = { em: $route.query.em, mc: $route.query.mc, locale: tools.getLocale() } - console.log('idlink = ', param) - return userStore.unsubscribe(param) + param.value = { em: $route.query.em, mc: $route.query.mc, locale: tools.getLocale() } + console.log('idlink = ', param.value) + return userStore.unsubscribe(param.value) .then((ris: any) => { riscode.value = ris.code risultato.value = ris.msg @@ -71,6 +55,7 @@ export default defineComponent({ errore, email, risultato, + param, } } }) diff --git a/src/views/email/unsubscribe/unsubscribe.vue b/src/views/email/unsubscribe/unsubscribe.vue index 0d3baa74..de257473 100755 --- a/src/views/email/unsubscribe/unsubscribe.vue +++ b/src/views/email/unsubscribe/unsubscribe.vue @@ -1,48 +1,57 @@ diff --git a/upload/profile/Petravale/file_832.jpg b/upload/profile/Petravale/file_832.jpg new file mode 100755 index 00000000..b7544846 Binary files /dev/null and b/upload/profile/Petravale/file_832.jpg differ