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"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.2.0"
|
APP_VERSION="0.2.1"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="1"
|
APP_ID="1"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.2.0"
|
APP_VERSION="0.2.1"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ module.exports = configure((ctx) => ({
|
|||||||
},
|
},
|
||||||
devServer: {
|
devServer: {
|
||||||
https: false,
|
https: false,
|
||||||
port: 8082,
|
port: 8084,
|
||||||
open: false, // opens browser window automatically
|
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"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="12"
|
APP_ID="12"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ module.exports = configure((ctx) => ({
|
|||||||
},
|
},
|
||||||
devServer: {
|
devServer: {
|
||||||
https: false,
|
https: false,
|
||||||
port: 8082,
|
port: 8084,
|
||||||
open: false, // opens browser window automatically
|
open: false, // opens browser window automatically
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { CMyUser } from '@/components/CMyUser'
|
import { CMyUser } from '@/components/CMyUser'
|
||||||
|
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||||
import { computed, defineComponent, onMounted, PropType, ref, toRef } from 'vue'
|
import { computed, defineComponent, onMounted, PropType, ref, toRef } from 'vue'
|
||||||
import { useUserStore } from '@store/UserStore'
|
import { useUserStore } from '@store/UserStore'
|
||||||
import { useI18n } from '@/boot/i18n'
|
import { useI18n } from '@/boot/i18n'
|
||||||
@@ -11,7 +12,7 @@ import { tools } from '@store/Modules/tools'
|
|||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'CMyFriends',
|
name: 'CMyFriends',
|
||||||
components: { CMyUser },
|
components: { CMyUser, CUserNonVerif },
|
||||||
emits: ['update:modelValue'],
|
emits: ['update:modelValue'],
|
||||||
props: {
|
props: {
|
||||||
modelValue: {
|
modelValue: {
|
||||||
@@ -156,9 +157,6 @@ export default defineComponent({
|
|||||||
userStore.loadFriends(username.value).then((ris) => {
|
userStore.loadFriends(username.value).then((ris) => {
|
||||||
// console.log('ris', ris)
|
// console.log('ris', ris)
|
||||||
if (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 : []
|
listTrusted.value = ris.listTrusted ? ris.listTrusted : []
|
||||||
filtroutente.value = [{ userId: userStore.my._id }]
|
filtroutente.value = [{ userId: userStore.my._id }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,26 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="finder" class="q-gutter-sm q-pa-sm q-pb-sm">
|
<div v-if="tools.isUserOk()">
|
||||||
<q-btn-toggle
|
<div v-if="finder" class="q-gutter-sm q-pa-sm q-pb-sm">
|
||||||
:model-value="modelValue"
|
<q-btn-toggle
|
||||||
@update:model-value="updateValue"
|
:model-value="modelValue"
|
||||||
class="my-custom-toggle"
|
@update:model-value="updateValue"
|
||||||
no-caps
|
class="my-custom-toggle"
|
||||||
rounded
|
no-caps
|
||||||
unelevated
|
rounded
|
||||||
push
|
unelevated
|
||||||
toggle-color="primary"
|
push
|
||||||
color="white"
|
toggle-color="primary"
|
||||||
text-color="primary"
|
color="white"
|
||||||
:options="myoptions"
|
text-color="primary"
|
||||||
/>
|
:options="myoptions"
|
||||||
</div>
|
/>
|
||||||
<div v-if="finder" class="">
|
|
||||||
|
|
||||||
<div v-if="modelValue === costanti.FIND_PEOPLE">
|
|
||||||
<slot></slot>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-if="finder" class="">
|
||||||
<q-list>
|
|
||||||
|
<div v-if="modelValue === costanti.FIND_PEOPLE">
|
||||||
|
<slot></slot>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<q-list>
|
||||||
<span v-for="(contact, index) in listfriendsfiltered" :key="index" class="q-my-sm" clickable>
|
<span v-for="(contact, index) in listfriendsfiltered" :key="index" class="q-my-sm" clickable>
|
||||||
<CMyUser
|
<CMyUser
|
||||||
:mycontact="contact"
|
:mycontact="contact"
|
||||||
@@ -28,11 +29,11 @@
|
|||||||
:visu="modelValue">
|
:visu="modelValue">
|
||||||
</CMyUser>
|
</CMyUser>
|
||||||
</span>
|
</span>
|
||||||
</q-list>
|
</q-list>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div v-else>
|
||||||
<div v-else>
|
<q-list class="width-container">
|
||||||
<q-list class="width-container">
|
|
||||||
<span class="q-my-sm" clickable>
|
<span class="q-my-sm" clickable>
|
||||||
<CMyUser
|
<CMyUser
|
||||||
:mycontact="mycontact"
|
:mycontact="mycontact"
|
||||||
@@ -42,7 +43,11 @@
|
|||||||
:labelextra="labelextra">
|
:labelextra="labelextra">
|
||||||
</CMyUser>
|
</CMyUser>
|
||||||
</span>
|
</span>
|
||||||
</q-list>
|
</q-list>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<CUserNonVerif></CUserNonVerif>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,12 @@ import { tools } from '@store/Modules/tools'
|
|||||||
import { useQuasar } from 'quasar'
|
import { useQuasar } from 'quasar'
|
||||||
import { useI18n } from '@/boot/i18n'
|
import { useI18n } from '@/boot/i18n'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
|
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'CMyGroup',
|
name: 'CMyGroup',
|
||||||
emits: ['setCmd'],
|
emits: ['setCmd'],
|
||||||
|
components: {CUserNonVerif},
|
||||||
props: {
|
props: {
|
||||||
mygrp: {
|
mygrp: {
|
||||||
type: Object as PropType<IMyGroup | null>,
|
type: Object as PropType<IMyGroup | null>,
|
||||||
@@ -81,6 +83,7 @@ export default defineComponent({
|
|||||||
setCmd,
|
setCmd,
|
||||||
shared_consts,
|
shared_consts,
|
||||||
userStore,
|
userStore,
|
||||||
|
tools,
|
||||||
$q,
|
$q,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div v-if="tools.isUserOk()">
|
||||||
<div v-if="grp">
|
<div v-if="grp">
|
||||||
<q-item class="q-my-sm" clickable>
|
<q-item class="q-my-sm" clickable>
|
||||||
<q-item-section avatar @click="naviga(`/grp/` + grp.groupname)">
|
<q-item-section avatar @click="naviga(`/grp/` + grp.groupname)">
|
||||||
@@ -85,6 +86,10 @@
|
|||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<CUserNonVerif></CUserNonVerif>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" src="./CMyGroup.ts">
|
<script lang="ts" src="./CMyGroup.ts">
|
||||||
|
|||||||
@@ -7,11 +7,12 @@ import { costanti } from '@costanti'
|
|||||||
import { IMyGroup, ISearchList, IUserFields } from 'model'
|
import { IMyGroup, ISearchList, IUserFields } from 'model'
|
||||||
import { shared_consts } from '@/common/shared_vuejs'
|
import { shared_consts } from '@/common/shared_vuejs'
|
||||||
import { tools } from '@store/Modules/tools'
|
import { tools } from '@store/Modules/tools'
|
||||||
|
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||||
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'CMyGroups',
|
name: 'CMyGroups',
|
||||||
components: { CMyGroup },
|
components: { CMyGroup, CUserNonVerif },
|
||||||
emits: ['update:modelValue'],
|
emits: ['update:modelValue'],
|
||||||
props: {
|
props: {
|
||||||
modelValue: {
|
modelValue: {
|
||||||
|
|||||||
@@ -1,43 +1,48 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="finder" class="q-gutter-sm q-pa-sm q-pb-sm">
|
<div v-if="tools.isUserOk()">
|
||||||
<q-btn-toggle
|
<div v-if="finder" class="q-gutter-sm q-pa-sm q-pb-sm">
|
||||||
:model-value="modelValue"
|
<q-btn-toggle
|
||||||
@update:model-value="updateValue"
|
:model-value="modelValue"
|
||||||
class="my-custom-toggle"
|
@update:model-value="updateValue"
|
||||||
no-caps
|
class="my-custom-toggle"
|
||||||
rounded
|
no-caps
|
||||||
unelevated
|
rounded
|
||||||
push
|
unelevated
|
||||||
toggle-color="primary"
|
push
|
||||||
color="white"
|
toggle-color="primary"
|
||||||
text-color="primary"
|
color="white"
|
||||||
:options="myoptions"
|
text-color="primary"
|
||||||
/>
|
:options="myoptions"
|
||||||
</div>
|
/>
|
||||||
<div v-if="finder" class="">
|
|
||||||
<div v-if="modelValue === costanti.FIND_GROUP">
|
|
||||||
<slot></slot>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-if="finder" class="">
|
||||||
<q-list>
|
<div v-if="modelValue === costanti.FIND_GROUP">
|
||||||
|
<slot></slot>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<q-list>
|
||||||
<span v-for="(grp, index) in listgroupsfiltered" :key="index" class="q-my-sm" clickable>
|
<span v-for="(grp, index) in listgroupsfiltered" :key="index" class="q-my-sm" clickable>
|
||||||
<CMyGroup
|
<CMyGroup
|
||||||
:mygrp="grp"
|
:mygrp="grp"
|
||||||
:visu="modelValue">
|
:visu="modelValue">
|
||||||
</CMyGroup>
|
</CMyGroup>
|
||||||
</span>
|
</span>
|
||||||
</q-list>
|
</q-list>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div v-else>
|
||||||
<div v-else>
|
<q-list class="width-container">
|
||||||
<q-list class="width-container">
|
|
||||||
<span class="q-my-sm" clickable>
|
<span class="q-my-sm" clickable>
|
||||||
<CMyGroup
|
<CMyGroup
|
||||||
:mygrp="mygrp"
|
:mygrp="mygrp"
|
||||||
:visu="visu">
|
:visu="visu">
|
||||||
</CMyGroup>
|
</CMyGroup>
|
||||||
</span>
|
</span>
|
||||||
</q-list>
|
</q-list>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<CUserNonVerif></CUserNonVerif>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="q-ma-md">
|
<div class="q-ma-md">
|
||||||
<CTitleBanner title="Verifica">
|
<q-banner inline-actions rounded class="bg-orange text-white">
|
||||||
La verifica è in corso. Ti arriverà un messaggio dal Bot quando sarai abilitato.
|
<template v-slot:avatar>
|
||||||
</CTitleBanner>
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -13,11 +13,11 @@
|
|||||||
|
|
||||||
|
|
||||||
<div v-if="isLogged()">
|
<div v-if="isLogged()">
|
||||||
<CVerifyTelegram v-if="TelegCode() || !TelegVerificato()">
|
<CVerifyTelegram v-if="!TelegVerificato()">
|
||||||
|
|
||||||
</CVerifyTelegram>
|
</CVerifyTelegram>
|
||||||
|
|
||||||
<CVerifyEmail v-if="!isEmailVerified()">
|
<CVerifyEmail v-if="!isEmailVerified() && !TelegVerificato()">
|
||||||
|
|
||||||
</CVerifyEmail>
|
</CVerifyEmail>
|
||||||
|
|
||||||
@@ -31,6 +31,8 @@
|
|||||||
|
|
||||||
</CCopyBtn>
|
</CCopyBtn>
|
||||||
|
|
||||||
|
<div>Versione: {{tools.getvers()}}</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<CUserNonVerif></CUserNonVerif>
|
<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 ''
|
return ''
|
||||||
|
|
||||||
}
|
},
|
||||||
|
|
||||||
|
isUserOk(){
|
||||||
|
const userStore = useUserStore()
|
||||||
|
return userStore.isUserOk()
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
// getLocale() {
|
// getLocale() {
|
||||||
|
|||||||
@@ -192,6 +192,13 @@ export const useUserStore = defineStore('UserStore', {
|
|||||||
return false
|
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 {
|
IsAskedGroupByGroupname(groupname: string): boolean {
|
||||||
if (this.my.profile.asked_groups)
|
if (this.my.profile.asked_groups)
|
||||||
return this.my.profile.asked_groups.findIndex((rec: IMyGroup) => rec.groupname === groupname) >= 0
|
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)
|
return Api.SendReq('/users/profile', 'POST', data)
|
||||||
.then((res) => {
|
.then((ris) => {
|
||||||
return res.data
|
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) => {
|
}).catch((error) => {
|
||||||
return {}
|
return {}
|
||||||
})
|
})
|
||||||
@@ -930,8 +941,11 @@ export const useUserStore = defineStore('UserStore', {
|
|||||||
|
|
||||||
async loadFriends(username: string) {
|
async loadFriends(username: string) {
|
||||||
return Api.SendReq('/users/friends', 'POST', null)
|
return Api.SendReq('/users/friends', 'POST', null)
|
||||||
.then((res) => {
|
.then((ris) => {
|
||||||
return res.data
|
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) => {
|
}).catch((error) => {
|
||||||
return {}
|
return {}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { CProfile } from '@/components/CProfile'
|
|||||||
import { CCopyBtn } from '@/components/CCopyBtn'
|
import { CCopyBtn } from '@/components/CCopyBtn'
|
||||||
import { CSkill } from '@/components/CSkill'
|
import { CSkill } from '@/components/CSkill'
|
||||||
import { CDateTime } from '@/components/CDateTime'
|
import { CDateTime } from '@/components/CDateTime'
|
||||||
|
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||||
import { tools } from '@store/Modules/tools'
|
import { tools } from '@store/Modules/tools'
|
||||||
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
|
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
|
||||||
import { useUserStore } from '@store/UserStore'
|
import { useUserStore } from '@store/UserStore'
|
||||||
@@ -21,7 +22,7 @@ import MixinUsers from '@/mixins/mixin-users'
|
|||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'myprofile',
|
name: 'myprofile',
|
||||||
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime, CCopyBtn },
|
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime, CCopyBtn, CUserNonVerif },
|
||||||
props: {},
|
props: {},
|
||||||
setup() {
|
setup() {
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
|||||||
@@ -1,162 +1,194 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="q-gutter-sm q-pa-sm q-pb-md">
|
<div v-if="tools.isUserOk()">
|
||||||
<div v-if="myuser.date_reg" class="fit column no-wrap justify-evenly items-center content-start">
|
<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">
|
||||||
|
|
||||||
<div class="">
|
<div class="">
|
||||||
<q-avatar size="140px">
|
<q-avatar size="140px">
|
||||||
<q-img :src="getImgUser()" :alt="username" img-class="imgprofile" height="140px" @click="showPic = true"/>
|
<q-img :src="getImgUser()" :alt="username" img-class="imgprofile" height="140px" @click="showPic = true"/>
|
||||||
</q-avatar>
|
</q-avatar>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-if="static_data.functionality.SHOW_NAMESURNAME">
|
|
||||||
<div class="text-h6">
|
|
||||||
<span v-if="checkifShow('name')"> {{ myuser.name }}</span> <span v-if="checkifShow('surname')">{{
|
|
||||||
myuser.surname
|
|
||||||
}}</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="col-12 text-h7 text-blue text-shadow-2">
|
<div v-if="static_data.functionality.SHOW_NAMESURNAME">
|
||||||
{{ myuser.username }}
|
<div class="text-h6">
|
||||||
</div>
|
<span v-if="checkifShow('name')"> {{ myuser.name }}</span> <span v-if="checkifShow('surname')">{{
|
||||||
<div class="col-12 text-h7">
|
myuser.surname
|
||||||
<span v-if="myuser.profile && myuser.profile.born_city">{{ myuser.profile.born_city }}</span> <span
|
}}</span>
|
||||||
v-if="myuser.profile && myuser.profile.nationality && myuser.profile.nationality !== 'Italia'">({{
|
</div>
|
||||||
myuser.profile.nationality
|
</div>
|
||||||
}})</span>
|
<div class="col-12 text-h7 text-blue text-shadow-2">
|
||||||
</div>
|
{{ myuser.username }}
|
||||||
<div v-if="myuser._id" class="col-12 text-h8 q-mt-sm">
|
</div>
|
||||||
|
<div class="col-12 text-h7">
|
||||||
|
<span v-if="myuser.profile && myuser.profile.born_city">{{ myuser.profile.born_city }}</span> <span
|
||||||
|
v-if="myuser.profile && myuser.profile.nationality && myuser.profile.nationality !== 'Italia'">({{
|
||||||
|
myuser.profile.nationality
|
||||||
|
}})</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="myuser._id" class="col-12 text-h8 q-mt-sm">
|
||||||
<span v-if="myuser.profile.qualifica">
|
<span v-if="myuser.profile.qualifica">
|
||||||
<em><span class="qualifica">{{ myuser.profile.qualifica }}</span></em>
|
<em><span class="qualifica">{{ myuser.profile.qualifica }}</span></em>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="myuser._id" class="col-12 text-h8 q-mt-sm">
|
<div v-if="myuser._id" class="col-12 text-h8 q-mt-sm">
|
||||||
{{ myuser.profile.biografia }}
|
{{ myuser.profile.biografia }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="!isMyRecord(myuser.username)">
|
<div v-if="!isMyRecord(myuser.username)">
|
||||||
<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)"
|
|
||||||
/>
|
|
||||||
<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')"
|
|
||||||
@click="tools.cancelReqFriends($q, userStore.my.username, myuser.username)"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="myuser.username === myusername()" icon="fas fa-pencil-alt"
|
|
||||||
color="blue"
|
|
||||||
size="md"
|
|
||||||
:label="$t('otherpages.modifprof')"
|
|
||||||
to="/editprofile">
|
|
||||||
</q-btn>
|
|
||||||
|
|
||||||
<div v-if="myuser._id" class="myrow justify-evenly items-center q-pa-sm q-ma-sm">
|
|
||||||
|
|
||||||
<div class="col-md-6 col-sm-6 q-ma-xs col-xs-12">
|
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="getLinkUserTelegram()" icon="fab fa-telegram"
|
v-if="userStore.IsReqFriendByUsername(myuser.username)"
|
||||||
color="blue" type="a"
|
icon="fas fa-user-plus"
|
||||||
size="md"
|
color="primary" :label="$t('friends.accept_friend')"
|
||||||
rounded
|
@click="tools.addToMyFriends($q, userStore.my.username, myuser.username)"
|
||||||
:label="$t('msgs.telegrammsg')"
|
/>
|
||||||
:href="getLinkUserTelegram()" target="__blank">
|
<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>
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6 col-sm-6 q-ma-xs col-xs-12">
|
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="getLinkWebSite()" icon="fas fa-globe"
|
v-if="userStore.IsAskedFriendByUsername(myuser.username) && !userStore.IsMyFriendByUsername(myuser.username)"
|
||||||
color="blue" type="a"
|
icon="fas fa-user-minus"
|
||||||
size="md"
|
:label="$t('friends.cancel_ask_friend_short')"
|
||||||
rounded
|
@click="tools.cancelReqFriends($q, userStore.my.username, myuser.username)"
|
||||||
:label="$t('reg.website')"
|
/>
|
||||||
:href="getLinkWebSite()" target="__blank">
|
|
||||||
</q-btn>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<CCopyBtn :title="$t('reg.link_reg')" :texttocopy="getRefLink(username)">
|
|
||||||
|
|
||||||
</CCopyBtn>
|
<q-btn
|
||||||
|
v-if="myuser.username === myusername()" icon="fas fa-pencil-alt"
|
||||||
|
color="blue"
|
||||||
|
size="md"
|
||||||
|
:label="$t('otherpages.modifprof')"
|
||||||
|
to="/editprofile">
|
||||||
|
</q-btn>
|
||||||
|
|
||||||
|
<div v-if="myuser._id" class="myrow justify-evenly items-center q-pa-sm q-ma-sm">
|
||||||
|
|
||||||
|
<div class="col-md-6 col-sm-6 q-ma-xs col-xs-12">
|
||||||
|
<q-btn
|
||||||
|
v-if="getLinkUserTelegram()" icon="fab fa-telegram"
|
||||||
|
color="blue" type="a"
|
||||||
|
size="md"
|
||||||
|
rounded
|
||||||
|
:label="$t('msgs.telegrammsg')"
|
||||||
|
:href="getLinkUserTelegram()" target="__blank">
|
||||||
|
</q-btn>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 col-sm-6 q-ma-xs col-xs-12">
|
||||||
|
<q-btn
|
||||||
|
v-if="getLinkWebSite()" icon="fas fa-globe"
|
||||||
|
color="blue" type="a"
|
||||||
|
size="md"
|
||||||
|
rounded
|
||||||
|
:label="$t('reg.website')"
|
||||||
|
:href="getLinkWebSite()" target="__blank">
|
||||||
|
</q-btn>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<CCopyBtn v-if="myuser.username === myusername()" :title="$t('reg.link_reg')"
|
||||||
|
:texttocopy="getRefLink(username)">
|
||||||
|
|
||||||
|
</CCopyBtn>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div v-else class="fit column no-wrap justify-evenly items-center content-start">
|
||||||
<div v-else class="fit column no-wrap justify-evenly items-center content-start">
|
<q-skeleton type="QAvatar" size="140px" height="140px" animation="fade"/>
|
||||||
<q-skeleton type="QAvatar" size="140px" height="140px" animation="fade"/>
|
<q-card flat bordered style="width: 250px">
|
||||||
<q-card flat bordered style="width: 250px">
|
<div class="text-h6">
|
||||||
<div class="text-h6">
|
<q-skeleton :animation="animation"/>
|
||||||
<q-skeleton :animation="animation"/>
|
</div>
|
||||||
</div>
|
<div class="col-12 text-h7 text-grey text-center">
|
||||||
<div class="col-12 text-h7 text-grey text-center">
|
{{ username }}
|
||||||
{{ username }}
|
</div>
|
||||||
</div>
|
<div class="col-12 text-h7">
|
||||||
<div class="col-12 text-h7">
|
<q-skeleton :animation="animation"/>
|
||||||
<q-skeleton :animation="animation"/>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-12 text-h8 q-mt-sm">
|
<div class="col-12 text-h8 q-mt-sm">
|
||||||
<q-skeleton :animation="animation"/>
|
<q-skeleton :animation="animation"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 text-h8 q-mt-sm">
|
<div class="col-12 text-h8 q-mt-sm">
|
||||||
<q-skeleton :animation="animation"/>
|
<q-skeleton :animation="animation"/>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<CTitleBanner
|
|
||||||
class="" title="Competenze e Talenti" bgcolor="bg-positive" clcolor="text-white"
|
|
||||||
myclass="myshad" :canopen="true">
|
|
||||||
|
|
||||||
<CSkill
|
|
||||||
:filtercustom="filtroutente"
|
|
||||||
:butt_modif_new="isMyRecord(myuser.username)"
|
|
||||||
|
|
||||||
>
|
|
||||||
|
|
||||||
</CSkill>
|
|
||||||
|
|
||||||
|
|
||||||
</CTitleBanner>
|
|
||||||
|
|
||||||
<div v-if="myuser._id">
|
|
||||||
<CTitleBanner
|
<CTitleBanner
|
||||||
class="" :title="$t('dashboard.info')" bgcolor="bg-primary" clcolor="text-white"
|
class="" title="Competenze e Talenti" bgcolor="bg-positive" clcolor="text-white"
|
||||||
myclass="myshad" :canopen="true">
|
myclass="myshad" :canopen="true">
|
||||||
|
|
||||||
<div v-if="myuser.profile" class="fit column no-wrap justify-evenly content-start">
|
<CSkill
|
||||||
|
:filtercustom="filtroutente"
|
||||||
|
:butt_modif_new="isMyRecord(myuser.username)"
|
||||||
|
|
||||||
<div class="col-6 text-h6">
|
>
|
||||||
<CDateTime
|
|
||||||
v-if="checkifShow('profile.dateofbirth') && !!myuser.profile.dateofbirth"
|
</CSkill>
|
||||||
v-model:value="myuser.profile.dateofbirth"
|
|
||||||
:label="$t('reg.dateofbirth')"
|
|
||||||
:canEdit="false">
|
</CTitleBanner>
|
||||||
</CDateTime>
|
|
||||||
|
<div v-if="myuser._id">
|
||||||
|
<CTitleBanner
|
||||||
|
class="" :title="$t('dashboard.info')" bgcolor="bg-primary" clcolor="text-white"
|
||||||
|
myclass="myshad" :canopen="true">
|
||||||
|
|
||||||
|
<div v-if="myuser.profile" class="fit column no-wrap justify-evenly content-start">
|
||||||
|
|
||||||
|
<div class="col-6 text-h6">
|
||||||
|
<CDateTime
|
||||||
|
v-if="checkifShow('profile.dateofbirth') && !!myuser.profile.dateofbirth"
|
||||||
|
v-model:value="myuser.profile.dateofbirth"
|
||||||
|
:label="$t('reg.dateofbirth')"
|
||||||
|
:canEdit="false">
|
||||||
|
</CDateTime>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</CTitleBanner>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</CTitleBanner>
|
|
||||||
</div>
|
</div>
|
||||||
|
<q-dialog
|
||||||
|
v-model="showPic"
|
||||||
|
full-height full-width
|
||||||
|
>
|
||||||
|
|
||||||
|
<img :src="getImgUser()" :alt="username" class="full-width">
|
||||||
|
|
||||||
|
</q-dialog>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<CUserNonVerif></CUserNonVerif>
|
||||||
</div>
|
</div>
|
||||||
<q-dialog
|
|
||||||
v-model="showPic"
|
|
||||||
full-height full-width
|
|
||||||
>
|
|
||||||
|
|
||||||
<img :src="getImgUser()" :alt="username" class="full-width">
|
|
||||||
|
|
||||||
</q-dialog>
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user