mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 14:16:39 +01:00
Show last status timestamp if not being followed
This commit is contained in:
parent
56fb2a9f2b
commit
51bc920ada
2 changed files with 10 additions and 2 deletions
|
@ -153,6 +153,7 @@
|
|||
gap: 8px;
|
||||
justify-content: space-between;
|
||||
min-height: 2.5em;
|
||||
align-items: center;
|
||||
}
|
||||
.account-container .actions button {
|
||||
align-self: flex-end;
|
||||
|
|
|
@ -2,6 +2,7 @@ import './account-info.css';
|
|||
|
||||
import { useEffect, useRef, useState } from 'preact/hooks';
|
||||
|
||||
import RelativeTime from '../components/relative-time';
|
||||
import { api } from '../utils/api';
|
||||
import emojifyText from '../utils/emojify-text';
|
||||
import enhanceContent from '../utils/enhance-content';
|
||||
|
@ -359,7 +360,7 @@ function RelatedActions({ info, instance, authenticated }) {
|
|||
const [relationship, setRelationship] = useState(null);
|
||||
const [familiarFollowers, setFamiliarFollowers] = useState([]);
|
||||
|
||||
const { id, locked } = info;
|
||||
const { id, locked, lastStatusAt } = info;
|
||||
const accountID = useRef(id);
|
||||
|
||||
const {
|
||||
|
@ -473,7 +474,13 @@ function RelatedActions({ info, instance, authenticated }) {
|
|||
</p>
|
||||
)}
|
||||
<p class="actions">
|
||||
{followedBy ? <span class="tag">Following you</span> : <span />}{' '}
|
||||
{followedBy ? (
|
||||
<span class="tag">Following you</span>
|
||||
) : (
|
||||
<span class="insignificant">
|
||||
Last status: <RelativeTime datetime={lastStatusAt} format="micro" />
|
||||
</span>
|
||||
)}{' '}
|
||||
{relationshipUIState !== 'loading' && relationship && (
|
||||
<button
|
||||
type="button"
|
||||
|
|
Loading…
Reference in a new issue