2024-07-23 13:09:46 +02:00
|
|
|
import * as React from "bloatless-react";
|
|
|
|
|
|
|
|
|
|
import BoardViewModel from "../../ViewModel/Pages/boardViewModel";
|
2024-07-23 13:48:17 +02:00
|
|
|
import { ColorPicker } from "../Components/colorPicker";
|
2024-07-23 14:31:50 +02:00
|
|
|
import { DangerousActionButton } from "../Components/dangerousActionButton";
|
2024-07-23 13:09:46 +02:00
|
|
|
import { translations } from "../translations";
|
|
|
|
|
|
|
|
|
|
export function BoardSettingsModal(boardViewModel: BoardViewModel) {
|
|
|
|
|
return (
|
|
|
|
|
<div class="modal" toggle:open={boardViewModel.isPresentingSettingsModal}>
|
|
|
|
|
<div>
|
|
|
|
|
<main>
|
2024-07-23 13:19:08 +02:00
|
|
|
<h2>{translations.chatPage.task.boardSettingsHeadline}</h2>
|
|
|
|
|
|
|
|
|
|
<label class="tile flex-no">
|
|
|
|
|
<span class="icon">label</span>
|
|
|
|
|
<div>
|
|
|
|
|
<span>{translations.chatPage.task.boardNameInputLabel}</span>
|
|
|
|
|
<input
|
|
|
|
|
on:enter={boardViewModel.saveSettings}
|
|
|
|
|
bind:value={boardViewModel.name}
|
|
|
|
|
></input>
|
|
|
|
|
</div>
|
|
|
|
|
</label>
|
2024-07-23 13:48:17 +02:00
|
|
|
|
2024-07-23 14:31:50 +02:00
|
|
|
<hr></hr>
|
|
|
|
|
|
2024-07-23 13:48:17 +02:00
|
|
|
{ColorPicker(boardViewModel.color)}
|
2024-07-23 14:31:50 +02:00
|
|
|
|
|
|
|
|
<hr></hr>
|
|
|
|
|
|
|
|
|
|
<div class="width-input">
|
|
|
|
|
{DangerousActionButton(
|
|
|
|
|
translations.chatPage.task.deleteBoardButton,
|
|
|
|
|
"delete_forever",
|
|
|
|
|
boardViewModel.deleteBoard
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
2024-07-23 13:09:46 +02:00
|
|
|
</main>
|
2024-07-23 13:19:08 +02:00
|
|
|
<button on:click={boardViewModel.hideSettings}>
|
2024-07-23 13:09:46 +02:00
|
|
|
{translations.general.closeButton}
|
|
|
|
|
<span class="icon">close</span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|