Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mobility-nudging
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
11
Issues
11
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kc9500
mobility-nudging
Commits
59a23826
Commit
59a23826
authored
May 02, 2018
by
gitexa
Browse files
Options
Browse Files
Download
Plain Diff
Resolved merge conflicts.
parents
dab461ff
7bffba16
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
124 additions
and
2 deletions
+124
-2
client/components/HomeView/HomeView.js
client/components/HomeView/HomeView.js
+13
-2
client/components/HomeView/HomeView.scss
client/components/HomeView/HomeView.scss
+9
-0
client/components/Nudges/RankingScreen/RankingScreen.js
client/components/Nudges/RankingScreen/RankingScreen.js
+76
-0
client/components/Nudges/RankingScreen/RankingScreen.scss
client/components/Nudges/RankingScreen/RankingScreen.scss
+26
-0
No files found.
client/components/HomeView/HomeView.js
View file @
59a23826
...
...
@@ -2,8 +2,9 @@ import React from 'react';
import
{
graphql
,
createFragmentContainer
}
from
'
react-relay
'
;
import
Page
from
'
components/Page/Page
'
;
import
Neighbour
from
'
components/Nudges/Neighbour/Neighbour
'
import
RankingScreen
from
'
components/Nudges/RankingScreen/RankingScreen
'
;
import
{
withAuth
}
from
'
modules/auth/utils
'
;
import
{
Button
,
Segment
,
Header
,
Label
,
Statistic
,
Form
}
from
'
semantic-ui-react
'
;
import
{
Button
,
Segment
,
Header
,
Label
,
Statistic
,
Form
,
Icon
,
Popup
}
from
'
semantic-ui-react
'
;
import
{
Link
}
from
'
found
'
;
import
styles
from
'
./HomeView.scss
'
;
import
classNames
from
'
classnames
'
;
...
...
@@ -40,10 +41,20 @@ class HomeView extends React.Component {
<
div
className
=
{
styles
.
currentTime
}
>
<
Segment
floated
=
'
right
'
>
<
Icon
name
=
'
clock
'
size
=
'
large
'
/>
16
:
11
<
/Segment
>
<
/div
>
<
Popup
position
=
'
top-left
'
trigger
=
{
<
Icon
name
=
'
winner
'
size
=
'
huge
'
/>
}
content
=
{
<
RankingScreen
/>
}
/
>
<
div
className
=
{
styles
.
timeContainer
}
>
<
Segment
circular
className
=
{
styles
.
timeSegment
}
>
<
Statistic
className
=
{
styles
.
timeLabel
}
>
...
...
@@ -84,8 +95,8 @@ class HomeView extends React.Component {
Bestätigen
<
/Button
>
<
/Form
>
<
/Segment
>
<
/section
>
<
/Page
>
);
...
...
client/components/HomeView/HomeView.scss
View file @
59a23826
...
...
@@ -13,6 +13,15 @@
clear
:
both
;
}
.ranking
{
display
:
flex
;
flex-direction
:
column
;
flex
:
1
;
width
:
20px
;
justify-content
:
center
;
}
.form
{
width
:
500px
;
}
...
...
client/components/Nudges/RankingScreen/RankingScreen.js
0 → 100644
View file @
59a23826
import
React
from
'
react
'
;
//import { graphql, createFragmentContainer } from 'react-relay';
import
{
Table
}
from
'
semantic-ui-react
'
;
import
styles
from
'
./RankingScreen.scss
'
;
const
rankingEntries
=
[
{
id
:
"
1
"
,
name
:
"
Peter
"
,
score
:
"
54
"
,
rank
:
"
#1
"
},
{
id
:
"
2
"
,
name
:
"
Felix
"
,
score
:
"
37
"
,
rank
:
"
#2
"
},
{
id
:
"
3
"
,
name
:
"
Daniel
"
,
score
:
"
26
"
,
rank
:
"
#3
"
},
{
id
:
"
4
"
,
name
:
"
Paul
"
,
score
:
"
13
"
,
rank
:
"
#4
"
},
{
id
:
"
5
"
,
name
:
"
David
"
,
score
:
"
7
"
,
rank
:
"
#5
"
},
];
class
RankingScreen
extends
React
.
Component
{
render
()
{
return
(
<
div
className
=
{
styles
.
root
}
>
<
h2
className
=
{
styles
.
heading
}
>
#
369
Clique
<
/h2
>
<
Table
singleLine
className
=
{
styles
.
books
}
>
<
Table
.
Header
>
<
Table
.
Row
>
<
Table
.
HeaderCell
className
=
{
styles
.
name
}
>
Name
<
/Table.HeaderCell
>
<
Table
.
HeaderCell
className
=
{
styles
.
score
}
>
Score
<
/Table.HeaderCell
>
<
Table
.
HeaderCell
className
=
{
styles
.
rank
}
>
Rang
<
/Table.HeaderCell
>
<
/Table.Row
>
<
/Table.Header
>
<
Table
.
Body
>
{
rankingEntries
.
map
(
e
=>
<
Table
.
Row
key
=
{
e
.
id
}
>
{
e
.
name
==
"
Paul
"
&&
<
Table
.
Cell
className
=
{
styles
.
user
}
>
{
e
.
name
}
<
/Table.Cell
>
}
{
e
.
name
!=
"
Paul
"
&&
<
Table
.
Cell
>
{
e
.
name
}
<
/Table.Cell
>
}
{
e
.
name
==
"
Paul
"
&&
<
Table
.
Cell
className
=
{
styles
.
user
}
>
{
e
.
score
}
<
/Table.Cell
>
}
{
e
.
name
!=
"
Paul
"
&&
<
Table
.
Cell
>
{
e
.
score
}
<
/Table.Cell
>
}
{
e
.
name
==
"
Paul
"
&&
<
Table
.
Cell
className
=
{
styles
.
user
}
>
{
e
.
rank
}
<
/Table.Cell
>
}
{
e
.
name
!=
"
Paul
"
&&
<
Table
.
Cell
>
{
e
.
rank
}
<
/Table.Cell
>
}
<
/Table.Row
>
)}
<
/Table.Body
>
<
/Table
>
<
/div
>
);
}
}
export
default
RankingScreen
client/components/Nudges/RankingScreen/RankingScreen.scss
0 → 100644
View file @
59a23826
@import
"./global.scss"
;
.root
{
.heading
{
text-align
:
center
;
color
:
rgba
(
0
,
0
,
0
,
0
.4
);
}
.table
{
width
:
100%
;
table-layout
:
fixed
;
}
.name
{
width
:
40%
;
}
.score
{
width
:
40%
;
}
.rank
{
width
:
20%
;
text-align
:
right
!
important
;
}
.user
{
color
:
rgba
(
0
,
158
,
224
,
1
);
}
}
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