import "./homePage.css"; import { StringToOption } from "./Components/option"; import { NewItemEntry } from "./Components/newItemEntry"; import { HomePageButton } from "./Components/homePageButton"; import { ChatViewModelToChatEntry } from "./Components/chatEntry"; import * as React from "../react"; import StorageViewModel from "../ViewModel/Global/storageViewModel"; import SettingsViewModel from "../ViewModel/Global/settingsViewModel"; 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, fileTransferViewModel: FileTransferViewModel, chatListViewModel: ChatListViewModel, ) { const greeting = React.createProxyState([settingsViewModel.username], () => coreViewModel.translations.homePage.greeting( settingsViewModel.username.value, ), ); const isChatPlaceholderHidden = React.createProxyState( [chatListViewModel.chatMatches, chatListViewModel.chatQuery], () => chatListViewModel.chatMatches.value.size > 0 || chatListViewModel.chatQuery.value != "", ); // sections const overviewSection = (