add BoardViewModel

This commit is contained in:
marlon-erler
2024-07-23 00:57:40 +02:00
parent d35f2ff0ea
commit 267bdcfc73
6 changed files with 80 additions and 26 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ export function TaskPage(taskPageViewModel: TaskPageViewModel) {
<div
class="grid gap"
style="grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr))"
children:append={[taskPageViewModel.boards, BoardInfoToEntry]}
children:append={[taskPageViewModel.boardViewModels, BoardInfoToEntry]}
></div>
</div>
</div>
+8 -8
View File
@@ -1,15 +1,15 @@
import * as React from "bloatless-react";
import { BoardInfoFileContent } from "../../Model/Files/taskModel";
import BoardViewModel from "../../ViewModel/Pages/boardViewModel";
export function BoardEntry(boardInfo: BoardInfoFileContent) {
export function BoardEntry(boardViewModel: BoardViewModel) {
const view = (
<button
color={boardInfo.color}
set:color={boardViewModel.color}
class="tile colored-tile"
>
<span class="shadow">{boardInfo.name}</span>
<b>{boardInfo.name}</b>
<span class="shadow" subscribe:innerText={boardViewModel.name}></span>
<b subscribe:innerText={boardViewModel.name}></b>
</button>
);
@@ -17,7 +17,7 @@ export function BoardEntry(boardInfo: BoardInfoFileContent) {
}
export const BoardInfoToEntry: React.StateItemConverter<
BoardInfoFileContent
> = (boardInfo: BoardInfoFileContent) => {
return BoardEntry(boardInfo);
BoardViewModel
> = (boardViewModel: BoardViewModel) => {
return BoardEntry(boardViewModel);
};