diff --git a/web/components/profile-about.tsx b/web/components/profile-about.tsx
index f5b836b..1af4b69 100644
--- a/web/components/profile-about.tsx
+++ b/web/components/profile-about.tsx
@@ -292,7 +292,7 @@ function LastOnline(props: { lastOnlineTime?: string }) {
return (
}
- text={'Last online ' + fromNow(lastOnlineTime)}
+ text={'Last online ' + fromNow(lastOnlineTime, true)}
/>
)
}
diff --git a/web/components/profile/profile-header.tsx b/web/components/profile/profile-header.tsx
index 4bce785..8000d9a 100644
--- a/web/components/profile/profile-header.tsx
+++ b/web/components/profile/profile-header.tsx
@@ -9,7 +9,6 @@ import {Col} from 'web/components/layout/col'
import {Row} from 'web/components/layout/row'
import {SendMessageButton} from 'web/components/messaging/send-message-button'
import ProfilePrimaryInfo from './profile-primary-info'
-import {OnlineIcon} from '../online-icon'
import {track} from 'web/lib/service/analytics'
import DropdownMenu from 'web/components/comments/dropdown-menu'
import {ShareProfileButton} from '../widgets/share-profile-button'
@@ -58,7 +57,7 @@ export default function ProfileHeader(props: {
{currentUser && isCurrentUser && disabled &&
You disabled your profile, so no one else can access it.
}
- {!isCurrentUser && }
+ {/*{!isCurrentUser && }*/}
{simpleView ? (
diff --git a/web/lib/util/time.ts b/web/lib/util/time.ts
index 1b91628..3938512 100644
--- a/web/lib/util/time.ts
+++ b/web/lib/util/time.ts
@@ -3,8 +3,12 @@ import relativeTime from 'dayjs/plugin/relativeTime'
dayjs.extend(relativeTime)
-export function fromNow(time: number | string | Date) {
- return dayjs(time).fromNow()
+export function fromNow(time: number | string | Date, privacy: boolean = false) {
+ const date = dayjs(time);
+ if (privacy && dayjs().diff(date, 'hour') < 24) {
+ return 'in the past day';
+ }
+ return date.fromNow();
}
const FORMATTER = new Intl.DateTimeFormat('default', {