Unsubscribe

This commit is contained in:
Surya Paolo
2023-02-15 21:40:10 +01:00
parent d59eb86d0c
commit 239cfbe835
17 changed files with 992 additions and 609 deletions

View File

@@ -97,7 +97,7 @@ export default defineComponent({
}
if (tools.isManager()) {
console.log('getcookie: ', editOn.value, mypathin.value)
// console.log('getcookie: ', editOn.value, mypathin.value)
}
}

View File

@@ -141,7 +141,7 @@
>
<q-item-section avatar>
<q-avatar round size="48px">
<img :src="userStore.getImgByProfile(row, true, col)" />
<img :src="userStore.getImgByProfile(row, false, col)" />
<q-badge
v-if="tools.isUserOnline(row, col)"
align="top"

View File

@@ -318,7 +318,7 @@
class="animated chip_shadow q-ma-sm"
clickable
v-ripple
@click="gotoPage(`/signup/${user.username}`)"
@click="gotoPage(`/registrati/${user.username}`)"
>
<q-item-section avatar>
<q-avatar round size="48px">

View File

@@ -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)

View File

@@ -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',

View File

@@ -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,
}
}
})

File diff suppressed because it is too large Load Diff

View File

@@ -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,

View File

@@ -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) => {

View File

@@ -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

View File

@@ -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
}

View File

@@ -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(<any>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,
}
}
})

View File

@@ -1,48 +1,57 @@
<template>
<q-page padding class="vreg">
<div class="q-pa-md q-gutter-sm">
<q-banner
rounded
class="bg-primary text-white"
color="primary q-title"
style="text-align: center;">
<span class="mybanner">{{ $t('components.authentication.email_verification.title_unsubscribe')}}: {{email()}}</span>
</q-banner>
<br>
<transition
enter-active-class="animated fadeIn"
leave-active-class="animated fadeOut"
appear
>
<q-banner
rounded
class="bg-warning text-black"
style="text-align: center;"
v-if="errore()"
>
<span class="mybanner">{{ risultato}}</span>
</q-banner>
<q-banner
class="bg-positive text-white"
style="text-align: center;"
rounded
v-if="disiscritto()"
>
<span class="mybanner">{{ $t('components.authentication.email_verification.title_unsubscribe_done') }}</span>
</q-banner>
</transition>
<q-page v-if="param && param.em" padding class="vreg">
<div class="q-pa-md q-gutter-sm">
<q-banner
rounded
class="bg-primary text-white"
color="primary q-title"
style="text-align: center"
>
<span class="mybanner"
>{{
$t(
'components.authentication.email_verification.title_unsubscribe'
)
}}: {{ email }}</span
>
</q-banner>
<br />
<transition
enter-active-class="animated fadeIn"
leave-active-class="animated fadeOut"
appear
>
<div>
<q-banner
rounded
class="bg-warning text-black"
style="text-align: center"
v-if="errore"
>
<span class="mybanner">{{ risultato }}</span>
</q-banner>
<q-banner
class="bg-positive text-white"
style="text-align: center"
rounded
v-if="disiscritto"
>
<span class="mybanner">{{
$t(
'components.authentication.email_verification.title_unsubscribe_done'
)
}}</span>
</q-banner>
</div>
</q-page>
</transition>
</div>
</q-page>
</template>
<script lang="ts" src="./unsubscribe.ts">
</script>
<style lang="scss" scoped>
@import './unsubscribe.scss';
@import './unsubscribe.scss';
</style>