mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 22:26:57 +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;
|
gap: 8px;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
min-height: 2.5em;
|
min-height: 2.5em;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
.account-container .actions button {
|
.account-container .actions button {
|
||||||
align-self: flex-end;
|
align-self: flex-end;
|
||||||
|
|
|
@ -2,6 +2,7 @@ import './account-info.css';
|
||||||
|
|
||||||
import { useEffect, useRef, useState } from 'preact/hooks';
|
import { useEffect, useRef, useState } from 'preact/hooks';
|
||||||
|
|
||||||
|
import RelativeTime from '../components/relative-time';
|
||||||
import { api } from '../utils/api';
|
import { api } from '../utils/api';
|
||||||
import emojifyText from '../utils/emojify-text';
|
import emojifyText from '../utils/emojify-text';
|
||||||
import enhanceContent from '../utils/enhance-content';
|
import enhanceContent from '../utils/enhance-content';
|
||||||
|
@ -359,7 +360,7 @@ function RelatedActions({ info, instance, authenticated }) {
|
||||||
const [relationship, setRelationship] = useState(null);
|
const [relationship, setRelationship] = useState(null);
|
||||||
const [familiarFollowers, setFamiliarFollowers] = useState([]);
|
const [familiarFollowers, setFamiliarFollowers] = useState([]);
|
||||||
|
|
||||||
const { id, locked } = info;
|
const { id, locked, lastStatusAt } = info;
|
||||||
const accountID = useRef(id);
|
const accountID = useRef(id);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
@ -473,7 +474,13 @@ function RelatedActions({ info, instance, authenticated }) {
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
<p class="actions">
|
<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 && (
|
{relationshipUIState !== 'loading' && relationship && (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
|
Loading…
Reference in a new issue