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,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div v-if="tools.isUserOk()">
|
||||||
<div v-if="finder" class="q-gutter-sm q-pa-sm q-pb-sm">
|
<div v-if="finder" class="q-gutter-sm q-pa-sm q-pb-sm">
|
||||||
<q-btn-toggle
|
<q-btn-toggle
|
||||||
:model-value="modelValue"
|
:model-value="modelValue"
|
||||||
@@ -44,6 +45,10 @@
|
|||||||
</span>
|
</span>
|
||||||
</q-list>
|
</q-list>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<CUserNonVerif></CUserNonVerif>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" src="./CMyFriends.ts">
|
<script lang="ts" src="./CMyFriends.ts">
|
||||||
|
|||||||
@@ -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,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div v-if="tools.isUserOk()">
|
||||||
<div v-if="finder" class="q-gutter-sm q-pa-sm q-pb-sm">
|
<div v-if="finder" class="q-gutter-sm q-pa-sm q-pb-sm">
|
||||||
<q-btn-toggle
|
<q-btn-toggle
|
||||||
:model-value="modelValue"
|
:model-value="modelValue"
|
||||||
@@ -39,6 +40,10 @@
|
|||||||
</span>
|
</span>
|
||||||
</q-list>
|
</q-list>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<CUserNonVerif></CUserNonVerif>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" src="./CMyGroups.ts">
|
<script lang="ts" src="./CMyGroups.ts">
|
||||||
|
|||||||
@@ -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,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div v-if="tools.isUserOk()">
|
||||||
<div class="q-gutter-sm q-pa-sm q-pb-md">
|
<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 v-if="myuser.date_reg" class="fit column no-wrap justify-evenly items-center content-start">
|
||||||
|
|
||||||
@@ -34,16 +35,42 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="!isMyRecord(myuser.username)">
|
<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
|
<q-btn
|
||||||
v-if="!userStore.IsMyFriendByUsername(myuser.username) && !userStore.IsAskedFriendByUsername(myuser.username)"
|
v-if="!userStore.IsMyFriendByUsername(myuser.username) && !userStore.IsAskedFriendByUsername(myuser.username)"
|
||||||
icon="fas fa-user-plus"
|
icon="fas fa-user-plus"
|
||||||
color="primary" :label="$t('friends.ask_friend')"
|
color="primary" :label="$t('friends.ask_friend')"
|
||||||
@click="tools.setRequestFriendship($q, userStore.my.username, myuser.username, true)"
|
@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
|
<q-btn
|
||||||
v-if="userStore.IsAskedFriendByUsername(myuser.username) && !userStore.IsMyFriendByUsername(myuser.username)"
|
v-if="userStore.IsAskedFriendByUsername(myuser.username) && !userStore.IsMyFriendByUsername(myuser.username)"
|
||||||
icon="fas fa-user-minus"
|
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)"
|
@click="tools.cancelReqFriends($q, userStore.my.username, myuser.username)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@@ -82,7 +109,8 @@
|
|||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</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>
|
</CCopyBtn>
|
||||||
|
|
||||||
@@ -157,6 +185,10 @@
|
|||||||
<img :src="getImgUser()" :alt="username" class="full-width">
|
<img :src="getImgUser()" :alt="username" class="full-width">
|
||||||
|
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<CUserNonVerif></CUserNonVerif>
|
||||||
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user