mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
Online/Offline for time
This commit is contained in:
@@ -1160,6 +1160,8 @@ import gameLogService from './service/gamelog.js'
|
|||||||
// VRCX
|
// VRCX
|
||||||
$location: {},
|
$location: {},
|
||||||
$location_at: Date.now(),
|
$location_at: Date.now(),
|
||||||
|
$online_for: Date.now(),
|
||||||
|
$offline_for: '',
|
||||||
$isVRCPlus: false,
|
$isVRCPlus: false,
|
||||||
$isModerator: false,
|
$isModerator: false,
|
||||||
$isTroll: false,
|
$isTroll: false,
|
||||||
@@ -4060,7 +4062,24 @@ import gameLogService from './service/gamelog.js'
|
|||||||
this.friendsGroup3_.push(ctx);
|
this.friendsGroup3_.push(ctx);
|
||||||
this.friendsGroupD_.unshift(ctx);
|
this.friendsGroupD_.unshift(ctx);
|
||||||
}
|
}
|
||||||
|
if (ctx.ref !== undefined) {
|
||||||
|
console.log(ctx.name + ' ' + ctx.state + ' ref: ' + ctx.ref.state);
|
||||||
|
if ((ctx.ref.$offline_for == '') &&
|
||||||
|
((ctx.state == 'offline') && ctx.ref.state == '') ||
|
||||||
|
(((ctx.state == 'offline') || (ctx.state == 'active')) &&
|
||||||
|
((ctx.ref.state != 'offline') && (ctx.ref.state != 'active') && (ctx.ref.state != '')))) {
|
||||||
|
ctx.ref.$online_for = '';
|
||||||
|
ctx.ref.$offline_for = Date.now();
|
||||||
|
console.log('^update offline^');
|
||||||
|
}
|
||||||
|
if ((ctx.ref.$online_for == '') && (ctx.state == 'online')) {
|
||||||
|
ctx.ref.$online_for = Date.now();
|
||||||
|
ctx.ref.$offline_for = '';
|
||||||
|
console.log('^update online^');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// ascending
|
// ascending
|
||||||
|
|||||||
@@ -767,6 +767,14 @@ html
|
|||||||
span.name Avatar Copying
|
span.name Avatar Copying
|
||||||
span.extra(v-if="userDialog.ref.allowAvatarCopying" style="color:#67C23A") Allow
|
span.extra(v-if="userDialog.ref.allowAvatarCopying" style="color:#67C23A") Allow
|
||||||
span.extra(v-else style="color:#F56C6C") Deny
|
span.extra(v-else style="color:#F56C6C") Deny
|
||||||
|
.x-friend-item
|
||||||
|
.detail
|
||||||
|
span.name(v-if="userDialog.ref.state != 'offline' && userDialog.ref.state != 'active' && userDialog.ref.state != ''") Online For
|
||||||
|
span.name(v-else) Offline For
|
||||||
|
span.extra
|
||||||
|
timer(v-if="userDialog.ref.state != 'offline' && userDialog.ref.state != 'active' && userDialog.ref.state != ''" :epoch="userDialog.ref.$online_for")
|
||||||
|
timer(v-else-if="userDialog.ref.$offline_for" :epoch="userDialog.ref.$offline_for")
|
||||||
|
span(v-else) -
|
||||||
.x-friend-item
|
.x-friend-item
|
||||||
.detail
|
.detail
|
||||||
span.name Last Login
|
span.name Last Login
|
||||||
|
|||||||
Reference in New Issue
Block a user