mirror of
https://github.com/PeWu/topola-viewer.git
synced 2025-12-23 18:50:04 +00:00
Add Donatso family chart to menu
This commit is contained in:
parent
6266ca8982
commit
061bb55359
@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## 2025-01-21
|
||||
|
||||
- Added new chart type based on [github.com/donatso/family-chart](https://github.com/donatso/family-chart)
|
||||
|
||||
## 2023-08-25
|
||||
|
||||
- Added support for loading gedzip files
|
||||
|
||||
@ -577,6 +577,7 @@ export function App() {
|
||||
allowAllRelativesChart={
|
||||
sourceSpec?.source !== DataSourceEnum.WIKITREE
|
||||
}
|
||||
allowPrintAndDownload={chartType !== ChartType.Donatso}
|
||||
showingChart={
|
||||
history.location.pathname === '/view' &&
|
||||
(state === AppState.SHOWING_CHART ||
|
||||
|
||||
@ -32,6 +32,7 @@ interface Props {
|
||||
standalone: boolean;
|
||||
/** Whether to show the "All relatives" chart type in the menu. */
|
||||
allowAllRelativesChart: boolean;
|
||||
allowPrintAndDownload: boolean;
|
||||
eventHandlers: EventHandlers;
|
||||
/** Whether to show additional WikiTree menus. */
|
||||
showWikiTreeMenus: boolean;
|
||||
@ -72,6 +73,13 @@ export function TopBar(props: Props) {
|
||||
/>
|
||||
</Dropdown.Item>
|
||||
) : null}
|
||||
<Dropdown.Item onClick={() => changeView('donatso')}>
|
||||
<Icon name="users" />
|
||||
<FormattedMessage
|
||||
id="menu.donatso"
|
||||
defaultMessage="Donatso family chart"
|
||||
/>
|
||||
</Dropdown.Item>
|
||||
<Dropdown.Item onClick={() => changeView('fancy')}>
|
||||
<Icon name="users" />
|
||||
<FormattedMessage
|
||||
@ -85,7 +93,10 @@ export function TopBar(props: Props) {
|
||||
case ScreenSize.LARGE:
|
||||
return (
|
||||
<>
|
||||
<Menu.Item onClick={props.eventHandlers.onPrint}>
|
||||
<Menu.Item
|
||||
onClick={props.eventHandlers.onPrint}
|
||||
disabled={!props.allowPrintAndDownload}
|
||||
>
|
||||
<Icon name="print" />
|
||||
<FormattedMessage id="menu.print" defaultMessage="Print" />
|
||||
</Menu.Item>
|
||||
@ -101,6 +112,7 @@ export function TopBar(props: Props) {
|
||||
</div>
|
||||
}
|
||||
className="item"
|
||||
disabled={!props.allowPrintAndDownload}
|
||||
>
|
||||
<Dropdown.Menu>
|
||||
<Dropdown.Item onClick={props.eventHandlers.onDownloadPdf}>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user