diff --git a/.env.development b/.env.development index 592149be..dd696485 100755 --- a/.env.development +++ b/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="0.5.54" +APP_VERSION="0.5.55" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL="newfreeplanet" diff --git a/.env.example.production b/.env.example.production index bb3856df..4afbc6a2 100755 --- a/.env.example.production +++ b/.env.example.production @@ -1,4 +1,4 @@ -APP_VERSION="0.5.54" +APP_VERSION="0.5.55" 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 592149be..dd696485 100755 --- a/_ALL_SITES/riso.app/.env.development +++ b/_ALL_SITES/riso.app/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="0.5.54" +APP_VERSION="0.5.55" 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 8d7800f0..c84eeee4 100644 --- a/_ALL_SITES/riso.app/.env.production +++ b/_ALL_SITES/riso.app/.env.production @@ -1,4 +1,4 @@ -APP_VERSION="0.5.54" +APP_VERSION="0.5.55" 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 28f95c16..0205d8e7 100755 --- a/_ALL_SITES/terradellavisione.app/.env.development +++ b/_ALL_SITES/terradellavisione.app/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="0.5.54" +APP_VERSION="0.5.55" SERVICE_WORKER_FILE="service-worker.js" APP_ID="14" DIRECTORY_LOCAL="newfreeplanet" diff --git a/src/common/shared_vuejs.ts b/src/common/shared_vuejs.ts index aa7c4e49..0e40ad33 100755 --- a/src/common/shared_vuejs.ts +++ b/src/common/shared_vuejs.ts @@ -96,15 +96,12 @@ export const shared_consts = { FRIENDSCMD: { SETTRUST: 121, REQFRIEND: 125, - REQHANDSHAKE: 128, SETFRIEND: 132, SETHANDSHAKE: 133, REMOVE_FROM_MYFRIENDS: 144, REFUSE_REQ_FRIEND: 145, CANCEL_REQ_FRIEND: 146, REMOVE_FROM_MYHANDSHAKE: 147, - REFUSE_REQ_HANDSHAKE: 148, - CANCEL_REQ_HANDSHAKE: 149, BLOCK_USER: 155, UNBLOCK_USER: 156, REPORT_USER: 158, @@ -1072,10 +1069,7 @@ export const shared_consts = { ID_MSGS_NEW_REC: 1, TYPEDIR_HANDSHAKE: 10, - ID_HANDSHAKE_NEW_REC: 1, ID_HANDSHAKE_ACCEPTED: 2, - ID_HANDSHAKE_REFUSED: 4, - ID_HANDSHAKE_ACCEPTED_MY_REQUEST: 8, TYPEDIR_TEST: 444, ID_TEST_NEW_REC: 1, diff --git a/src/components/CMyFriends/CMyFriends.ts b/src/components/CMyFriends/CMyFriends.ts index fc86811f..43d88316 100755 --- a/src/components/CMyFriends/CMyFriends.ts +++ b/src/components/CMyFriends/CMyFriends.ts @@ -75,12 +75,8 @@ export default defineComponent({ arr = userStore.my.profile.req_friends } else if (props.modelValue === costanti.HANDSHAKE) { arr = userStore.my.profile.handshake - } else if (props.modelValue === costanti.REQ_HANDSHAKE) { - arr = userStore.my.profile.req_handshake } else if (props.modelValue === costanti.ASK_SENT_FRIENDS) { arr = userStore.my.profile.asked_friends - } else if (props.modelValue === costanti.ASK_SENT_HANDSHAKE) { - arr = userStore.my.profile.asked_handshake } else if (props.modelValue === costanti.ASK_TRUST) { arr = listTrusted.value.filter((user: IUserFields) => user.verified_by_aportador === undefined) } else if (props.modelValue === costanti.TRUSTED) { @@ -110,12 +106,6 @@ export default defineComponent({ if (numHandShake.value > 0 || props.modelValue === costanti.HANDSHAKE) mybutt.push({ label: t('mypages.handshake') + ' (' + numHandShake.value + ')', value: costanti.HANDSHAKE }) - if (numReqHandShake.value > 0 || props.modelValue === costanti.REQ_HANDSHAKE) - mybutt.push({ - label: t('mypages.requesthandshake') + ' (' + numReqHandShake.value + ')', - value: costanti.REQ_HANDSHAKE - }) - if (numAskSentFriends.value > 0 || props.modelValue === costanti.ASK_SENT_FRIENDS) mybutt.push({ label: t('mypages.request_sent') + ' (' + numAskSentFriends.value + ')', @@ -146,10 +136,6 @@ export default defineComponent({ return (arr) ? arr.length : 0 }) - const numReqHandShake = computed(() => { - const arr = userStore.my.profile.req_handshake - return (arr) ? arr.length : 0 - }) const numAskSentFriends = computed(() => { const arr = userStore.my.profile.asked_friends diff --git a/src/components/CMyUser/CMyUser.vue b/src/components/CMyUser/CMyUser.vue index 8c94772c..c25594c3 100755 --- a/src/components/CMyUser/CMyUser.vue +++ b/src/components/CMyUser/CMyUser.vue @@ -83,7 +83,7 @@ - + @@ -92,12 +92,6 @@ {{ $t('friends.accept_handshake') }} - - - {{ $t('friends.reject_ask_handshake') }} - - @@ -278,7 +272,7 @@ {{ $t('friends.ask_friend') }} + @click="setCmd($q, shared_consts.FRIENDSCMD.SETHANDSHAKE, userStore.my.username, true, contact.username)"> {{ $t('handshake.ask_handshake') }} @@ -323,21 +317,14 @@ {{ $t('friends.remove_from_myfriends') }} - + {{ $t('handshake.ask_handshake') }} - - - - - {{ $t('handshake.cancel_ask_handshake') }} - - diff --git a/src/components/CStatusReg/CStatusReg.vue b/src/components/CStatusReg/CStatusReg.vue index 8976c1b4..ccfcc691 100755 --- a/src/components/CStatusReg/CStatusReg.vue +++ b/src/components/CStatusReg/CStatusReg.vue @@ -78,44 +78,46 @@ - - + - - - - - - + + + + + + + - - {{ - tools.getstrDateTimeShort(user.date_reg) - }} - - - + + {{ + tools.getstrDateTimeShort(user.date_reg) + }} + + + + -
+
-
+
Aiuta RISO a crescere
@@ -219,10 +221,12 @@
{{ user.count }} -
+ {{ user.count }} +
@@ -230,12 +234,13 @@
-
+
Strette di Mano
- Più persone conoscerai di persona e maggiore aumenterà la Rete di fiducia. + Più persone conoscerai di persona e maggiore aumenterà la + Rete di fiducia.
{{ user.count }} -
+ {{ user.count }} +
diff --git a/src/layouts/toolbar/notifPopover/notifPopover.vue b/src/layouts/toolbar/notifPopover/notifPopover.vue index 46edaeee..7b1c33b6 100755 --- a/src/layouts/toolbar/notifPopover/notifPopover.vue +++ b/src/layouts/toolbar/notifPopover/notifPopover.vue @@ -90,8 +90,6 @@ - status: {{notif.status}} - typedir: {{notif.typedir}}
@@ -115,8 +113,8 @@ />
- -
+ diff --git a/src/mixins/mixin-users.ts b/src/mixins/mixin-users.ts index 69602323..1cc82b5e 100755 --- a/src/mixins/mixin-users.ts +++ b/src/mixins/mixin-users.ts @@ -177,8 +177,6 @@ export default function () { } else if (notif.typedir === shared_consts.TypeNotifs.TYPEDIR_HANDSHAKE) { if (notif.status === shared_consts.StatusNotifs.STATUS_HANDSHAKE_ACCEPTED) { descr += '
' + $t('handshake.accepted') + '' - } else if (notif.status === shared_consts.StatusNotifs.STATUS_HANDSHAKE_REFUSED) { - descr += '
' + $t('handshake.refused') + '' } } else if (notif.typedir === shared_consts.TypeNotifs.TYPEDIR_CIRCUITS) { if (notif.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_SENDCOINSREQ) { diff --git a/src/model/UserStore.ts b/src/model/UserStore.ts index 62e14b52..0a1b5ad3 100755 --- a/src/model/UserStore.ts +++ b/src/model/UserStore.ts @@ -97,7 +97,6 @@ export interface IUserProfile { friends: IFriends[] req_friends: IFriends[] handshake: IFriends[] - req_handshake: IFriends[] mygroups: IMyGroup[] mycircuits: IMyCircuit[] manage_mygroups: IMyGroup[] @@ -110,7 +109,6 @@ export interface IUserProfile { // in memory asked_friends: any[] - asked_handshake: any[] asked_groups: IGroupShort[] refused_groups: IGroupShort[] list_usersgroup?: IFriends[] diff --git a/src/statics/lang/it.js b/src/statics/lang/it.js index e93de456..dd41a49a 100755 --- a/src/statics/lang/it.js +++ b/src/statics/lang/it.js @@ -226,8 +226,10 @@ const msg_it = { insertgoodorservices_to_enter_circuit: 'Per poter entrare nel Circuito è necessario aggiungere almeno un Bene, Servizio o offrire Ospitalità', deletedgroup: 'Gruppo Eliminato', domanda_addtofriend: 'Aggiungere agli amici {username}?', - domanda_addtohandshake: 'Confermi che hai conosciuto personalmente e dai la tua fiducia a {username}?
({username} riceverà una richiesta di conferma)" ?', - addtohandshake: 'Hai stretto la mano a {username}', + domanda_addtohandshake: 'Confermi che hai conosciuto personalmente e dai la tua fiducia a {username} ?', + handshake_you: 'Hai stretto la mano a {username}', + handshake_him: '{username} ti ha stretto la mano', + both_fiducia: 'Fiducia reciproca tra te e {username}', domanda_addtogroup: 'Aggiungi {username} al gruppo {groupname}?', domanda_addtocircuit: 'Aggiungi {username} al Circuito {circuitname}?', addedfriend: 'Aggiunto alla lista di Amici', @@ -240,18 +242,16 @@ const msg_it = { domanda_ask_handshake: 'Confermi che hai conosciuto personalmente e dai la tua fiducia a {username} ?', domanda_ask_group: 'Chiedere l\'invito al Gruppo {groupname}?', askedtofriend: 'Chiesto l\'Amicizia a {username}', - askedtohandshake: 'Chiesto la Stretta di mano a {username}', + askedtohandshake: 'Hai confermato la tua fiducia a {username}', domanda_revoke_friend: 'Revocare la richiesta di Amicizia a {username}?', domanda_revoke_handshake: 'Revocare la richiesta di Stretta di mano a {username}?', domanda_revoke_group: 'Revocare la richiesta al gruppo {groupname}?', domanda_refuse_group: 'Rifiutare la richiesta di {username} per entrare nel gruppo {groupname}?', revoketofriend: 'Revocato la richiesta di Amicizia a {username}', - revoketohandshake: 'Revocato la richiesta di Stretta di mano a {username}', + revoketohandshake: 'Hai revocato la fiducia a {username}', domanda_cancel_req_friend: 'Annullare la richiesta di Amicizia a {username}?', - domanda_cancel_req_handshake: 'Annullare la richiesta di Stretta di mano a {username}?', domanda_cancel_req_group: 'Annullare la richiesta d\'invito di {username} al gruppo {groupname}?', cancel_req_friend: 'Annullata la richiesta di Amicizia a {username}', - cancel_req_handshake: 'Annullata la richiesta di Stretta di mano a {username}', cancel_req_group: 'Annullata la richiesta al gruppo {groupname}', domanda_rejectedtrust: 'Rifiutare la Fiducia a {username}?', rejected: 'Rifiutato la Fiducia', @@ -1085,16 +1085,18 @@ const msg_it = { report_user: 'Segnala Utente', }, handshake: { + strettadimano: 'Stretta di mano', strettedimano: 'Strette di mano', received: 'Ricevute', incommon: 'Strette in Comune', accept_trust: 'Accetta la Stretta di mano', accepted: 'Stretta di mano confermata', refused: 'Stretta di mano rifiutata', - accept: 'Conferma', + accept: 'Ricambia la fiducia', refuse: 'Rifiuta', - accept_handshake: 'Conferma la Stretta di mano', - remove_from_myhandshake: 'Rimuovi dalle Strette di mano', + accept_handshake: 'Stringi la mano', + accept_you_too_handshake: 'Ricambia la fiducia', + remove_from_myhandshake: 'Togli la Stretta di mano', ask_handshake: 'Stringi la mano', cancel_ask_handshake: 'Annulla la richiesta di Stretta di mano', cancel_ask_handshake_short: 'Annulla', diff --git a/src/store/Modules/costanti.ts b/src/store/Modules/costanti.ts index b820aef1..0692cc55 100755 --- a/src/store/Modules/costanti.ts +++ b/src/store/Modules/costanti.ts @@ -244,7 +244,6 @@ export const costanti = { MY_GROUPS: 21, USER_GROUPS: 22, HANDSHAKE: 23, - REQ_HANDSHAKE: 24, ASK_SENT_HANDSHAKE: 25, CREATE_GROUP: 30, diff --git a/src/store/Modules/tools.ts b/src/store/Modules/tools.ts index f27c9ebc..2f18f105 100644 --- a/src/store/Modules/tools.ts +++ b/src/store/Modules/tools.ts @@ -5468,7 +5468,7 @@ export const tools = { message: t('db.domanda_addtohandshake', { username: usernameDest }), ok: { label: t('dialog.yes'), push: true }, cancel: { label: t('dialog.cancel') }, - title: t('db.domanda') + title: t('handshake.strettadimano') }).onOk(() => { userStore.setFriendsCmd($q, t, username, usernameDest, shared_consts.FRIENDSCMD.SETHANDSHAKE, null) @@ -5476,7 +5476,6 @@ export const tools = { if (res) { notifStore.updateNotification = true userStore.my.profile.handshake = [...userStore.my.profile.handshake, res] - userStore.my.profile.req_handshake = userStore.my.profile.req_handshake.filter((rec: IFriends) => rec.username !== usernameDest) tools.showPositiveNotif($q, t('db.addedhandshake')) } }) @@ -5572,27 +5571,6 @@ export const tools = { }) }, - refuseReqHandShake($q: any, username: string, usernameDest: string) { - - const userStore = useUserStore() - const notifStore = useNotifStore() - $q.dialog({ - message: t('db.domanda_revoke_handshake', { username: usernameDest }), - ok: { label: t('dialog.yes'), push: true }, - cancel: { label: t('dialog.cancel') }, - title: t('db.domanda') - }).onOk(() => { - - userStore.setFriendsCmd($q, t, username, usernameDest, shared_consts.FRIENDSCMD.REMOVE_FROM_MYHANDSHAKE, null).then((res) => { - if (res) { - notifStore.updateNotification = true - userStore.my.profile.req_handshake = userStore.my.profile.req_handshake.filter((user: IFriends) => user.username !== usernameDest) - tools.showPositiveNotif($q, t('db.removedhandshake')) - } - }) - }) - }, - updateMyData(res: any) { const userStore = useUserStore() const circuitStore = useCircuitStore() @@ -5874,7 +5852,7 @@ export const tools = { }) }, - setRequestHandShake($q: any, username: string, usernameDest: string, value: boolean) { + setHandShake($q: any, username: string, usernameDest: string, value: boolean) { const userStore = useUserStore() @@ -5897,16 +5875,14 @@ export const tools = { title: t('db.domanda') }).onOk(() => { - userStore.setFriendsCmd($q, t, username, usernameDest, shared_consts.FRIENDSCMD.REQHANDSHAKE, value) + userStore.setFriendsCmd($q, t, username, usernameDest, shared_consts.FRIENDSCMD.SETHANDSHAKE, value) .then((res: any) => { if (res) { if (value) { // ADD to req HandShake - userStore.my.profile.asked_handshake.push(res) tools.showPositiveNotif($q, t('db.askedtohandshake', { username: usernameDest })) } else { // REMOVE to req HandShake - userStore.my.profile.asked_handshake = userStore.my.profile.asked_handshake.filter((rec: IUserFields) => rec.username !== usernameDest) tools.showPositiveNotif($q, t('db.revoketohandshake', { username: usernameDest })) } @@ -5975,23 +5951,6 @@ export const tools = { }) }) }, - cancelReqHandShake($q: any, username: string, usernameDest: string) { - const userStore = useUserStore() - $q.dialog({ - message: t('db.domanda_cancel_req_handshake', { username: usernameDest }), - ok: { label: t('dialog.yes'), push: true }, - cancel: { label: t('dialog.cancel') }, - title: t('db.domanda') - }).onOk(() => { - - userStore.setFriendsCmd($q, t, username, usernameDest, shared_consts.FRIENDSCMD.CANCEL_REQ_HANDSHAKE, null).then((res) => { - if (res) { - userStore.my.profile.asked_handshake = userStore.my.profile.asked_handshake.filter((rec: IUserFields) => rec.username !== usernameDest) - tools.showPositiveNotif($q, t('db.cancel_req_handshake')) - } - }) - }) - }, cancelReqGroups($q: any, username: string, groupnameDest: string) { const userStore = useUserStore() $q.dialog({ @@ -6613,14 +6572,8 @@ export const tools = { tools.cancelReqFriends($q, username, dest) } else if (cmd === shared_consts.FRIENDSCMD.SETHANDSHAKE) { tools.addToMyHandShake($q, username, dest) - } else if (cmd === shared_consts.FRIENDSCMD.REQHANDSHAKE) { - tools.setRequestHandShake($q, username, dest, value) } else if (cmd === shared_consts.FRIENDSCMD.REMOVE_FROM_MYHANDSHAKE) { tools.removeFromMyHandShake($q, username, dest) - } else if (cmd === shared_consts.FRIENDSCMD.REFUSE_REQ_HANDSHAKE) { - tools.refuseReqHandShake($q, username, dest) - } else if (cmd === shared_consts.FRIENDSCMD.CANCEL_REQ_HANDSHAKE) { - tools.cancelReqHandShake($q, username, dest) } else if (cmd === shared_consts.CIRCUITCMD.SET) { tools.addToMyCircuits($q, username, dest) } else if (cmd === shared_consts.CIRCUITCMD.REQ) { diff --git a/src/store/NotifStore.ts b/src/store/NotifStore.ts index 10b6be86..2891aa5e 100755 --- a/src/store/NotifStore.ts +++ b/src/store/NotifStore.ts @@ -111,7 +111,7 @@ export const useNotifStore = defineStore('NotifStore', { } } this.updateArrNotif() - }, 3000) + }, 20000) }) .catch((error) => { diff --git a/src/store/UserStore.ts b/src/store/UserStore.ts index 8bb34dc7..0ce1b7e4 100755 --- a/src/store/UserStore.ts +++ b/src/store/UserStore.ts @@ -66,8 +66,6 @@ export const DefaultUser: IUserFields = { friends: [], req_friends: [], handshake: [], - req_handshake: [], - asked_handshake: [], mygroups: [], mycircuits: [], manage_mygroups: [], @@ -127,8 +125,6 @@ export const DefaultProfile: IUserProfile = { friends: [], req_friends: [], handshake: [], - req_handshake: [], - asked_handshake: [], mygroups: [], mycircuits: [], manage_mygroups: [], @@ -233,6 +229,13 @@ export const useUserStore = defineStore('UserStore', { return false }, + IsHandShakeByMe(user: IUserFields): boolean { + if (user && user.profile && user.profile.handshake) + return user.profile.handshake.findIndex((rec) => rec.username === this.my.username) >= 0 + else + return false + }, + IsMyGroupByGroupname(groupname: string): boolean { if (this.my.profile.mygroups) return this.my.profile.mygroups.findIndex((rec) => rec.groupname === groupname) >= 0 @@ -263,13 +266,6 @@ export const useUserStore = defineStore('UserStore', { return false }, - IsAskedHandShakeByUsername(username: string): boolean { - if (this.my.profile.asked_handshake) - return this.my.profile.asked_handshake.findIndex((rec) => rec.username === username) >= 0 - else - return false - }, - IsReqFriendByUsername(username: string): boolean { if (this.my.profile.req_friends) return this.my.profile.req_friends.findIndex((rec) => rec.username === username) >= 0 @@ -277,13 +273,6 @@ export const useUserStore = defineStore('UserStore', { return false }, - IsReqHandShakeByUsername(username: string): boolean { - if (this.my.profile.req_handshake) - return this.my.profile.req_handshake.findIndex((rec) => rec.username === username) >= 0 - else - return false - }, - IsAskedGroupByGroupname(groupname: string): boolean { if (this.my.profile.asked_groups) return this.my.profile.asked_groups.findIndex((rec: IGroupShort) => rec.groupname === groupname) >= 0 @@ -766,7 +755,6 @@ export const useUserStore = defineStore('UserStore', { // Memory this.my.profile.manage_mygroups = [] this.my.profile.asked_friends = [] - this.my.profile.asked_handshake = [] this.my.profile.asked_groups = [] this.my.profile.refused_groups = [] } @@ -1291,8 +1279,6 @@ export const useUserStore = defineStore('UserStore', { this.my.profile.asked_friends = data.listSentRequestFriends ? data.listSentRequestFriends : [] this.my.profile.handshake = data.listHandShake ? data.listHandShake : [] - this.my.profile.req_handshake = data.listRequestHandShake ? data.listRequestHandShake : [] - this.my.profile.asked_handshake = data.listSentRequestHandShake ? data.listSentRequestHandShake : [] }, async loadFriends() { diff --git a/src/views/user/myprofile/myprofile.vue b/src/views/user/myprofile/myprofile.vue index 8f18da82..bf907f0a 100755 --- a/src/views/user/myprofile/myprofile.vue +++ b/src/views/user/myprofile/myprofile.vue @@ -218,252 +218,286 @@
{{ myuser.profile.biografia }}
-
+
+
+ + + + +
  - {{ $t('db.addtohandshake', { username: myuser.username }) }} + {{ $t('db.both_fiducia', { username: myuser.username }) }} -
- - - - - - -
-
- - -
-
- -
- - -
-
-
- - +   + {{ $t('db.handshake_him', { username: myuser.username }) }} + + + +   + {{ $t('db.handshake_you', { username: myuser.username }) }} + + + + +
+
+ + +
-
+
+ +
+
+
+ + +
+
+ +
+
+ +
+ + + + {{ + $t('friends.remove_from_myfriends') + }} + + + {{ + $t('friends.block_user') + }} + + + + + + {{ + $t('friends.report_user') + }} + + + + + + + + +
- - - - - - {{ - $t('friends.remove_from_myfriends') - }} - - - {{ - $t('friends.block_user') - }} - - - - - - {{ - $t('friends.report_user') - }} - - - - - -