Skip to content

Commit

Permalink
Use refactored three-part layout
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed May 31, 2024
1 parent 9662f03 commit 3bb1ced
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 70 deletions.
2 changes: 1 addition & 1 deletion web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions web/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
import { notNull } from "svelte-utils";
import { Geocoder } from "svelte-utils/map";
import {
DisableInteractiveLayers,
mapContents,
topContents,
sidebarContents,
Layout,
layerId,
StreetView,
} from "./common";
} from "svelte-utils/top_bar_layout";
import { DisableInteractiveLayers, layerId, StreetView } from "./common";
import DebugMode from "./DebugMode.svelte";
import NeighbourhoodMode from "./edit/NeighbourhoodMode.svelte";
import NetworkMode from "./NetworkMode.svelte";
Expand All @@ -25,13 +26,10 @@
import SetBoundaryMode from "./SetBoundaryMode.svelte";
import {
app,
mapContents,
topContents,
map as mapStore,
showAbout,
lightMode,
mode,
sidebarContents,
maptilerBasemap,
maptilerApiKey,
useLocalVite,
Expand Down
2 changes: 1 addition & 1 deletion web/src/DebugMode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { Link, layerId, Popup } from "./common";
import { PropertiesTable, notNull } from "svelte-utils";
import RenderNeighbourhood from "./RenderNeighbourhood.svelte";
import SplitComponent from "./SplitComponent.svelte";
import { SplitComponent } from "svelte-utils/top_bar_layout";
import { app, mode } from "./stores";
</script>

Expand Down
2 changes: 1 addition & 1 deletion web/src/NetworkMode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { FillLayer, GeoJSON, hoverStateFilter } from "svelte-maplibre";
import { layerId, Popup, Link } from "./common";
import ModalFilterLayer from "./ModalFilterLayer.svelte";
import SplitComponent from "./SplitComponent.svelte";
import { SplitComponent } from "svelte-utils/top_bar_layout";
import { lightMode, app, autosave, mode, projectName } from "./stores";
// Note we do this to trigger a refresh when loading stuff
Expand Down
2 changes: 1 addition & 1 deletion web/src/RouteMode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { layerId, Link } from "./common";
import ModalFilterLayer from "./ModalFilterLayer.svelte";
import RenderNeighbourhood from "./RenderNeighbourhood.svelte";
import SplitComponent from "./SplitComponent.svelte";
import { SplitComponent } from "svelte-utils/top_bar_layout";
import { app, mode, route_pt_a, route_pt_b, mainRoadPenalty } from "./stores";
export let prevMode: "network" | "neighbourhood";
Expand Down
2 changes: 1 addition & 1 deletion web/src/SetBoundaryMode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { notNull } from "svelte-utils";
import RouteSnapperLayer from "./common/snapper/RouteSnapperLayer.svelte";
import SnapPolygonControls from "./common/snapper/SnapPolygonControls.svelte";
import SplitComponent from "./SplitComponent.svelte";
import { SplitComponent } from "svelte-utils/top_bar_layout";
import { autosave, app, mode, route_tool } from "./stores";
import type { AreaProps } from "route-snapper-ts";
Expand Down
17 changes: 0 additions & 17 deletions web/src/SplitComponent.svelte

This file was deleted.

2 changes: 1 addition & 1 deletion web/src/ViewShortcutsMode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { notNull } from "svelte-utils";
import ModalFilterLayer from "./ModalFilterLayer.svelte";
import RenderNeighbourhood from "./RenderNeighbourhood.svelte";
import SplitComponent from "./SplitComponent.svelte";
import { SplitComponent } from "svelte-utils/top_bar_layout";
import { app, map, mode } from "./stores";
type State =
Expand Down
32 changes: 0 additions & 32 deletions web/src/common/Layout.svelte

This file was deleted.

1 change: 0 additions & 1 deletion web/src/common/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export { default as BasemapPicker } from "./BasemapPicker.svelte";
export { default as DisableInteractiveLayers } from "./DisableInteractiveLayers.svelte";
export { default as Layout } from "./Layout.svelte";
export { default as Link } from "./Link.svelte";
export { default as Popup } from "./Popup.svelte";
export { default as StreetView } from "./StreetView.svelte";
Expand Down
2 changes: 1 addition & 1 deletion web/src/edit/NeighbourhoodMode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { type LayerClickInfo } from "svelte-maplibre";
import { Popup, Link } from "../common";
import RenderNeighbourhood from "../RenderNeighbourhood.svelte";
import SplitComponent from "../SplitComponent.svelte";
import { SplitComponent } from "svelte-utils/top_bar_layout";
import {
app,
map,
Expand Down
4 changes: 0 additions & 4 deletions web/src/stores.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ export let useLocalVite: Writable<boolean> = writable(false);
export let projectName: Writable<string> = writable("");
export let showAbout: Writable<boolean> = writable(true);

export let topContents: Writable<HTMLDivElement | null> = writable(null);
export let sidebarContents: Writable<HTMLDivElement | null> = writable(null);
export let mapContents: Writable<HTMLDivElement | null> = writable(null);

export let app: Writable<LTN | null> = writable(null);
export let route_tool: Writable<RouteTool | null> = writable(null);
export let route_pt_a: Writable<LngLat> = writable(new LngLat(0, 0));
Expand Down
2 changes: 1 addition & 1 deletion web/src/title/NewProjectMode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { Link } from "../common";
import { OverpassSelector } from "svelte-utils/overpass";
import { PolygonToolLayer } from "maplibre-draw-polygon";
import SplitComponent from "../SplitComponent.svelte";
import { SplitComponent } from "svelte-utils/top_bar_layout";
import {
autosave,
projectName,
Expand Down
2 changes: 1 addition & 1 deletion web/src/title/TitleMode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import editLight from "../../assets/edit_light.svg?url";
import editDark from "../../assets/edit_dark.svg?url";
import { Link } from "../common";
import SplitComponent from "../SplitComponent.svelte";
import { SplitComponent } from "svelte-utils/top_bar_layout";
import {
lightMode,
app,
Expand Down

0 comments on commit 3bb1ced

Please sign in to comment.