From ddeae6bd266cf3d8d0863dc163e50b69f20b8b9e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 23 Sep 2019 11:34:57 +0200 Subject: [PATCH] Correctly redirect to instances list --- src/components/InstancesList.vue | 6 +++++- src/main.js | 9 ++++++++- src/views/Home.vue | 34 +++++++++++++++++--------------- src/views/Instances.vue | 5 +++-- 4 files changed, 34 insertions(+), 20 deletions(-) diff --git a/src/components/InstancesList.vue b/src/components/InstancesList.vue index 11ccaf2..f27ddad 100644 --- a/src/components/InstancesList.vue +++ b/src/components/InstancesList.vue @@ -105,7 +105,7 @@
Instances list
-
+
diff --git a/src/main.js b/src/main.js index c2cdb02..98bd1e0 100644 --- a/src/main.js +++ b/src/main.js @@ -93,7 +93,14 @@ for (const locale of allLocales) { const router = new VueRouter({ mode: 'history', base: process.env.BASE_URL, - routes + routes, + scrollBehavior (to, from, savedPosition) { + if (to.hash) { + return { selector: to.hash } + } else { + return { x: 0, y: 0 } + } + } }) // Stats Matomo diff --git a/src/views/Home.vue b/src/views/Home.vue index c52e298..fdd2521 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -20,7 +20,7 @@ What is PeerTube? - + See the instances list @@ -43,7 +43,7 @@
diff --git a/src/views/Instances.vue b/src/views/Instances.vue index 91d1979..df16c40 100644 --- a/src/views/Instances.vue +++ b/src/views/Instances.vue @@ -10,9 +10,9 @@ then all you have to do is create an account on the PeerTube instance of your choice.

- +
@@ -81,6 +81,7 @@ img { width: 370px; + height: 210px; } }