mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-25 01:51:37 -04:00
Add currently online choice
This commit is contained in:
@@ -437,15 +437,17 @@ export const loadProfiles = async (props: profileQueryType) => {
|
||||
last_active &&
|
||||
where(`user_activity.last_online_time >= NOW() - INTERVAL $(last_active_interval)`, {
|
||||
last_active_interval:
|
||||
last_active === 'today'
|
||||
? '1 day'
|
||||
: last_active === '3days'
|
||||
? '3 days'
|
||||
: last_active === 'week'
|
||||
? '7 days'
|
||||
: last_active === 'month'
|
||||
? '30 days'
|
||||
: '90 days',
|
||||
last_active === 'now'
|
||||
? '30 minutes'
|
||||
: last_active === 'today'
|
||||
? '1 day'
|
||||
: last_active === '3days'
|
||||
? '3 days'
|
||||
: last_active === 'week'
|
||||
? '7 days'
|
||||
: last_active === 'month'
|
||||
? '30 days'
|
||||
: '90 days',
|
||||
}),
|
||||
|
||||
// Exclude profiles that the requester has chosen to hide
|
||||
|
||||
@@ -227,6 +227,7 @@ export const GENDERS_PLURAL = {
|
||||
} as const
|
||||
|
||||
export const LAST_ONLINE_CHOICES = {
|
||||
now: 'Currently online',
|
||||
today: 'Today',
|
||||
'3days': 'Last 3 days',
|
||||
week: 'Last week',
|
||||
|
||||
Reference in New Issue
Block a user