Non funziona correttamente la richiesta di amicizia dalla ricerca Amici
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.2.0"
|
||||
APP_VERSION="0.2.1"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.2.0"
|
||||
APP_VERSION="0.2.1"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="1"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.2.0"
|
||||
APP_VERSION="0.2.1"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -147,7 +147,7 @@ module.exports = configure((ctx) => ({
|
||||
},
|
||||
devServer: {
|
||||
https: false,
|
||||
port: 8082,
|
||||
port: 8084,
|
||||
open: false, // opens browser window automatically
|
||||
},
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.2.0"
|
||||
APP_VERSION="0.2.1"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="12"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -147,7 +147,7 @@ module.exports = configure((ctx) => ({
|
||||
},
|
||||
devServer: {
|
||||
https: false,
|
||||
port: 8082,
|
||||
port: 8084,
|
||||
open: false, // opens browser window automatically
|
||||
},
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { CMyUser } from '@/components/CMyUser'
|
||||
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||
import { computed, defineComponent, onMounted, PropType, ref, toRef } from 'vue'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
@@ -11,7 +12,7 @@ import { tools } from '@store/Modules/tools'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyFriends',
|
||||
components: { CMyUser },
|
||||
components: { CMyUser, CUserNonVerif },
|
||||
emits: ['update:modelValue'],
|
||||
props: {
|
||||
modelValue: {
|
||||
@@ -156,9 +157,6 @@ export default defineComponent({
|
||||
userStore.loadFriends(username.value).then((ris) => {
|
||||
// console.log('ris', ris)
|
||||
if (ris) {
|
||||
userStore.my.profile.friends = ris.listFriends ? ris.listFriends : []
|
||||
userStore.my.profile.req_friends = ris.listRequestFriends ? ris.listRequestFriends : []
|
||||
userStore.my.profile.asked_friends = ris.listSentRequestFriends ? ris.listSentRequestFriends : []
|
||||
listTrusted.value = ris.listTrusted ? ris.listTrusted : []
|
||||
filtroutente.value = [{ userId: userStore.my._id }]
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<template>
|
||||
<div v-if="tools.isUserOk()">
|
||||
<div v-if="finder" class="q-gutter-sm q-pa-sm q-pb-sm">
|
||||
<q-btn-toggle
|
||||
:model-value="modelValue"
|
||||
@@ -44,6 +45,10 @@
|
||||
</span>
|
||||
</q-list>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<CUserNonVerif></CUserNonVerif>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMyFriends.ts">
|
||||
|
||||
@@ -7,10 +7,12 @@ import { tools } from '@store/Modules/tools'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyGroup',
|
||||
emits: ['setCmd'],
|
||||
components: {CUserNonVerif},
|
||||
props: {
|
||||
mygrp: {
|
||||
type: Object as PropType<IMyGroup | null>,
|
||||
@@ -81,6 +83,7 @@ export default defineComponent({
|
||||
setCmd,
|
||||
shared_consts,
|
||||
userStore,
|
||||
tools,
|
||||
$q,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<template>
|
||||
<div v-if="tools.isUserOk()">
|
||||
<div v-if="grp">
|
||||
<q-item class="q-my-sm" clickable>
|
||||
<q-item-section avatar @click="naviga(`/grp/` + grp.groupname)">
|
||||
@@ -85,6 +86,10 @@
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<CUserNonVerif></CUserNonVerif>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMyGroup.ts">
|
||||
|
||||
@@ -7,11 +7,12 @@ import { costanti } from '@costanti'
|
||||
import { IMyGroup, ISearchList, IUserFields } from 'model'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyGroups',
|
||||
components: { CMyGroup },
|
||||
components: { CMyGroup, CUserNonVerif },
|
||||
emits: ['update:modelValue'],
|
||||
props: {
|
||||
modelValue: {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<template>
|
||||
<div v-if="tools.isUserOk()">
|
||||
<div v-if="finder" class="q-gutter-sm q-pa-sm q-pb-sm">
|
||||
<q-btn-toggle
|
||||
:model-value="modelValue"
|
||||
@@ -39,6 +40,10 @@
|
||||
</span>
|
||||
</q-list>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<CUserNonVerif></CUserNonVerif>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMyGroups.ts">
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
<template>
|
||||
<div class="q-ma-md">
|
||||
<CTitleBanner title="Verifica">
|
||||
La verifica è in corso. Ti arriverà un messaggio dal Bot quando sarai abilitato.
|
||||
</CTitleBanner>
|
||||
<q-banner inline-actions rounded class="bg-orange text-white">
|
||||
<template v-slot:avatar>
|
||||
<q-icon name="info" color="primary" />
|
||||
</template>
|
||||
<strong>La verifica è in corso. Ti arriverà un messaggio sul Bot Telegram quando verrai abilitato dal tuo invitante.</strong>
|
||||
|
||||
</q-banner>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
|
||||
|
||||
<div v-if="isLogged()">
|
||||
<CVerifyTelegram v-if="TelegCode() || !TelegVerificato()">
|
||||
<CVerifyTelegram v-if="!TelegVerificato()">
|
||||
|
||||
</CVerifyTelegram>
|
||||
|
||||
<CVerifyEmail v-if="!isEmailVerified()">
|
||||
<CVerifyEmail v-if="!isEmailVerified() && !TelegVerificato()">
|
||||
|
||||
</CVerifyEmail>
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
|
||||
</CCopyBtn>
|
||||
|
||||
<div>Versione: {{tools.getvers()}}</div>
|
||||
|
||||
</div>
|
||||
<div v-else>
|
||||
<CUserNonVerif></CUserNonVerif>
|
||||
|
||||
0
src/root/mobility/mobility.scss
Executable file
0
src/root/mobility/mobility.scss
Executable file
66
src/root/mobility/mobility.ts
Executable file
66
src/root/mobility/mobility.ts
Executable file
@@ -0,0 +1,66 @@
|
||||
import {
|
||||
defineComponent, ref, computed,
|
||||
} from 'vue'
|
||||
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { CSkill } from '@/components/CSkill'
|
||||
import { CFinder } from '@/components/CFinder'
|
||||
import { CDashboard } from '@/components/CDashboard'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CChartMap } from '@src/components/CChartMap'
|
||||
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||
import { CMapsEsempio } from '@src/components/CMapsEsempio'
|
||||
import { CVerifyEmail } from '@src/components/CVerifyEmail'
|
||||
import { CVerifyTelegram } from '@src/components/CVerifyTelegram'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { static_data } from '@/db/static_data'
|
||||
import MixinBase from '@/mixins/mixin-base'
|
||||
import MixinUsers from '@/mixins/mixin-users'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
name: 'mobility',
|
||||
components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram, CDashboard, CUserNonVerif, CTitleBanner },
|
||||
setup() {
|
||||
const globalStore = useGlobalStore()
|
||||
const userStore = useUserStore()
|
||||
const { getValDb } = MixinBase()
|
||||
const { isEmailVerified, TelegVerificato } = MixinUsers()
|
||||
|
||||
function TelegCode() {
|
||||
return userStore.my.profile.teleg_checkcode
|
||||
}
|
||||
|
||||
function openrighttoolbar() {
|
||||
globalStore.rightDrawerOpen = true
|
||||
}
|
||||
|
||||
function isLogged() {
|
||||
return userStore.isLogged
|
||||
}
|
||||
function isUserOk() {
|
||||
return userStore.isUserOk()
|
||||
}
|
||||
|
||||
function getLinkBotTelegram(): string {
|
||||
if ( tools.isTest() && !process.env.DEV) {
|
||||
return getValDb('TELEG_BOT_LINK_TEST', false)
|
||||
} else{
|
||||
return getValDb('TELEG_BOT_LINK', false)
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
tools,
|
||||
static_data,
|
||||
isEmailVerified,
|
||||
TelegCode,
|
||||
TelegVerificato,
|
||||
isLogged,
|
||||
openrighttoolbar,
|
||||
isUserOk,
|
||||
getLinkBotTelegram,
|
||||
}
|
||||
},
|
||||
})
|
||||
15
src/root/mobility/mobility.vue
Executable file
15
src/root/mobility/mobility.vue
Executable file
@@ -0,0 +1,15 @@
|
||||
<template>
|
||||
<q-page class="">
|
||||
|
||||
<CTitleBanner title="Pagina in Costruzione">
|
||||
Questo strumento è attualmente in costruzione
|
||||
</CTitleBanner>
|
||||
|
||||
</q-page>
|
||||
|
||||
</template>
|
||||
<script lang="ts" src="./mobility.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './mobility.scss';
|
||||
</style>
|
||||
0
src/root/scuola/scuola.scss
Executable file
0
src/root/scuola/scuola.scss
Executable file
66
src/root/scuola/scuola.ts
Executable file
66
src/root/scuola/scuola.ts
Executable file
@@ -0,0 +1,66 @@
|
||||
import {
|
||||
defineComponent, ref, computed,
|
||||
} from 'vue'
|
||||
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { CSkill } from '@/components/CSkill'
|
||||
import { CFinder } from '@/components/CFinder'
|
||||
import { CDashboard } from '@/components/CDashboard'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CChartMap } from '@src/components/CChartMap'
|
||||
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||
import { CMapsEsempio } from '@src/components/CMapsEsempio'
|
||||
import { CVerifyEmail } from '@src/components/CVerifyEmail'
|
||||
import { CVerifyTelegram } from '@src/components/CVerifyTelegram'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { static_data } from '@/db/static_data'
|
||||
import MixinBase from '@/mixins/mixin-base'
|
||||
import MixinUsers from '@/mixins/mixin-users'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
name: 'work',
|
||||
components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram, CDashboard, CUserNonVerif, CTitleBanner },
|
||||
setup() {
|
||||
const globalStore = useGlobalStore()
|
||||
const userStore = useUserStore()
|
||||
const { getValDb } = MixinBase()
|
||||
const { isEmailVerified, TelegVerificato } = MixinUsers()
|
||||
|
||||
function TelegCode() {
|
||||
return userStore.my.profile.teleg_checkcode
|
||||
}
|
||||
|
||||
function openrighttoolbar() {
|
||||
globalStore.rightDrawerOpen = true
|
||||
}
|
||||
|
||||
function isLogged() {
|
||||
return userStore.isLogged
|
||||
}
|
||||
function isUserOk() {
|
||||
return userStore.isUserOk()
|
||||
}
|
||||
|
||||
function getLinkBotTelegram(): string {
|
||||
if ( tools.isTest() && !process.env.DEV) {
|
||||
return getValDb('TELEG_BOT_LINK_TEST', false)
|
||||
} else{
|
||||
return getValDb('TELEG_BOT_LINK', false)
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
tools,
|
||||
static_data,
|
||||
isEmailVerified,
|
||||
TelegCode,
|
||||
TelegVerificato,
|
||||
isLogged,
|
||||
openrighttoolbar,
|
||||
isUserOk,
|
||||
getLinkBotTelegram,
|
||||
}
|
||||
},
|
||||
})
|
||||
15
src/root/scuola/scuola.vue
Executable file
15
src/root/scuola/scuola.vue
Executable file
@@ -0,0 +1,15 @@
|
||||
<template>
|
||||
<q-page class="">
|
||||
|
||||
<CTitleBanner title="Pagina in Costruzione">
|
||||
Questo strumento è attualmente in costruzione
|
||||
</CTitleBanner>
|
||||
|
||||
</q-page>
|
||||
|
||||
</template>
|
||||
<script lang="ts" src="./scuola.ts">
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import './scuola.scss';
|
||||
</style>
|
||||
@@ -4881,7 +4881,12 @@ export const tools = {
|
||||
}
|
||||
return ''
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
isUserOk(){
|
||||
const userStore = useUserStore()
|
||||
return userStore.isUserOk()
|
||||
},
|
||||
|
||||
|
||||
// getLocale() {
|
||||
|
||||
@@ -192,6 +192,13 @@ export const useUserStore = defineStore('UserStore', {
|
||||
return false
|
||||
},
|
||||
|
||||
IsReqFriendByUsername(username: string): boolean {
|
||||
if (this.my.profile.req_friends)
|
||||
return this.my.profile.req_friends.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: IMyGroup) => rec.groupname === groupname) >= 0
|
||||
@@ -892,8 +899,12 @@ export const useUserStore = defineStore('UserStore', {
|
||||
}
|
||||
|
||||
return Api.SendReq('/users/profile', 'POST', data)
|
||||
.then((res) => {
|
||||
return res.data
|
||||
.then((ris) => {
|
||||
this.my.profile.friends = ris.data.friends.listFriends ? ris.data.friends.listFriends : []
|
||||
this.my.profile.req_friends = ris.data.friends.listRequestFriends ? ris.data.friends.listRequestFriends : []
|
||||
this.my.profile.asked_friends = ris.data.friends.listSentRequestFriends ? ris.data.friends.listSentRequestFriends : []
|
||||
|
||||
return ris.data.user
|
||||
}).catch((error) => {
|
||||
return {}
|
||||
})
|
||||
@@ -930,8 +941,11 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
async loadFriends(username: string) {
|
||||
return Api.SendReq('/users/friends', 'POST', null)
|
||||
.then((res) => {
|
||||
return res.data
|
||||
.then((ris) => {
|
||||
this.my.profile.friends = ris.data.listFriends ? ris.data.listFriends : []
|
||||
this.my.profile.req_friends = ris.data.listRequestFriends ? ris.data.listRequestFriends : []
|
||||
this.my.profile.asked_friends = ris.data.listSentRequestFriends ? ris.data.listSentRequestFriends : []
|
||||
return ris.data
|
||||
}).catch((error) => {
|
||||
return {}
|
||||
})
|
||||
|
||||
@@ -4,6 +4,7 @@ import { CProfile } from '@/components/CProfile'
|
||||
import { CCopyBtn } from '@/components/CCopyBtn'
|
||||
import { CSkill } from '@/components/CSkill'
|
||||
import { CDateTime } from '@/components/CDateTime'
|
||||
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
@@ -21,7 +22,7 @@ import MixinUsers from '@/mixins/mixin-users'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'myprofile',
|
||||
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime, CCopyBtn },
|
||||
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime, CCopyBtn, CUserNonVerif },
|
||||
props: {},
|
||||
setup() {
|
||||
const userStore = useUserStore()
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<template>
|
||||
<div v-if="tools.isUserOk()">
|
||||
<div class="q-gutter-sm q-pa-sm q-pb-md">
|
||||
<div v-if="myuser.date_reg" class="fit column no-wrap justify-evenly items-center content-start">
|
||||
|
||||
@@ -34,16 +35,42 @@
|
||||
</div>
|
||||
|
||||
<div v-if="!isMyRecord(myuser.username)">
|
||||
<q-btn
|
||||
v-if="userStore.IsReqFriendByUsername(myuser.username)"
|
||||
icon="fas fa-user-plus"
|
||||
color="primary" :label="$t('friends.accept_friend')"
|
||||
@click="tools.addToMyFriends($q, userStore.my.username, myuser.username)"
|
||||
/>
|
||||
<div v-else>
|
||||
<q-btn
|
||||
v-if="!userStore.IsMyFriendByUsername(myuser.username) && !userStore.IsAskedFriendByUsername(myuser.username)"
|
||||
icon="fas fa-user-plus"
|
||||
color="primary" :label="$t('friends.ask_friend')"
|
||||
@click="tools.setRequestFriendship($q, userStore.my.username, myuser.username, true)"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<q-btn v-if="userStore.IsMyFriendByUsername(myuser.username)" rounded icon="fas fa-ellipsis-h" >
|
||||
<q-menu>
|
||||
<q-list v-if="true" style="min-width: 150px">
|
||||
<q-item clickable
|
||||
icon="fas fa-user-minus"
|
||||
v-close-popup @click="tools.removeFromMyFriends($q, userStore.my.username, myuser.username)">
|
||||
<q-item-section>{{ $t('friends.remove_from_myfriends') }}</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable
|
||||
icon="fas fa-ban"
|
||||
v-close-popup @click="tools.blockUser($q, userStore.my.username, myuser.username)">
|
||||
<q-item-section>{{ $t('friends.block_user') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="userStore.IsAskedFriendByUsername(myuser.username) && !userStore.IsMyFriendByUsername(myuser.username)"
|
||||
icon="fas fa-user-minus"
|
||||
flat :label="$t('friends.cancel_ask_friend_short')"
|
||||
:label="$t('friends.cancel_ask_friend_short')"
|
||||
@click="tools.cancelReqFriends($q, userStore.my.username, myuser.username)"
|
||||
/>
|
||||
|
||||
@@ -82,7 +109,8 @@
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
<CCopyBtn :title="$t('reg.link_reg')" :texttocopy="getRefLink(username)">
|
||||
<CCopyBtn v-if="myuser.username === myusername()" :title="$t('reg.link_reg')"
|
||||
:texttocopy="getRefLink(username)">
|
||||
|
||||
</CCopyBtn>
|
||||
|
||||
@@ -157,6 +185,10 @@
|
||||
<img :src="getImgUser()" :alt="username" class="full-width">
|
||||
|
||||
</q-dialog>
|
||||
</div>
|
||||
<div v-else>
|
||||
<CUserNonVerif></CUserNonVerif>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user