]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - src/App.svelte
Components for internal links (#69)
[nominatim-ui.git] / src / App.svelte
index f295c69626d9bd8263f0ffb157fa0e3894054271..54cad5ddad2e59a75151ae5da1a59310b9d2af68 100644 (file)
@@ -1,14 +1,37 @@
 <script>
-  import * as jquery from 'jquery';
   import 'bootstrap/dist/css/bootstrap.css';
   import 'bootstrap/dist/js/bootstrap.bundle.js';
 
+  import { page, refresh_page } from './lib/stores.js';
+
   import Header from './components/Header.svelte';
   import Footer from './components/Footer.svelte';
   import ReportIssueModal from './components/ReportIssueModal.svelte';
- </script>
+  import SearchPage from './pages/SearchPage.svelte';
+  import ReversePage from './pages/ReversePage.svelte';
+  import DetailsPage from './pages/DetailsPage.svelte';
+  import PolygonsPage from './pages/PolygonsPage.svelte';
+  import DeletablePage from './pages/DeletablePage.svelte';
+
+  $: view = $page.tab;
+
+  refresh_page();
+</script>
+
+<!-- deal with back-button and other user action -->
+<svelte:window on:popstate={refresh_page} />
 
 <Header/>
-<div id="main" />
+{#if view === 'search'}
+<SearchPage />
+{:else if view === 'reverse'}
+<ReversePage />
+{:else if view === 'details'}
+<DetailsPage />
+{:else if view === 'deletable'}
+<DeletablePage />
+{:else if view === 'polygons'}
+<PolygonsPage />
+{/if}
 <Footer/>
 <ReportIssueModal/>