+ Registered Users

+ UsersList Online
This commit is contained in:
Surya Paolo
2022-12-10 02:01:26 +01:00
parent aeeba5a6b9
commit cd31d2d020
18 changed files with 364 additions and 72 deletions

View File

@@ -65,6 +65,7 @@ export const tools = {
FILTER_MYFOLLOW: 2,
COOK_SEARCH: 'SEARCH_',
COOK_TAB_CIRCUIT: 'TAB_CIRC',
FRIENDS_SEARCH: 'FR_SE',
GROUP_SEARCH: 'GR_SE',
@@ -2768,6 +2769,7 @@ export const tools = {
// Metti come default
userStore.setlang($q, $router, mylang)
}
}
if (!mylang) {
@@ -3612,6 +3614,11 @@ export const tools = {
return date.addToDate(mydate, { days })
},
isUserOnline(user: IUserFields) {
const dateonline = tools.addDays(tools.getDateNow(), -1)
return user.lasttimeonline && new Date(user.lasttimeonline).getTime() > dateonline.getTime()
},
addMinutes(mydate: Date, minutes: number) {
return date.addToDate(mydate, { minutes })
},
@@ -7337,6 +7344,23 @@ export const tools = {
return ''
},
getNameToShow(user: IUserFields): string {
const userStore = useUserStore()
let name = userStore.getNameToShow(user)
return name
},
getUserNameOnlyIfToShow(user: IUserFields): string {
const userStore = useUserStore()
let name = userStore.getUserNameOnlyIfToShow(user)
return name
},
getoptionsMainCards(only: boolean) {
let myarr = []
let obj = { label: '', value: '', icon: '' }