2024-07-12 21:11:33 +02:00
|
|
|
import * as React from "bloatless-react";
|
|
|
|
|
|
|
|
|
|
import {
|
2024-07-12 22:26:59 +02:00
|
|
|
clearAddresses,
|
2024-07-12 22:24:54 +02:00
|
|
|
clearCategories,
|
|
|
|
|
clearStatuses,
|
2024-07-12 21:11:33 +02:00
|
|
|
isPresentingSettingsModal,
|
|
|
|
|
repairApp,
|
|
|
|
|
toggleSettings,
|
|
|
|
|
zoomIn,
|
|
|
|
|
zoomOut,
|
|
|
|
|
} from "../Model/model";
|
|
|
|
|
|
2024-07-12 22:24:54 +02:00
|
|
|
import { icons } from "../icons";
|
2024-07-12 21:11:33 +02:00
|
|
|
import { translation } from "../translations";
|
|
|
|
|
|
|
|
|
|
export function SettingsModal() {
|
|
|
|
|
return (
|
|
|
|
|
<div class="modal" toggle:open={isPresentingSettingsModal}>
|
|
|
|
|
<div>
|
|
|
|
|
<main>
|
|
|
|
|
<h2>{translation.settings}</h2>
|
|
|
|
|
|
|
|
|
|
<div class="flex-row width-input gap">
|
|
|
|
|
<button class="width-100 flex justify-start" on:click={zoomOut}>
|
|
|
|
|
<span class="icon">zoom_out</span>
|
|
|
|
|
{translation.zoomOut}
|
|
|
|
|
</button>
|
|
|
|
|
<button class="width-100 flex justify-start" on:click={zoomIn}>
|
|
|
|
|
<span class="icon">zoom_in</span>
|
|
|
|
|
{translation.zoomIn}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<hr></hr>
|
|
|
|
|
|
2024-07-12 22:24:54 +02:00
|
|
|
<div class="flex-column width-input">
|
2024-07-13 12:00:16 +02:00
|
|
|
<button class="tile width-100 flex-1" on:click={repairApp}>
|
2024-07-12 21:11:33 +02:00
|
|
|
<span class="icon">handyman</span>
|
2024-07-13 12:00:16 +02:00
|
|
|
{translation.repairApp}
|
2024-07-12 21:11:33 +02:00
|
|
|
</button>
|
|
|
|
|
</div>
|
2024-07-12 22:24:54 +02:00
|
|
|
|
|
|
|
|
<hr></hr>
|
|
|
|
|
|
|
|
|
|
<div class="flex-column width-input gap">
|
2024-07-13 12:00:16 +02:00
|
|
|
<button class="tile width-100 flex-1" on:click={clearAddresses}>
|
2024-07-12 22:26:59 +02:00
|
|
|
<span class="icon">cell_tower</span>
|
2024-07-13 12:00:16 +02:00
|
|
|
{translation.clearAddresses}
|
2024-07-12 22:26:59 +02:00
|
|
|
</button>
|
2024-07-13 12:00:16 +02:00
|
|
|
<button class="tile width-100 flex-1" on:click={clearCategories}>
|
2024-07-12 22:24:54 +02:00
|
|
|
<span class="icon">{icons.categoryName}</span>
|
2024-07-13 12:00:16 +02:00
|
|
|
{translation.clearCategories}
|
2024-07-12 22:24:54 +02:00
|
|
|
</button>
|
2024-07-13 12:00:16 +02:00
|
|
|
<button class="tile width-100 flex-1" on:click={clearStatuses}>
|
2024-07-12 22:24:54 +02:00
|
|
|
<span class="icon">{icons.status}</span>
|
2024-07-13 12:00:16 +02:00
|
|
|
{translation.clearStatuses}
|
2024-07-12 22:24:54 +02:00
|
|
|
</button>
|
|
|
|
|
</div>
|
2024-07-12 21:11:33 +02:00
|
|
|
</main>
|
|
|
|
|
<button class="width-100" on:click={toggleSettings}>
|
|
|
|
|
{translation.close}
|
|
|
|
|
<span class="icon">close</span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|