Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/viewer/app/i18n/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ export const RU: Record<string, string> = {
Income: 'Доход',
'Estimated annual income': 'Ожидаемый годовой доход',
'Per month, on average': 'В месяц, в среднем',
'Upcoming dividends': 'Ближайшие дивы',
'Ex-dividend dates until': 'Экс-даты до',
'to buy so every listed dividend reinvests': 'докупить, чтобы реинвестировались все выплаты из списка',
'Near its 52-week high': 'Около 52-недельного максимума',
Expand Down Expand Up @@ -737,7 +736,6 @@ export const RU: Record<string, string> = {
'Past': 'Прошлые',
'Upcoming': 'Будущие',
'Dividends since': 'Дивы с',
'Past dividends': 'Прошлые дивы',
'Dividends and interest paid into the shown accounts since the 1st of the month, from the transactions history': 'Дивиденды и проценты, пришедшие на показанные счета с 1-го числа месяца, по истории операций',
'Dividends and interest paid into the shown accounts since the quarter began, from the transactions history': 'Дивиденды и проценты, пришедшие на показанные счета с начала квартала, по истории операций',
'Dividends and interest paid into the shown accounts since January 1, from the transactions history': 'Дивиденды и проценты, пришедшие на показанные счета с 1 января, по истории операций',
Expand Down
14 changes: 9 additions & 5 deletions src/viewer/ui/Summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,8 @@ export const Summary = memo(function Summary({ ds, accounts, title, titleHint, t
// left, the order chips on the right (owner 2026-12-01: "intervals move below"); the unit $ or % is the % $ switch by ⤢
const divOrder = (className: string) => (
<div className={`flex flex-wrap items-center justify-between gap-2 ${className}`} data-div-order>
{/* Upcoming or Past (owner 2026-12-02), then how far: ahead DTM 1M DTQ 1Q, back MTD 1M QTD 1Q; each side keeps its own */}
{/* how far: ahead DTM 1M DTQ 1Q, back MTD 1M QTD 1Q; each side keeps its own (Upcoming or Past is by the title) */}
<div className="flex flex-wrap items-center gap-2" data-div-when>
<Pills items={DIV_WHEN} value={pr.dividendsWhen} label={t('Upcoming or past dividends')} labelOf={(w) => (w === 'past' ? t('Past') : t('Upcoming'))}
onChange={(w) => animate(() => setPrefs({ dividendsWhen: w }))} />
{past
? <Pills items={PAST_WINDOWS} value={pr.dividendsPastWindow} label={t('Dividends since')} labelOf={(w) => w} onChange={(w) => animate(() => setPrefs({ dividendsPastWindow: w }))} />
: <Pills items={DIV_WINDOWS} value={pr.dividendsWindow} label={t('Ex-dividend dates until')} labelOf={(w) => w} onChange={(w) => animate(() => setPrefs({ dividendsWindow: w }))} />}
Expand Down Expand Up @@ -201,8 +199,14 @@ export const Summary = memo(function Summary({ ds, accounts, title, titleHint, t

{/* like Movers (owner 2026-12-01: "this is inconsistent"): ETFs Stocks in the middle, the % $ switch of the Dividends
order chip by ⤢, how far ahead on the line below (MTD by default) */}
<Card id="dividends" pulse={past ? markTx(pastRows.map((r) => [r.u.symbol, r.u.payout, r.due])) : mark(divs.map((p) => [p.symbol, p.payout, p.exDate]))} title={past ? t('Past dividends') : t('Upcoming dividends')}
lead={<HeadGroup place="middle" name="div-of"><KindFilter value={pr.dividendsOf} label={t('Ex-dividend dates of')} onChange={(v) => animate(() => setPrefs({ dividendsOf: v }))} /></HeadGroup>}
<Card id="dividends" pulse={past ? markTx(pastRows.map((r) => [r.u.symbol, r.u.payout, r.due])) : mark(divs.map((p) => [p.symbol, p.payout, p.exDate]))} title={t('Dividends')}
lead={<>
{/* Upcoming or Past right after the title (owner 2026-12-02; 2026-12-03: "upcomming / past is wrongly
implemented", "use Dividends and then put this Upcommin / past option"): the title stays one word */}
<Pills items={DIV_WHEN} value={pr.dividendsWhen} label={t('Upcoming or past dividends')} labelOf={(w) => (w === 'past' ? t('Past') : t('Upcoming'))}
onChange={(w) => animate(() => setPrefs({ dividendsWhen: w }))} />
<HeadGroup place="middle" name="div-of"><KindFilter value={pr.dividendsOf} label={t('Ex-dividend dates of')} onChange={(v) => animate(() => setPrefs({ dividendsOf: v }))} /></HeadGroup>
</>}
tools={<Toggle value={divSize === 'yield' ? 'pct' : 'usd'} label={t('Dividends in')} a={{ value: 'pct', text: '%', title: t('Dividends in %') }} b={{ value: 'usd', text: '$', title: t('Dividends in $') }}
onChange={(v) => animate(() => { const k = v === 'pct' ? 'yield' : 'payout'; const p = prefs.get(); setPrefs({ dividendsSize: k, dividendsSort: setDivSize(p.dividendsSort, k) }); })} />}
bigTools={divOrder('')}
Expand Down