Add extra images for maps

This commit is contained in:
Guntis Smaukstelis
2024-02-06 16:56:31 +02:00
parent 0e83040217
commit f9f05b2a78
5 changed files with 34 additions and 5 deletions
+21 -1
View File
@@ -11,7 +11,7 @@ export const ResultView: Component<{
result: Resource<QueryResult>
}> = ({ result: resultResource }) => {
const [getOrderKey, setOrderKey] = createSignal<ResultOrderKeys>("A -> Z");
type ResultView = "grid" | "list" | "map_1920x1080" | "map_3840x1440";
type ResultView = "grid" | "list" | "map_1920x1080" | "map_1920x1080_wind" | "map_3840x1440" | "map_3840x1440_wind";
const [getResultView, setResultView] = createSignal<ResultView>("grid");
const cityData = () =>
@@ -45,12 +45,26 @@ export const ResultView: Component<{
onClick={() => setResultView("map_1920x1080")}
/>
&nbsp; | &nbsp;
<input
type="button"
class="secondary"
value="map 1920x1080 wind"
onClick={() => setResultView("map_1920x1080_wind")}
/>
&nbsp; | &nbsp;
<input
type="button"
class="secondary"
value="map 3840x1440"
onClick={() => setResultView("map_3840x1440")}
/>
&nbsp; | &nbsp;
<input
type="button"
class="secondary"
value="map 3840x1440 wind"
onClick={() => setResultView("map_3840x1440_wind")}
/>
</span>
<span style={{ visibility: ["grid", "list"].includes(getResultView()) ? "visible" : "hidden" }}>
<SelectOrder getter={getOrderKey} setter={setOrderKey} />
@@ -80,9 +94,15 @@ export const ResultView: Component<{
<Show when={getResultView() === "map_1920x1080"}>
<MapView type="map_1920x1080" data={cityData} />
</Show>
<Show when={getResultView() === "map_1920x1080_wind"}>
<MapView type="map_1920x1080_wind" data={cityData} />
</Show>
<Show when={getResultView() === "map_3840x1440"}>
<MapView type="map_3840x1440" data={cityData} />
</Show>
<Show when={getResultView() === "map_3840x1440_wind"}>
<MapView type="map_3840x1440_wind" data={cityData} />
</Show>
</div>
</div>
);