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) {
|
2026-04-01 08:29:39 +00:00
|
|
|
return (
|
|
|
|
|
<div
|
|
|
|
|
class="modal"
|
|
|
|
|
toggle:open={boardViewModel.isPresentingSettingsModal}
|
|
|
|
|
>
|
2024-07-23 13:19:08 +02:00
|
|
|
<div>
|
2026-04-01 08:29:39 +00:00
|
|
|
<main>
|
|
|
|
|
<h2>{translations.chatPage.task.boardSettingsHeadline}</h2>
|
2024-07-23 13:48:17 +02:00
|
|
|
|
2026-04-01 08:29:39 +00:00
|
|
|
<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 14:31:50 +02:00
|
|
|
|
2026-04-01 08:29:39 +00:00
|
|
|
<hr></hr>
|
2024-07-23 14:31:50 +02:00
|
|
|
|
2026-04-01 08:29:39 +00:00
|
|
|
{ColorPicker(boardViewModel.color)}
|
2024-07-23 14:31:50 +02:00
|
|
|
|
2026-04-01 08:29:39 +00:00
|
|
|
<hr></hr>
|
|
|
|
|
|
|
|
|
|
<div class="width-input">
|
|
|
|
|
{DangerousActionButton(
|
|
|
|
|
translations.chatPage.task.deleteBoardButton,
|
|
|
|
|
"delete_forever",
|
|
|
|
|
boardViewModel.deleteBoard,
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
</main>
|
|
|
|
|
<button on:click={boardViewModel.hideSettings}>
|
|
|
|
|
{translations.general.closeButton}
|
|
|
|
|
<span class="icon">close</span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
2024-07-23 13:09:46 +02:00
|
|
|
}
|