Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
hive
hive-dapps
Commits
a271fe6c
Commit
a271fe6c
authored
Aug 25, 2021
by
therealwolf
💯
Browse files
disabled header
parent
52704674
Changes
1
Hide whitespace changes
Inline
Side-by-side
frontend/pages/rankings.vue
View file @
a271fe6c
<
template
>
<div>
<LayoutMain>
<Header
:global=
"global"
/>
<!--
<Header
:global=
"global"
/>
-->
<RankingTable
:apps=
"apps"
:is-loading=
"isLoading"
style=
"margin-top: 30px"
/>
</LayoutMain>
</div>
</
template
>
<
script
>
import
{
getApps
,
getGlobal
}
from
'
~/helpers/api
'
import
RankingTable
from
'
~/components/RankingTable/RankingTable
'
import
RankingTableTime
from
'
~/components/RankingTable/RankingTableTime
'
import
Header
from
'
~/components/header/Header.vue
'
import
LayoutMain
from
'
~/components/LayoutMain
'
import
{
getApps
,
getGlobal
}
from
"
~/helpers/api
"
;
import
RankingTable
from
"
~/components/RankingTable/RankingTable
"
;
import
RankingTableTime
from
"
~/components/RankingTable/RankingTableTime
"
;
import
Header
from
"
~/components/header/Header.vue
"
;
import
LayoutMain
from
"
~/components/LayoutMain
"
;
import
{
mapGetters
}
from
'
vuex
'
import
{
mapGetters
}
from
"
vuex
"
;
export
default
{
computed
:
{
time_selection_converted
()
{
return
this
.
$store
.
getters
[
'
apps/rankings/time_selection_converted
'
]
return
this
.
$store
.
getters
[
"
apps/rankings/time_selection_converted
"
];
},
order_arr
()
{
return
this
.
$store
.
getters
[
'
apps/rankings/order_arr
'
]
return
this
.
$store
.
getters
[
"
apps/rankings/order_arr
"
];
},
sort_arr
()
{
return
this
.
$store
.
getters
[
'
apps/rankings/sort_arr
'
]
return
this
.
$store
.
getters
[
"
apps/rankings/sort_arr
"
];
},
time_arr
()
{
return
this
.
$store
.
getters
[
'
apps/rankings/time_arr
'
]
}
return
this
.
$store
.
getters
[
"
apps/rankings/time_arr
"
];
}
,
},
components
:
{
RankingTable
,
LayoutMain
,
RankingTableTime
,
Header
RankingTable
,
LayoutMain
,
RankingTableTime
,
Header
,
},
data
()
{
return
{
apps
:
[],
global
:
{},
isLoading
:
false
}
isLoading
:
false
,
}
;
},
async
asyncData
({
params
,
query
,
app
})
{
let
q
=
{
...
params
}
let
q
=
{
...
params
}
;
q
.
sort
=
!
query
.
sort
||
!
[
'
rank
'
,
'
dau
'
,
'
tx
'
,
'
volume_hive
'
,
'
volume_hbd
'
,
'
rewards_hive
'
,
'
rewards_hbd
'
].
includes
(
query
.
sort
)
?
q
.
sort
=
'
rank
'
:
query
.
sort
q
.
order
=
!
query
.
order
||
!
[
'
asc
'
,
'
desc
'
].
includes
(
query
.
order
)
?
'
asc
'
:
query
.
order
q
.
time
=
!
query
.
time
||
!
[
'
last_day
'
,
'
last_week
'
,
'
last_month
'
].
includes
(
query
.
time
)
?
'
last_day
'
:
query
.
time
q
.
sort
=
!
query
.
sort
||
!
[
"
rank
"
,
"
dau
"
,
"
tx
"
,
"
volume_hive
"
,
"
volume_hbd
"
,
"
rewards_hive
"
,
"
rewards_hbd
"
,
].
includes
(
query
.
sort
)
?
(
q
.
sort
=
"
rank
"
)
:
query
.
sort
;
q
.
order
=
!
query
.
order
||
!
[
"
asc
"
,
"
desc
"
].
includes
(
query
.
order
)
?
"
asc
"
:
query
.
order
;
q
.
time
=
!
query
.
time
||
!
[
"
last_day
"
,
"
last_week
"
,
"
last_month
"
].
includes
(
query
.
time
)
?
"
last_day
"
:
query
.
time
;
const
data
=
await
getApps
(
app
.
$axios
,
q
)
const
global
=
await
getGlobal
(
app
.
$axios
)
return
{
apps
:
data
.
apps
,
global
}
const
data
=
await
getApps
(
app
.
$axios
,
q
)
;
const
global
=
await
getGlobal
(
app
.
$axios
)
;
return
{
apps
:
data
.
apps
,
global
}
;
},
watch
:
{
'
$route.query
'
()
{
this
.
fetchApps
()
}
"
$route.query
"
()
{
this
.
fetchApps
()
;
}
,
},
methods
:
{
async
fetchApps
()
{
this
.
isLoading
=
true
const
urlParams
=
{
...
this
.
$route
.
params
,
...
this
.
$route
.
query
}
this
.
isLoading
=
true
;
const
urlParams
=
{
...
this
.
$route
.
params
,
...
this
.
$route
.
query
}
;
if
(
!
this
.
$route
.
query
.
sort
||
!
[
'
rank
'
,
'
dau
'
,
'
tx
'
,
'
volume_hive
'
,
'
volume_hbd
'
,
'
rewards_hive
'
,
'
rewards_hbd
'
].
includes
(
this
.
$route
.
query
.
sort
))
urlParams
.
sort
=
'
rank
'
if
(
!
this
.
$route
.
query
.
order
||
!
[
'
asc
'
,
'
desc
'
].
includes
(
this
.
$route
.
query
.
order
))
urlParams
.
order
=
'
asc
'
if
(
!
this
.
$route
.
query
.
time
||
!
[
'
last_day
'
,
'
last_week
'
,
'
last_month
'
].
includes
(
this
.
$route
.
query
.
time
))
urlParams
.
time
=
this
.
time_selection_converted
if
(
!
this
.
$route
.
query
.
sort
||
!
[
"
rank
"
,
"
dau
"
,
"
tx
"
,
"
volume_hive
"
,
"
volume_hbd
"
,
"
rewards_hive
"
,
"
rewards_hbd
"
,
].
includes
(
this
.
$route
.
query
.
sort
)
)
urlParams
.
sort
=
"
rank
"
;
if
(
!
this
.
$route
.
query
.
order
||
!
[
"
asc
"
,
"
desc
"
].
includes
(
this
.
$route
.
query
.
order
)
)
urlParams
.
order
=
"
asc
"
;
if
(
!
this
.
$route
.
query
.
time
||
!
[
"
last_day
"
,
"
last_week
"
,
"
last_month
"
].
includes
(
this
.
$route
.
query
.
time
)
)
urlParams
.
time
=
this
.
time_selection_converted
;
const
data
=
await
getApps
(
this
.
$axios
,
urlParams
)
this
.
isLoading
=
false
this
.
apps
=
data
.
apps
const
data
=
await
getApps
(
this
.
$axios
,
urlParams
)
;
this
.
isLoading
=
false
;
this
.
apps
=
data
.
apps
;
},
async
resetData
()
{
this
.
apps
=
[]
}
}
}
this
.
apps
=
[]
;
}
,
}
,
}
;
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'
~assets/css/settings
'
;
@import
"
~assets/css/settings
"
;
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment