create separate component for home page buttons

This commit is contained in:
marlon-erler
2026-04-08 20:31:25 +00:00
parent 12c77979bf
commit ca674e16fa
12 changed files with 94 additions and 75 deletions
+9 -19
View File
@@ -12,6 +12,7 @@ import SettingsViewModel from "../ViewModel/Global/settingsViewModel";
import StorageViewModel from "../ViewModel/Global/storageViewModel";
import { translations } from "./translations";
import CoreViewModel from "../ViewModel/Global/coreViewModel";
import { HomePageButton } from "./Components/homePageButton";
export function HomePage(
coreVieWModel: CoreViewModel,
@@ -129,25 +130,14 @@ export function HomePage(
<hr></hr>
<button
class="tile flex-no"
on:click={fileTransferViewModel.showDirectionSelectionModal}
>
<span class="icon">sync_alt</span>
<div>
<span>{translations.homePage.transferDataButton}</span>
</div>
</button>
<button
class="tile flex-no"
on:click={storageViewModel.showStorageModal}
>
<span class="icon">hard_drive_2</span>
<div>
<span>{translations.homePage.manageStorageButton}</span>
</div>
</button>
{HomePageButton(
fileTransferViewModel.showDirectionSelectionModal,
translations.homePage.transferDataButton,
)}
{HomePageButton(
storageViewModel.showStorageModal,
translations.homePage.manageStorageButton,
)}
<hr></hr>