Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
c8834ed2
Commit
c8834ed2
authored
Oct 23, 2015
by
Ray Schamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add empty state for What's Happening box
parent
21b73862
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
23 deletions
+57
-23
src/components/activity/activity.jsx
src/components/activity/activity.jsx
+39
-23
src/components/box/box.scss
src/components/box/box.scss
+4
-0
src/main.scss
src/main.scss
+14
-0
No files found.
src/components/activity/activity.jsx
View file @
c8834ed2
var
React
=
require
(
'
react
'
);
var
React
=
require
(
'
react
'
);
var
ReactIntl
=
require
(
'
react-intl
'
);
var
ReactIntl
=
require
(
'
react-intl
'
);
var
defineMessages
=
ReactIntl
.
defineMessages
;
var
defineMessages
=
ReactIntl
.
defineMessages
;
var
FormattedMessage
=
ReactIntl
.
FormattedMessage
;
var
FormattedRelative
=
ReactIntl
.
FormattedRelative
;
var
FormattedRelative
=
ReactIntl
.
FormattedRelative
;
var
injectIntl
=
ReactIntl
.
injectIntl
;
var
injectIntl
=
ReactIntl
.
injectIntl
;
...
@@ -32,6 +33,7 @@ var Activity = React.createClass({
...
@@ -32,6 +33,7 @@ var Activity = React.createClass({
className=
"activity"
className=
"activity"
title=
{
formatMessage
(
defaultMessages
.
whatsHappening
)
}
>
title=
{
formatMessage
(
defaultMessages
.
whatsHappening
)
}
>
{
this
.
props
.
items
&&
this
.
props
.
items
.
length
>
0
?
[
<
ul
>
<
ul
>
{
this
.
props
.
items
.
map
(
function
(
item
)
{
{
this
.
props
.
items
.
map
(
function
(
item
)
{
var
actorProfileUrl
=
'
/users/
'
+
item
.
actor
.
username
+
'
/
'
;
var
actorProfileUrl
=
'
/users/
'
+
item
.
actor
.
username
+
'
/
'
;
...
@@ -55,6 +57,20 @@ var Activity = React.createClass({
...
@@ -55,6 +57,20 @@ var Activity = React.createClass({
}
}
})
}
})
}
</
ul
>
</
ul
>
]
:
[
<
div
className=
"empty"
>
<
h4
>
<
FormattedMessage
id=
"activity.seeUpdates"
defaultMessage=
"This is where you will see updates from Scratchers you follow"
/>
</
h4
>
<
a
href=
"/studios/146521/"
>
<
FormattedMessage
id=
"activity.checkOutScratchers"
defaultMessage=
"Check out some Scratchers you might like to follow"
/>
</
a
>
</
div
>
]
}
</
Box
>
</
Box
>
);
);
}
}
...
...
src/components/box/box.scss
View file @
c8834ed2
...
@@ -44,4 +44,8 @@ $base-bg: $ui-white;
...
@@ -44,4 +44,8 @@ $base-bg: $ui-white;
background-color
:
$base-bg
;
background-color
:
$base-bg
;
padding
:
8px
20px
;
padding
:
8px
20px
;
}
}
.empty
{
margin-top
:
20px
;
}
}
}
src/main.scss
View file @
c8834ed2
...
@@ -52,6 +52,20 @@ a:hover {
...
@@ -52,6 +52,20 @@ a:hover {
width
:
942px
;
width
:
942px
;
}
}
.empty
{
$bg-blue
:
#d9edf7
;
$bg-blue-accent
:
#bce8f1
;
border
:
1px
solid
$bg-blue-accent
;
border-radius
:
5px
;
background-color
:
$bg-blue
;
text-align
:
center
;
line-height
:
2rem
;
color
:
$type-gray
;
h4
{
color
:
$type-gray
;
}
}
#view
{
#view
{
/* NOTE: Margin should match height in navigation.scss */
/* NOTE: Margin should match height in navigation.scss */
margin-top
:
50px
;
margin-top
:
50px
;
...
...
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