Webpage Editor functionality
This commit is contained in:
@@ -29,6 +29,7 @@ import { static_data } from '@src/db/static_data'
|
||||
|
||||
|
||||
import bcrypt from 'bcryptjs'
|
||||
|
||||
import { useTodoStore } from '@store/Todos'
|
||||
import { Router } from 'vue-router'
|
||||
import { useProjectStore } from '@store/Projects'
|
||||
@@ -257,7 +258,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
// Check if is this User!
|
||||
if (this.my.username === username) return this.my
|
||||
|
||||
let trovato:any = null
|
||||
let trovato: any = null
|
||||
if (this.usersList) trovato = this.usersList.find((item: any) => item.username === username)
|
||||
|
||||
if (trovato) {
|
||||
@@ -283,7 +284,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
},
|
||||
|
||||
getImgUserByUsername(username: string): string {
|
||||
let img = this.getImgByUsername(username)
|
||||
const img = this.getImgByUsername(username)
|
||||
return img ? img : 'images/noimg-user.svg'
|
||||
},
|
||||
|
||||
@@ -309,6 +310,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
return costanti.DIR_UPLOAD + 'profile/' + userparam.username + '/' + userparam.profile.img
|
||||
}
|
||||
} catch (e) {
|
||||
//
|
||||
}
|
||||
if (!reale)
|
||||
return 'images/noimg.png'
|
||||
@@ -363,6 +365,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
if (circ.photos && circ.photos.length > 0)
|
||||
return costanti.DIR_UPLOAD + 'circuits/' + circ.path + '/' + circ.photos[0].imagefile
|
||||
} catch (e) {
|
||||
//
|
||||
}
|
||||
return 'images/noimg.png'
|
||||
},
|
||||
@@ -370,9 +373,10 @@ export const useUserStore = defineStore('UserStore', {
|
||||
getImgByGroup(group: IMyGroup): string {
|
||||
|
||||
try {
|
||||
//++Todo: Sistemare!
|
||||
// ++Todo: Sistemare!
|
||||
return costanti.DIR_UPLOAD + 'mygroups/' + group.groupname + '/' + group.photos[0].imagefile
|
||||
} catch (e) {
|
||||
//
|
||||
}
|
||||
return 'images/noimg.png'
|
||||
},
|
||||
@@ -411,7 +415,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
},
|
||||
|
||||
getNameSurnameByUsername(username: string): string {
|
||||
let user = this.getUserByUsername(username)
|
||||
const user = this.getUserByUsername(username)
|
||||
if (user) return `${user.name} ` + !!user.surname ? user.surname : ''
|
||||
return `(${username})`
|
||||
},
|
||||
@@ -420,7 +424,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
// Check if is this User!
|
||||
if (this.my._id === userId) return this.my
|
||||
|
||||
let trovato:any = null
|
||||
let trovato: any = null
|
||||
|
||||
if (this.usersList) trovato = this.usersList.find((item: any) => item._id === userId)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user