Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wotwizard-ui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
clients
wotwizard-ui
Commits
15dbdd02
Commit
15dbdd02
authored
3 years ago
by
Pierre-Jean CHANCELLIER
Browse files
Options
Downloads
Patches
Plain Diff
add inout.vue & restore an empty homepage
parent
df811a53
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
layouts/default.vue
+7
-2
7 additions, 2 deletions
layouts/default.vue
pages/index.vue
+3
-66
3 additions, 66 deletions
pages/index.vue
pages/inout.vue
+94
-0
94 additions, 0 deletions
pages/inout.vue
with
104 additions
and
68 deletions
layouts/default.vue
+
7
−
2
View file @
15dbdd02
...
@@ -11,12 +11,17 @@ export default {
...
@@ -11,12 +11,17 @@ export default {
return
{
return
{
breadcrumb
:
[],
breadcrumb
:
[],
menus
:
[
menus
:
[
{
title
:
'
Toile de confiance
'
,
items
:
[
{
path
:
'
/inout
'
,
title
:
'
Entrées et sorties
'
},
{
path
:
'
/membres
'
,
title
:
'
Membres
'
}
]},
{
{
title
:
'
En Développement
'
,
title
:
'
En Développement
'
,
items
:
[
items
:
[
{
path
:
'
/chartjs
'
,
title
:
'
ChartJS
'
},
{
path
:
'
/chartjs
'
,
title
:
'
ChartJS
'
},
{
path
:
'
/membres
'
,
title
:
'
Membres
'
}
]},
]}
]
]
}
}
},
},
...
...
This diff is collapsed.
Click to expand it.
pages/index.vue
+
3
−
66
View file @
15dbdd02
<
template
>
<
template
>
<main
class=
"container"
>
<main
class=
"container"
>
<h2
class=
"display-2 text-center mb-5"
>
Page d'accueil
</h2>
<h2
class=
"text-center mb-5 font-weight-light"
>
Bienvenue
</h2>
<NavigationLoader
:isLoading=
"$apollo.queries.newMembers.loading"
class=
"d-block mx-auto"
/>
<div
class=
"row text-center"
v-if=
"!$apollo.queries.newMembers.loading"
>
<div
class=
"col-lg-6"
>
<div>
<h2
class=
"h4"
>
Bienvenue à
</h2>
<MemberList
:members=
"newMembers['entrees']"
:displayPubkey=
"false"
:displayHead=
"false"
/>
</div>
</div>
<div
class=
"col-lg-6"
>
<h2
class=
"h4"
>
Au revoir à
</h2>
<MemberList
:members=
"newMembers['sorties']"
:displayPubkey=
"false"
:displayHead=
"false"
/>
</div>
</div>
</main>
</main>
</
template
>
</
template
>
<
script
>
<
script
>
import
gql
from
'
graphql-tag
'
export
default
{
export
default
{
data
()
{
data
()
{
// Variables locales
// Variables locales
...
@@ -30,56 +16,7 @@ export default {
...
@@ -30,56 +16,7 @@ export default {
text
:
'
Accueil
'
,
text
:
'
Accueil
'
,
active
:
true
active
:
true
}
}
],
]
today
:
Math
.
round
(
Date
.
now
()
/
1000
)
}
},
// Fonctions locales
methods
:
{
},
apollo
:
{
newMembers
:
{
query
:
gql
`query LastEvents($start: Int64, $end: Int64) {
membersCount(start: $start, end: $end) {
idList {
id {
pubkey
uid
status
hash
limitDate
received_certifications {
limit
}
}
inOut
}
}
} `
,
variables
(){
return
{
start
:
this
.
today
-
86400
*
2
,
end
:
this
.
today
}},
update
(
data
)
{
let
result
=
{
'
entrees
'
:[],
'
sorties
'
:[]}
for
(
let
i
=
0
;
i
<
data
.
membersCount
.
length
;
i
++
)
{
let
member
=
data
.
membersCount
[
i
].
idList
[
0
]
member
.
id
.
inOut
=
member
.
inOut
if
(
member
.
inOut
||
member
.
id
.
status
==
'
MEMBER
'
)
{
if
(
result
[
'
entrees
'
].
filter
(
function
(
e
)
{
return
e
.
hash
===
member
.
id
.
hash
;
}).
length
==
0
)
{
result
[
'
entrees
'
].
push
(
member
.
id
)
}
}
else
{
result
[
'
sorties
'
].
push
(
member
.
id
)
}
}
for
(
let
list
in
result
)
{
result
[
list
].
sort
((
a
,
b
)
=>
(
a
.
uid
.
toLowerCase
()
>
b
.
uid
.
toLowerCase
())
?
1
:
-
1
)
}
return
result
}
}
}
},
},
mounted
()
{
mounted
()
{
...
...
This diff is collapsed.
Click to expand it.
pages/inout.vue
0 → 100644
+
94
−
0
View file @
15dbdd02
<
template
>
<main
class=
"container"
>
<h2
class=
"text-center mb-5 font-weight-light"
>
Entrées et sorties de la toile de confiance des 2 derniers jours
</h2>
<NavigationLoader
:isLoading=
"$apollo.queries.newMembers.loading"
class=
"d-block mx-auto"
/>
<div
class=
"row text-center"
v-if=
"!$apollo.queries.newMembers.loading"
>
<div
class=
"col-lg-6"
>
<div>
<h2
class=
"h4 text-success"
>
Bienvenue à
</h2>
<MemberList
:members=
"newMembers['entrees']"
:displayPubkey=
"false"
:displayHead=
"false"
/>
</div>
</div>
<div
class=
"col-lg-6"
>
<h2
class=
"h4 text-danger"
>
Au revoir à
</h2>
<MemberList
:members=
"newMembers['sorties']"
:displayPubkey=
"false"
:displayHead=
"false"
/>
</div>
</div>
</main>
</
template
>
<
script
>
import
gql
from
'
graphql-tag
'
export
default
{
data
()
{
// Variables locales
return
{
// Fil d'ariane
breadcrumb
:
[
{
text
:
'
Accueil
'
,
to
:
'
/
'
},
{
text
:
'
Entrées et sorties
'
,
active
:
true
}
],
today
:
Math
.
round
(
Date
.
now
()
/
1000
)
}
},
// Fonctions locales
methods
:
{
},
apollo
:
{
newMembers
:
{
query
:
gql
`query LastEvents($start: Int64, $end: Int64) {
membersCount(start: $start, end: $end) {
idList {
id {
pubkey
uid
status
hash
limitDate
received_certifications {
limit
}
}
inOut
}
}
} `
,
variables
(){
return
{
start
:
this
.
today
-
86400
*
2
,
end
:
this
.
today
}},
update
(
data
)
{
let
result
=
{
'
entrees
'
:[],
'
sorties
'
:[]}
for
(
let
i
=
0
;
i
<
data
.
membersCount
.
length
;
i
++
)
{
let
member
=
data
.
membersCount
[
i
].
idList
[
0
]
member
.
id
.
inOut
=
member
.
inOut
if
(
member
.
inOut
||
member
.
id
.
status
==
'
MEMBER
'
)
{
if
(
result
[
'
entrees
'
].
filter
(
function
(
e
)
{
return
e
.
hash
===
member
.
id
.
hash
;
}).
length
==
0
)
{
result
[
'
entrees
'
].
push
(
member
.
id
)
}
}
else
{
result
[
'
sorties
'
].
push
(
member
.
id
)
}
}
for
(
let
list
in
result
)
{
result
[
list
].
sort
((
a
,
b
)
=>
(
a
.
uid
.
toLowerCase
()
>
b
.
uid
.
toLowerCase
())
?
1
:
-
1
)
}
return
result
}
}
},
mounted
()
{
// Mise à jour du fil d'ariane au chargement
$nuxt
.
$emit
(
'
changeRoute
'
,
this
.
breadcrumb
)
}
}
</
script
>
\ No newline at end of file
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