From 061bb553596dcbb45bde5a273c7fa86af1db2c44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemek=20Wi=C4=99ch?= Date: Tue, 21 Jan 2025 22:53:36 +0100 Subject: [PATCH] Add Donatso family chart to menu --- CHANGELOG.md | 4 ++++ src/app.tsx | 1 + src/menu/top_bar.tsx | 14 +++++++++++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ade89e5..9d79c04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/app.tsx b/src/app.tsx index 80aff74..314ff5c 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -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 || diff --git a/src/menu/top_bar.tsx b/src/menu/top_bar.tsx index 1a512b5..526e1f3 100644 --- a/src/menu/top_bar.tsx +++ b/src/menu/top_bar.tsx @@ -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) { /> ) : null} + changeView('donatso')}> + + + changeView('fancy')}> - + @@ -101,6 +112,7 @@ export function TopBar(props: Props) { } className="item" + disabled={!props.allowPrintAndDownload} >