From 4956e26af9c255b31a525780d03adeb7613b8ca5 Mon Sep 17 00:00:00 2001 From: marlon-erler Date: Mon, 12 Oct 2026 22:51:11 +0200 Subject: [PATCH] implement legal dialog in english --- src/View/Modals/legalModal.tsx | 87 +++++++++++++++++++++++++++ src/View/homePage.tsx | 8 +++ src/View/translations.ts | 21 +++++++ src/ViewModel/Global/coreViewModel.ts | 8 +++ src/ViewModel/Pages/homeViewModel.ts | 12 ++++ src/index.tsx | 7 ++- 6 files changed, 141 insertions(+), 2 deletions(-) create mode 100644 src/View/Modals/legalModal.tsx diff --git a/src/View/Modals/legalModal.tsx b/src/View/Modals/legalModal.tsx new file mode 100644 index 00000000..81fd2b3f --- /dev/null +++ b/src/View/Modals/legalModal.tsx @@ -0,0 +1,87 @@ +import { SplitModal } from "./splitModal"; +import { languageNames } from "../translations"; +import { CommonKeys, getKeySymbol } from "../keystrokes"; +import { PlaceholderView } from "../Components/placeholderView"; +import { OptionButtonList } from "../Components/optionButtonList"; +import { NavigationButton } from "../Components/navigationButton"; +import { InfoTile } from "../Components/infoTile"; +import * as React from "../../react"; +import SettingsViewModel, { + SettingsModalPages, +} from "../../ViewModel/Global/settingsViewModel"; +import CoreViewModel from "../../ViewModel/Global/coreViewModel"; +import { Languages, ThemeSettings } from "../../Model/Global/settingsModel"; +import HomeViewModel from "../../ViewModel/Pages/homeViewModel"; + +export function LegalModal( + coreViewModel: CoreViewModel, + homeViewModel: HomeViewModel, +) { + return ( + + ); +} diff --git a/src/View/homePage.tsx b/src/View/homePage.tsx index d6a8a96b..dca5384a 100644 --- a/src/View/homePage.tsx +++ b/src/View/homePage.tsx @@ -10,9 +10,11 @@ import FileTransferViewModel from "../ViewModel/Global/fileTransferViewModel"; import CoreViewModel from "../ViewModel/Global/coreViewModel"; import ConnectionViewModel from "../ViewModel/Global/connectionViewModel"; import ChatListViewModel from "../ViewModel/Chat/chatListViewModel"; +import HomeViewModel from "../ViewModel/Pages/homeViewModel"; export function HomePage( coreViewModel: CoreViewModel, + homeViewModel: HomeViewModel, storageViewModel: StorageViewModel, settingsViewModel: SettingsViewModel, connectionViewModel: ConnectionViewModel, @@ -119,6 +121,12 @@ export function HomePage( "hard_drive", "e", )} + {HomePageButton( + homeViewModel.openLegalModal, + coreViewModel.translations.homePage.legalButton, + "gavel", + "i", + )}