Skip to content

Commit

Permalink
fix: instance key updatedAt display.
Browse files Browse the repository at this point in the history
- perf some badge border radius.
  • Loading branch information
riccox committed Jun 21, 2023
1 parent dc171e9 commit 833b7f6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
14 changes: 7 additions & 7 deletions src/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,22 +93,22 @@ export const Header: FC<Props> = ({ client }) => {
<IconHomeBolt size={26} />
<p>Home</p>
</button>
<p className={`text-2xl font-bold`}>{_.truncate(currentInstance?.name, { length: 20 })}</p>
<p className={`text-2xl font-bold`}>{_.truncate(currentInstance?.name, { length: 16 })}</p>
<p className={`text-2xl font-bold text-bw-800/50`}>#{currentInstance.id}</p>
<span className={`!cursor-pointer hover:underline badge outline lg success`} onClick={onClickHost}>
<span className={`!cursor-pointer hover:underline badge outline cornered lg success`} onClick={onClickHost}>
Host: {_.truncate(currentInstance?.host, { length: 40 })}
</span>
<p className={`font-bold `}>Last Updated: {getTimeText(stats?.lastUpdate)}</p>
<span className={`badge outline lg primary`}>
Database Size: {_.ceil((stats?.databaseSize ?? 0) / 1048576, 2)} MB
<p className={`font-bold `}>Updated: {getTimeText(stats?.lastUpdate)}</p>
<span className={`badge outline cornered lg primary`}>
DB Size: {_.ceil((stats?.databaseSize ?? 0) / 1048576, 2)} MB
</span>
<span className={`badge light lg ${health ? 'success' : 'warn'}`}>
<span className={`badge light cornered lg ${health ? 'success' : 'warn'}`}>
Status: {health ? 'Available' : 'Unknown'}
</span>

<HoverCard withinPortal shadow="lg" radius={'lg'} transitionProps={{ transition: 'fade' }}>
<HoverCard.Target>
<span className={`badge outline lg primary`}>Meili Version: {version?.pkgVersion}</span>
<span className={`badge outline cornered lg primary`}>Meili Version: {version?.pkgVersion}</span>
</HoverCard.Target>
<HoverCard.Dropdown>
Commit Date: {version?.commitDate} <br />
Expand Down
8 changes: 5 additions & 3 deletions src/pages/key/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function Keys() {
<td>
<div className={`flex gap-1 flex-wrap`}>
{t.indexes.map((index) => (
<span className="badge secondary light" key={index}>
<span className="badge secondary light cornered" key={index}>
{index}
</span>
))}
Expand All @@ -144,14 +144,16 @@ function Keys() {
<td>
<div className={`flex gap-1 flex-wrap`}>
{t.actions.map((action) => (
<span className="badge secondary light" key={action}>
<span className="badge secondary light cornered" key={action}>
{action}
</span>
))}
</div>
</td>
<td>{getTimeText(t.createdAt)}</td>
<td>{getTimeText(t.updateAt)}</td>
{/* meilisearch package type typos */}
{/* @ts-ignore */}
<td>{getTimeText(t.updatedAt)}</td>
<td>{getTimeText(t.expiresAt, { defaultText: 'Forever' })}</td>
<td>
<div className={`flex gap-1`}>
Expand Down

0 comments on commit 833b7f6

Please sign in to comment.