++ diffusori
fixed user chip
This commit is contained in:
@@ -304,16 +304,20 @@ export const useUserStore = defineStore('UserStore', {
|
||||
return img ? img : 'images/noimg-user.svg'
|
||||
},
|
||||
|
||||
getImgByProfile(userparam: IUserFields, reale: any = false): string {
|
||||
getImgByProfile(userparam: any, reale: any = false, col: any = null): string {
|
||||
try {
|
||||
if (userparam.profile && userparam.profile.img) {
|
||||
return costanti.DIR_UPLOAD + 'profile/' + userparam.username + '/' + userparam.profile.img
|
||||
let myrec = this.getRecByCol(userparam, col)
|
||||
|
||||
if (myrec.profile && myrec.profile.img) {
|
||||
return costanti.DIR_UPLOAD + 'profile/' + myrec.username + '/' + myrec.profile.img
|
||||
} else {
|
||||
return 'images/noimg-user.svg'
|
||||
}
|
||||
} catch (e) {
|
||||
//
|
||||
}
|
||||
if (!reale)
|
||||
return 'images/noimg.png'
|
||||
return 'images/noimg-user.svg'
|
||||
else
|
||||
return ''
|
||||
},
|
||||
@@ -426,24 +430,40 @@ export const useUserStore = defineStore('UserStore', {
|
||||
return `(${username})`
|
||||
},
|
||||
|
||||
getNameToShow(user: IUserFields): string {
|
||||
getRecByCol(user: any, col: any = null) {
|
||||
let myrec = user
|
||||
if (col && col.field === 'userto')
|
||||
myrec = user.userto
|
||||
if (col && col.field === 'userfrom')
|
||||
myrec = user.userfrom
|
||||
|
||||
return myrec
|
||||
},
|
||||
|
||||
getNameToShow(user: any, col: any = null): string {
|
||||
let name = ''
|
||||
if (!!user.name)
|
||||
name = user.name
|
||||
if (!!user.surname)
|
||||
name += ' ' + user.surname
|
||||
let myrec = this.getRecByCol(user, col)
|
||||
|
||||
if (!!myrec.name)
|
||||
name = myrec.name
|
||||
if (!!myrec.surname)
|
||||
name += ' ' + myrec.surname
|
||||
|
||||
if (!name) {
|
||||
name = user.username
|
||||
name = myrec.username
|
||||
}
|
||||
if (col && col.field === 'extrarec' && !name) {
|
||||
name = myrec.dest
|
||||
}
|
||||
|
||||
return name
|
||||
},
|
||||
|
||||
getUserNameOnlyIfToShow(user: IUserFields): string {
|
||||
getUserNameOnlyIfToShow(user: any, col: any = null): string {
|
||||
let myrec = this.getRecByCol(user, col)
|
||||
|
||||
if (user.name || user.surname) {
|
||||
return user.username
|
||||
if (myrec.name || myrec.surname) {
|
||||
return myrec.username
|
||||
}
|
||||
|
||||
return ''
|
||||
@@ -1281,7 +1301,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
tools.showPositiveNotif($q, msgok)
|
||||
if (mydata.cmd === shared_consts.MsgTeleg.SHARE_MSGREG) {
|
||||
if (!tools.isTelegOk()) {
|
||||
// console.log('text', res.data.text)
|
||||
// console.log('text', res.data.text)
|
||||
tools.copyStringToClipboardSilent(res.data.text)
|
||||
}
|
||||
if (res.data.textsent) {
|
||||
|
||||
Reference in New Issue
Block a user