Lista Friends
This commit is contained in:
@@ -8,6 +8,10 @@ export const costanti = {
|
||||
CONFIG_ID_STATE_CONN: '2',
|
||||
CONFIG_ID_SHOW_TYPE_TODOS: '3',
|
||||
|
||||
FRIENDS: 1,
|
||||
ASK_TRUST: 2,
|
||||
TRUSTED: 3,
|
||||
|
||||
FILTER_TUTTI: -100,
|
||||
|
||||
FuncDialog: {
|
||||
|
||||
@@ -472,6 +472,7 @@ export const colTableSites = [
|
||||
AddCol({ name: 'telegram_key_test', label_trans: 'sites.telegram_key_test', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'telegram_bot_name_test', label_trans: 'sites.telegram_bot_name_test', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'pathreg_add', label_trans: 'sites.pathreg_add', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'ask_to_verify_reg', label_trans: 'sites.ask_to_verify_reg', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'who', label_trans: 'sites.who', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'status', label_trans: 'sites.status', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'note', label_trans: 'sites.note', fieldtype: costanti.FieldType.string }),
|
||||
|
||||
@@ -35,6 +35,8 @@ import { useTodoStore } from '@store/Todos'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useCalendarStore } from '@store/CalendarStore'
|
||||
import { Router } from 'vue-router'
|
||||
import { AxiosResponse, default as Axios } from 'axios'
|
||||
import { PayloadMessageTypes } from '@/common'
|
||||
|
||||
export interface INotify {
|
||||
color?: string | 'primary'
|
||||
@@ -4305,9 +4307,6 @@ export const tools = {
|
||||
if (cosa === 'email') {
|
||||
// console.log("EMAIL " + item.isUnique);
|
||||
// console.log(item);
|
||||
if (item.registeredemail.$invalid) {
|
||||
return t('reg.err.duplicate_email')
|
||||
}
|
||||
} else if (cosa === 'username') {
|
||||
if (item.registereduser.$invalid) {
|
||||
return t('reg.err.duplicate_username')
|
||||
@@ -4370,6 +4369,28 @@ export const tools = {
|
||||
return thePath.substring(thePath.lastIndexOf('/') + 1)
|
||||
},
|
||||
|
||||
async registeredemail(email: string) {
|
||||
|
||||
const VALIDATE_USER_URL = process.env.MONGODB_HOST + '/email/ck'
|
||||
|
||||
let onSuccess = (res: AxiosResponse) => {
|
||||
return res.status !== PayloadMessageTypes.statusfound
|
||||
}
|
||||
|
||||
return Axios.post(VALIDATE_USER_URL, {idapp: process.env.APP_ID, email, key: process.env.PAO_APP_ID})
|
||||
.then(onSuccess)
|
||||
.catch((err) => {
|
||||
return true
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
isEmail(email: string) {
|
||||
const res = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
||||
return res.test(String(email).toLowerCase())
|
||||
},
|
||||
|
||||
|
||||
// getLocale() {
|
||||
// if (navigator.languages && navigator.languages.length > 0) {
|
||||
// return navigator.languages[0]
|
||||
|
||||
@@ -828,6 +828,16 @@ export const useUserStore = defineStore('UserStore', {
|
||||
return {}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
async loadFriends(username: string) {
|
||||
return Api.SendReq('/users/friends', 'POST', null)
|
||||
.then((res) => {
|
||||
return res.data
|
||||
}).catch((error) => {
|
||||
return {}
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user