feat(web): show the space validity period in the top bar
This commit is contained in:
1 parent
6d6490055e
commit
915992776d
1 file changed
+2
@@ -1,3 +1,4 @@
|
||||
import { formatRemaining } from '@/lib/format';
|
||||
import { useWorkspace } from '@/store/workspace';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
@@ -34,6 +35,7 @@ export function TopBar({ onBack, onOpenPanel, onOpenSettings, onOpenMembers, onI
|
||||
<span className={styles.name}>{channel?.name || `${channel?.id.slice(0, 8)}…`}</span>
|
||||
{channel?.name ? <span className={styles.idSuffix}>{channel.id.slice(0, 8)}…</span> : null}
|
||||
{channel?.creatorAccount ? <span className={styles.idSuffix}>创建者 {channel.creatorAccount}</span> : null}
|
||||
{channel?.expiresAt ? <span className={styles.idSuffix} title={`到期时间 ${new Date(channel.expiresAt).toLocaleString('zh-CN', { hour12: false })}。空间有新内容时会自动顺延`}>{formatRemaining(channel.expiresAt).replace(/^剩 /, '有效期 ')}</span> : null}
|
||||
{raw ? (
|
||||
<span className={styles.badgeWarn}>明文 · 服务端可见</span>
|
||||
) : (
|
||||
|
||||
Reference in new issue
Block a user