Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hive-io
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hive-io
Commits
4ce7babe
Commit
4ce7babe
authored
9 months ago
by
Mahdi Yari
Browse files
Options
Downloads
Patches
Plain Diff
add /roadmap to routes
parent
a1cf51e9
No related branches found
No related tags found
2 merge requests
!215
Exchanges and Ecosystem Updates
,
!210
Add roadmap
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/router.js
+31
-17
31 additions, 17 deletions
src/router.js
with
31 additions
and
17 deletions
src/router.js
+
31
−
17
View file @
4ce7babe
...
...
@@ -8,8 +8,9 @@ const About = () => import('./pages/about.vue').then((m) => m.default || m)
const
Brand
=
()
=>
import
(
'
./pages/brand.vue
'
).
then
((
m
)
=>
m
.
default
||
m
)
const
Eco
=
()
=>
import
(
'
./pages/eco.vue
'
).
then
((
m
)
=>
m
.
default
||
m
)
const
Wallets
=
()
=>
import
(
'
./pages/wallets.vue
'
).
then
((
m
)
=>
m
.
default
||
m
)
const
Developers
=
()
=>
import
(
'
./pages/developers.vue
'
).
then
((
m
)
=>
m
.
default
||
m
)
const
Hbd
=
()
=>
import
(
'
./pages/hbd.vue
'
).
then
(
(
m
)
=>
m
.
default
||
m
)
const
Developers
=
()
=>
import
(
'
./pages/developers.vue
'
).
then
((
m
)
=>
m
.
default
||
m
)
const
Hbd
=
()
=>
import
(
'
./pages/hbd.vue
'
).
then
((
m
)
=>
m
.
default
||
m
)
export
const
createRouter
=
()
=>
{
const
router
=
new
Router
({
...
...
@@ -21,61 +22,67 @@ export const createRouter = () => {
path
:
'
/
'
,
component
:
Index
,
name
:
'
index
'
,
meta
:
{}
meta
:
{}
,
},
{
path
:
'
/about
'
,
component
:
About
,
name
:
'
about
'
,
meta
:
{}
meta
:
{}
,
},
{
path
:
'
/updates
'
,
component
:
About
,
name
:
'
about-updates
'
,
meta
:
{}
meta
:
{}
,
},
{
path
:
'
/contributors
'
,
component
:
About
,
name
:
'
about-contributors
'
,
meta
:
{}
meta
:
{}
,
},
{
path
:
'
/brand
'
,
component
:
Brand
,
name
:
'
brand
'
,
meta
:
{}
meta
:
{}
,
},
{
path
:
'
/eco
'
,
component
:
Eco
,
name
:
'
eco
'
,
meta
:
{
keepPosition
:
true
,
thresholdPosition
:
800
}
meta
:
{
keepPosition
:
true
,
thresholdPosition
:
800
}
,
},
{
path
:
'
/eco/:app
'
,
component
:
Eco
,
name
:
'
eco-app
'
,
meta
:
{
keepPosition
:
true
,
thresholdPosition
:
800
}
meta
:
{
keepPosition
:
true
,
thresholdPosition
:
800
}
,
},
{
path
:
'
/wallets
'
,
component
:
Wallets
,
name
:
'
wallets
'
,
meta
:
{}
meta
:
{}
,
},
{
path
:
'
/developers
'
,
component
:
Developers
,
name
:
'
developers
'
,
meta
:
{}
meta
:
{}
,
},
{
path
:
'
/hbd
'
,
component
:
Hbd
,
name
:
'
hbd
'
,
meta
:
{}
meta
:
{},
},
{
path
:
'
/roadmap
'
,
component
:
About
,
name
:
'
roadmap
'
,
meta
:
{},
},
],
fallback
:
true
,
...
...
@@ -108,7 +115,7 @@ if (process.client) {
}
}
const
scrollBehavior
=
function
(
to
,
from
,
savedPosition
)
{
const
scrollBehavior
=
function
(
to
,
from
,
savedPosition
)
{
// if the returned position is falsy or an empty object,
// will retain current scroll position.
let
position
=
false
...
...
@@ -120,7 +127,11 @@ const scrollBehavior = function (to, from, savedPosition) {
)
{
// console.log('Resetting position to 0', to)
// scroll to the top of the page
if
(
!
to
.
meta
.
thresholdPosition
||
window
.
pageYOffset
>
to
.
meta
.
thresholdPosition
)
position
=
{
x
:
0
,
y
:
0
}
if
(
!
to
.
meta
.
thresholdPosition
||
window
.
pageYOffset
>
to
.
meta
.
thresholdPosition
)
position
=
{
x
:
0
,
y
:
0
}
}
// console.log('saved position', savedPosition)
...
...
@@ -137,15 +148,18 @@ const scrollBehavior = function (to, from, savedPosition) {
// coords will be used if no selector is provided,
// or if the selector didn't match any element.
if
(
to
.
hash
)
{
let
{
hash
}
=
to
let
{
hash
}
=
to
// CSS.escape() is not supported with IE and Edge.
if
(
typeof
window
.
CSS
!==
'
undefined
'
&&
typeof
window
.
CSS
.
escape
!==
'
undefined
'
)
{
if
(
typeof
window
.
CSS
!==
'
undefined
'
&&
typeof
window
.
CSS
.
escape
!==
'
undefined
'
)
{
hash
=
`#
${
window
.
CSS
.
escape
(
hash
.
substr
(
1
))}
`
}
try
{
if
(
document
.
querySelector
(
hash
))
{
// scroll to anchor by returning the selector
position
=
{
selector
:
hash
}
position
=
{
selector
:
hash
}
}
}
catch
(
e
)
{
// eslint-disable-next-line no-console
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment