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
429aa035
Commit
429aa035
authored
Oct 22, 2015
by
Ray Schamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add dismissable email confirmation banner
parent
af415e1b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
127 additions
and
49 deletions
+127
-49
src/components/banner/banner.jsx
src/components/banner/banner.jsx
+24
-0
src/components/banner/banner.scss
src/components/banner/banner.scss
+40
-0
src/views/splash/splash.jsx
src/views/splash/splash.jsx
+63
-49
No files found.
src/components/banner/banner.jsx
0 → 100644
View file @
429aa035
var
React
=
require
(
'
react
'
);
require
(
'
./banner.scss
'
);
var
Banner
=
React
.
createClass
({
type
:
'
Banner
'
,
propTypes
:
{
onRequestDismiss
:
React
.
PropTypes
.
func
},
render
:
function
()
{
return
(
<
div
className=
{
'
banner
'
+
this
.
props
.
className
}
>
<
div
className=
"inner"
>
{
this
.
props
.
children
}
{
this
.
props
.
onRequestDismiss
?
[
<
a
className=
"close"
key=
"close"
href=
"#"
onClick=
{
this
.
props
.
onRequestDismiss
}
>
x
</
a
>
]
:
[]
}
</
div
>
</
div
>
);
}
});
module
.
exports
=
Banner
;
src/components/banner/banner.scss
0 → 100644
View file @
429aa035
@import
"../../colors"
;
$navigation-height
:
50px
;
.banner
{
position
:
fixed
;
top
:
$navigation-height
;
box-shadow
:
0
1px
1px
$ui-dark-gray
;
background-color
:
$ui-orange
;
width
:
100%
;
overflow
:
hidden
;
text-align
:
center
;
line-height
:
$navigation-height
;
&
,
a
{
color
:
$ui-white
;
}
a
{
text-decoration
:
underline
;
}
.close
{
float
:
right
;
margin-top
:
$navigation-height
/
4
;
border-radius
:
$navigation-height
/
4
;
background-color
:
$box-shadow-gray
;
width
:
$navigation-height
/
2
;
height
:
$navigation-height
/
2
;
text-decoration
:
none
;
text-shadow
:
none
;
line-height
:
$navigation-height
/
2
;
color
:
$ui-white
;
font-weight
:
normal
;
}
&
.warning
{
background-color
:
$ui-orange
;
}
}
src/views/splash/splash.jsx
View file @
429aa035
...
...
@@ -7,6 +7,7 @@ var Session = require('../../mixins/session.jsx');
var
Activity
=
require
(
'
../../components/activity/activity.jsx
'
);
var
AdminPanel
=
require
(
'
../../components/adminpanel/adminpanel.jsx
'
);
var
Banner
=
require
(
'
../../components/banner/banner.jsx
'
);
var
Box
=
require
(
'
../../components/box/box.jsx
'
);
var
Button
=
require
(
'
../../components/forms/button.jsx
'
);
var
Carousel
=
require
(
'
../../components/carousel/carousel.jsx
'
);
...
...
@@ -235,8 +236,20 @@ var Splash = injectIntl(React.createClass({
},
render
:
function
()
{
var
featured
=
this
.
renderHomepageRows
();
var
showEmailConfirmation
=
true
;(
this
.
state
.
session
.
user
&&
this
.
state
.
session
.
flags
.
has_outstanding_email_confirmation
&&
this
.
state
.
session
.
flags
.
confirm_email_banner
);
return
(
<
div
className=
"inner"
>
<
div
className=
"splash"
>
{
showEmailConfirmation
?
[
<
Banner
key=
"confirmedEmail"
className=
"warning"
onRequestDismiss=
{
this
.
handleDismiss
.
bind
(
this
,
'
confirmed_email
'
)
}
>
<
a
href=
"#"
onClick=
{
this
.
showConfirmEmailPopup
}
>
Confirm your email
</
a
>
to enable sharing.
{
'
'
}
<
a
href=
"/info/faq/#accounts"
>
Having trouble?
</
a
>
</
Banner
>
]
:
[]
}
<
div
key=
"inner"
className=
"inner"
>
{
this
.
state
.
session
.
user
?
[
<
div
key=
"header"
className=
"splash-header"
>
{
this
.
state
.
session
.
flags
.
show_welcome
?
[
...
...
@@ -288,6 +301,7 @@ var Splash = injectIntl(React.createClass({
</
dd
>
</
AdminPanel
>
</
div
>
</
div
>
);
}
}));
...
...
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