Merge pull request #49 from KevinMidboe/revert-45-feat/history-router
Revert "Feat vue router mode changed to history"
This commit is contained in:
		| @@ -7,7 +7,7 @@ async function sendWineSelectMessage(winnerObject) { | ||||
|   winnerObject.timestamp_limit = new Date().getTime() * 600000; | ||||
|   await winnerObject.save(); | ||||
|  | ||||
|   let url = new URL(`/winner/${winnerObject.id}`, "https://lottis.vin"); | ||||
|   let url = new URL(`/#/winner/${winnerObject.id}`, "https://lottis.vin"); | ||||
|  | ||||
|   return sendMessageToUser( | ||||
|     winnerObject.phoneNumber, | ||||
|   | ||||
| @@ -35,7 +35,7 @@ const submitWines = async (req, res) => { | ||||
|     const message = JSON.stringify({ | ||||
|       message: "Dagens vin er lagt til, se den på lottis.vin/dagens!", | ||||
|       title: "Ny vin!", | ||||
|       link: "/dagens" | ||||
|       link: "/#/dagens" | ||||
|     }); | ||||
|  | ||||
|     try { | ||||
|   | ||||
| @@ -13,7 +13,7 @@ | ||||
|           /> | ||||
|       </section> | ||||
|       <div class="to-lottery-container"> | ||||
|         <router-link to="/lottery" class="to-lottery">Vil du til lotteriet?<span class="vin-link">Trykk her</span></router-link> | ||||
|         <a href="#/lottery" class="to-lottery">Vil du til lotteriet?<span class="vin-link">Trykk her</span></a> | ||||
|       </div> | ||||
|       <section class="chart-container"> | ||||
|         <PurchaseGraph class="purchase" /> | ||||
|   | ||||
| @@ -1,5 +1,3 @@ | ||||
| import VueRouter from "vue-router"; | ||||
|  | ||||
| import VinlottisPage from "@/components/VinlottisPage"; | ||||
| import GeneratePage from "@/components/GeneratePage"; | ||||
| import TodaysPage from "@/components/TodaysPage"; | ||||
| @@ -22,37 +20,30 @@ import AllRequestedWines from "@/components/AllRequestedWines"; | ||||
| const routes = [ | ||||
|   { | ||||
|     path: "*", | ||||
|     name: "Hjem", | ||||
|     component: VinlottisPage | ||||
|   }, | ||||
|   { | ||||
|     path: "/lottery", | ||||
|     name: "Lotteri", | ||||
|     component: LotteryPage | ||||
|   }, | ||||
|   { | ||||
|     path: "/dagens", | ||||
|     name: "Dagens vin", | ||||
|     component: TodaysPage | ||||
|   }, | ||||
|   { | ||||
|     path: "/viner", | ||||
|     name: "Alle viner", | ||||
|     component: AllWinesPage | ||||
|   }, | ||||
|   { | ||||
|     path: "/login", | ||||
|     name: "Login", | ||||
|     component: LoginPage | ||||
|   }, | ||||
|   { | ||||
|     path: "/create", | ||||
|     name: "Registrer", | ||||
|     component: CreatePage | ||||
|   }, | ||||
|   { | ||||
|     path: "/admin", | ||||
|     name: "Admin", | ||||
|     component: AdminPage | ||||
|   }, | ||||
|   { | ||||
| @@ -64,40 +55,25 @@ const routes = [ | ||||
|     component: WinnerPage | ||||
|   }, | ||||
|   { | ||||
|     path: "/history/:date", | ||||
|     name: "Historie for dato", | ||||
|     component: HistoryPage | ||||
|   }, | ||||
|   { | ||||
|     path: "/history/", | ||||
|     name: "Historie", | ||||
|     path: "/history", | ||||
|     component: HistoryPage | ||||
|   }, | ||||
|   { | ||||
|     path: "/highscore/:name", | ||||
|     name: "Personlig toppliste", | ||||
|     component: PersonalHighscorePage | ||||
|   }, | ||||
|   { | ||||
|     path: "/highscore", | ||||
|     name: "Topplisten", | ||||
|     component: HighscorePage | ||||
|   }, | ||||
|   { | ||||
|     path: "/request", | ||||
|     name: "Etterspør vin", | ||||
|     component: RequestWine | ||||
|   }, | ||||
|   { | ||||
|     path: "/requested-wines", | ||||
|     name: "Etterspurte viner", | ||||
|     component: AllRequestedWines | ||||
|   } | ||||
| ]; | ||||
|  | ||||
| const router = new VueRouter({ | ||||
|   routes: routes, | ||||
|   mode: "history" | ||||
| }); | ||||
|  | ||||
| export default router; | ||||
| export { routes }; | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| import Vue from "vue"; | ||||
| import VueRouter from "vue-router"; | ||||
| import VinlottisRouter from "@/router.js"; | ||||
| import { routes } from "@/router.js"; | ||||
| import Vinlottis from "@/Vinlottis"; | ||||
| import VueAnalytics from "vue-analytics"; | ||||
|  | ||||
| @@ -9,9 +9,13 @@ Vue.use(VueAnalytics, { | ||||
|   id: "UA-156846886-1" | ||||
| }); | ||||
|  | ||||
| const router = new VueRouter({ | ||||
|   routes: routes | ||||
| }); | ||||
|  | ||||
| new Vue({ | ||||
|   el: "#app", | ||||
|   router: VinlottisRouter, | ||||
|   router, | ||||
|   components: { Vinlottis }, | ||||
|   template: "<Vinlottis/>", | ||||
|   render: h => h(Vinlottis) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user