diff --git a/assets/image.svg b/assets/image.svg new file mode 100644 index 000000000..02520b83a --- /dev/null +++ b/assets/image.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/lib/draw/Toolbox.svelte b/src/lib/draw/Toolbox.svelte index fa9da0e9a..d26465d37 100644 --- a/src/lib/draw/Toolbox.svelte +++ b/src/lib/draw/Toolbox.svelte @@ -2,6 +2,7 @@ import { SecondaryButton } from "lib/govuk"; import { mode, pointTool, polygonTool, routeTool } from "stores"; import type { Schema } from "types"; + import imageIcon from "../../../assets/image.svg"; import pointIcon from "../../../assets/point.svg"; import polygonFreehandIcon from "../../../assets/polygon_freehand.svg"; import polygonSnappedIcon from "../../../assets/polygon_snapped.svg"; @@ -52,8 +53,9 @@ Split route {/if} - mode.set({ mode: "new-image" })}> - New image + mode.set({ mode: "set-image" })}> + Set image + Set image mode.set({ mode: "streetview" })}> StreetView diff --git a/src/lib/draw/image/ImageLayer.svelte b/src/lib/draw/image/ImageLayer.svelte index a3ad15800..1be54844a 100644 --- a/src/lib/draw/image/ImageLayer.svelte +++ b/src/lib/draw/image/ImageLayer.svelte @@ -1,7 +1,4 @@ {#if $imgSrc} diff --git a/src/lib/draw/image/ImageMode.svelte b/src/lib/draw/image/ImageMode.svelte index 5e254fa4e..e344a92dd 100644 --- a/src/lib/draw/image/ImageMode.svelte +++ b/src/lib/draw/image/ImageMode.svelte @@ -1,5 +1,10 @@ - mode.set({ mode: "list" })}> - Cancel - + + mode.set({ mode: "list" })}> + Back + + + Delete + +
{/if} + +

+ Note this image isn't saved as part of this scheme. When you close this page, + it'll be lost. +

diff --git a/src/lib/sidebar/LeftSidebar.svelte b/src/lib/sidebar/LeftSidebar.svelte index b9f1e046a..2097f3f42 100644 --- a/src/lib/sidebar/LeftSidebar.svelte +++ b/src/lib/sidebar/LeftSidebar.svelte @@ -79,8 +79,8 @@ toolbox, but that gets created and destroyed frequently. --> to cancel -{:else if $mode.mode == "new-image"} -

New image

+{:else if $mode.mode == "set-image"} +

Set image

{:else if $mode.mode == "streetview"}

StreetView

diff --git a/src/pages/SketchSchemes.svelte b/src/pages/SketchSchemes.svelte index 475e3f7ec..f19fd45c1 100644 --- a/src/pages/SketchSchemes.svelte +++ b/src/pages/SketchSchemes.svelte @@ -112,12 +112,11 @@ + {#if $mode.mode == "list"} {:else if $mode.mode == "split-route"} - {:else if $mode.mode == "new-image"} - {/if} diff --git a/src/types.ts b/src/types.ts index 704779558..28494e4c7 100644 --- a/src/types.ts +++ b/src/types.ts @@ -146,5 +146,5 @@ export type Mode = | { mode: "new-snapped-polygon" } | { mode: "new-route" } | { mode: "split-route" } - | { mode: "new-image" } + | { mode: "set-image" } | { mode: "streetview" };