-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: amateur radio satellite name and norad id search
- Loading branch information
1 parent
581ed56
commit a382da9
Showing
3 changed files
with
227 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import {Transponder} from '@/app/satellites/page' | ||
import {Icon} from '@iconify-icon/react' | ||
import {rubik} from '@/app/fonts' | ||
|
||
export const TransponderCard = ({ | ||
transponder, | ||
}: { | ||
transponder: Transponder | ||
}) => { | ||
return ( | ||
<div | ||
className={`w-full px-3 py-2 bg-white dark:bg-neutral-800 border dark:border-neutral-700 rounded ${rubik.className}`}> | ||
<div className={'flex flex-col gap-2'}> | ||
<div className={'flex items-center gap-0.5 text-nowrap'}> | ||
<Icon | ||
title={transponder.status} | ||
icon={transponder.status === 'active' ? 'tabler:circle-check-filled' : transponder.status === 'inactive' ? 'tabler:circle-x-filled' : 'tabler:help-circle-filled'} | ||
className={`text-xl -ml-1 ${transponder.status === 'active' ? 'text-green-500' : transponder.status === 'inactive' ? 'text-red-500' : 'text-gray-500'}`} | ||
/> | ||
<span | ||
title={transponder.mode} | ||
className={'font-medium text-ellipsis overflow-hidden'} | ||
> | ||
{transponder.mode || 'UNKNOWN MODE'} | ||
</span> | ||
</div> | ||
{transponder.callsign || transponder.beacon && ( | ||
<div className={`flex justify-between items-center flex-wrap`}> | ||
{transponder.callsign && ( | ||
<div className={'flex items-center gap-1'}> | ||
<Icon icon={'tabler:id'} className={'text-base text-primary'}/> | ||
<span title={'呼号'}>{transponder.callsign}</span> | ||
</div> | ||
)} | ||
{transponder.beacon && ( | ||
<div className={'flex items-center gap-1'}> | ||
<Icon icon={'tabler:radar-2'} className={'text-base text-primary'}/> | ||
<span title={'信标'}>{transponder.beacon}</span> | ||
</div> | ||
)} | ||
</div> | ||
)} | ||
<div className={`flex justify-between items-center flex-wrap`}> | ||
<div className={'flex items-center gap-1'}> | ||
<Icon icon={'tabler:antenna'} className={'text-base text-primary'}/> | ||
<span title={'上行频率'}>{transponder.uplink || '--'}</span> | ||
</div> | ||
<div className={'flex items-center gap-1'}> | ||
<Icon icon={'tabler:satellite'} className={'text-base text-primary'}/> | ||
<span title={'下行频率'}>{transponder.downlink || '--'}</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
.semi-table-pagination-outer { | ||
@apply px-4; | ||
} | ||
@apply px-4 flex-wrap items-center; | ||
} | ||
|
||
table { | ||
@apply text-nowrap; | ||
} |