style(dxped): one Watch button for both feeds
The news pane had clickable callsign chips while an announcement had a Watch button — two gestures for one act. The chips become plain labels (they still show which calls are already watched) and the news card gets the announcement's own Watch button and Open link.
This commit is contained in:
+2
-2
@@ -9,7 +9,7 @@
|
||||
"LoTW: TQSL no longer refuses non-US stations over MY_CNTY — the field is stripped before signing unless it is the US “XX,County” shape LoTW actually validates (a Canadian “ONTARIO,Kawartha” was rejecting the whole record). Exports also stop gluing a full state name onto the county.",
|
||||
"DX Cluster: two new chase switches — Chase US counties and Chase new prefixes — and unchecking Chase new grids now also withdraws the NEW GRID badge. Each switch removes its badge from the spots AND its chip from the status filters, like Chase POTA always did.",
|
||||
"Confirmations: a HamQTH row — sent only, defaulting to R (to upload), since HamQTH publishes no confirmations to receive. Setting such a default no longer disables the auto-upload it was meant to arm (it also affected HAMLOG.online).",
|
||||
"New DXpeditions tab (Tools): the announced operations from NG3K’s ADXO next to the DX-World news feed. Every announcement is judged against YOUR log and carries one badge — NEW DXCC, NEW BAND, NEW SLOT… — with an “only what I need” filter, and one click adds its callsigns to the watchlist. Callsigns are mined out of the news headlines too, so they can be watched the same way.",
|
||||
"New DXpeditions tab (Tools): the announced operations from NG3K’s ADXO next to the DX-World news feed. Every announcement is judged against YOUR log and carries one badge — NEW DXCC, NEW BAND, NEW SLOT… — with an “only what I need” filter, and one click adds its callsigns to the watchlist. The news headlines carry the same Watch button, over the callsigns mined out of their titles.",
|
||||
"Watchlist: adding or removing a callsign now raises the same kind of notification as a new version, instead of a message inside the watchlist page — a call can be added from the cluster or the DXpeditions tab, where that message was never seen."
|
||||
],
|
||||
"fr": [
|
||||
@@ -19,7 +19,7 @@
|
||||
"LoTW : TQSL ne refuse plus les stations hors US à cause de MY_CNTY — le champ est retiré avant signature sauf s’il a la forme US « XX,County » que LoTW valide réellement (un « ONTARIO,Kawartha » canadien rejetait tout l’enregistrement). L’export cesse aussi de coller un nom d’état complet devant le comté.",
|
||||
"DX Cluster : deux nouvelles cases — Chasser les comtés US et Chasser les nouveaux préfixes — et décocher Chasser les nouveaux locators retire désormais aussi le badge NEW GRID. Chaque case enlève son badge des spots ET sa puce des filtres de statut, comme Chase POTA le faisait déjà.",
|
||||
"Confirmations : une ligne HamQTH — envoi seulement, à R (à envoyer) par défaut, HamQTH ne publiant aucune confirmation à recevoir. Définir un tel défaut ne désactive plus l’upload automatique qu’il était censé armer (cela touchait aussi HAMLOG.online).",
|
||||
"Nouvel onglet DXpéditions (Outils) : les opérations annoncées par l’ADXO de NG3K à côté du fil d’actualités DX-World. Chaque annonce est jugée sur VOTRE log et porte un badge — NOUVEAU DXCC, NOUVELLE BANDE, NOUVEAU SLOT… — avec un filtre « seulement ce qu’il me manque », et un clic ajoute ses indicatifs à la watchlist. Les indicatifs sont aussi extraits des titres d’actualités pour être surveillés de la même façon.",
|
||||
"Nouvel onglet DXpéditions (Outils) : les opérations annoncées par l’ADXO de NG3K à côté du fil d’actualités DX-World. Chaque annonce est jugée sur VOTRE log et porte un badge — NOUVEAU DXCC, NOUVELLE BANDE, NOUVEAU SLOT… — avec un filtre « seulement ce qu’il me manque », et un clic ajoute ses indicatifs à la watchlist. Les actualités portent le même bouton Surveiller, sur les indicatifs extraits de leurs titres.",
|
||||
"Watchlist : ajouter ou retirer un indicatif déclenche désormais une notification du même type que celle des nouvelles versions, au lieu d’un message dans la page watchlist — un indicatif peut être ajouté depuis le cluster ou l’onglet DXpéditions, où ce message n’était jamais vu."
|
||||
]
|
||||
},
|
||||
|
||||
@@ -178,7 +178,10 @@ export function DXpeditionsPanel() {
|
||||
{news.length === 0 && !busy && (
|
||||
<p className="text-xs text-muted-foreground text-center py-6">{t('dxp.noNews')}</p>
|
||||
)}
|
||||
{news.map((n, i) => (
|
||||
{news.map((n, i) => {
|
||||
const newsCalls = n.calls ?? [];
|
||||
const newsAllWatched = newsCalls.length > 0 && newsCalls.every((c) => watched.has(c.toUpperCase()));
|
||||
return (
|
||||
<article key={`${n.link}-${i}`} className="rounded-md border border-border bg-muted/20 p-2">
|
||||
<div className="flex items-start gap-2">
|
||||
{n.image_url && (
|
||||
@@ -194,6 +197,9 @@ export function DXpeditionsPanel() {
|
||||
className="text-xs font-medium text-left hover:underline">{n.title}</button>
|
||||
</div>
|
||||
<p className="mt-0.5 text-[11px] text-muted-foreground line-clamp-3">{n.excerpt}</p>
|
||||
{/* The callsigns are shown, not clicked: watching is the same
|
||||
one button as an announcement, so the gesture is learned
|
||||
once for the whole tab. */}
|
||||
<div className="mt-1 flex items-center gap-1.5 flex-wrap">
|
||||
{n.pub_date && (
|
||||
<span className="text-[10px] text-muted-foreground">
|
||||
@@ -201,22 +207,32 @@ export function DXpeditionsPanel() {
|
||||
</span>
|
||||
)}
|
||||
{(n.calls ?? []).map((c) => (
|
||||
<button key={c} type="button"
|
||||
disabled={watched.has(c.toUpperCase())}
|
||||
onClick={() => addAll([c])}
|
||||
title={watched.has(c.toUpperCase()) ? t('dxp.watched') : t('dxp.watchTip')}
|
||||
className={cn('px-1 py-px rounded font-mono text-[10px] border',
|
||||
watched.has(c.toUpperCase())
|
||||
? 'border-warning/50 text-warning'
|
||||
: 'border-border text-info hover:bg-muted')}>
|
||||
<span key={c} className={cn('font-mono text-[10px]',
|
||||
watched.has(c.toUpperCase()) ? 'text-warning' : 'text-info')}>
|
||||
{c}
|
||||
</button>
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
<div className="mt-1.5 flex items-center gap-2">
|
||||
<Button variant={newsAllWatched ? 'ghost' : 'outline'} size="sm" className="h-6 text-[11px]"
|
||||
disabled={newsCalls.length === 0 || newsAllWatched}
|
||||
onClick={() => addAll(newsCalls)}
|
||||
title={t('dxp.watchTip')}>
|
||||
<Star className={cn('size-3', newsAllWatched && 'fill-current text-warning')} />
|
||||
{newsAllWatched ? t('dxp.watched') : t('dxp.watch')}
|
||||
</Button>
|
||||
{n.link && (
|
||||
<button type="button" onClick={() => BrowserOpenURL(n.link)}
|
||||
className="text-[11px] text-muted-foreground hover:text-foreground inline-flex items-center gap-1">
|
||||
<ExternalLink className="size-3" /> {t('dxp.open')}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
))}
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user