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
9ce79dea
Commit
9ce79dea
authored
Oct 16, 2018
by
Paul Kaplan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Control visibility externally and fix css
parent
21a7f122
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
29 deletions
+26
-29
src/views/preview/presentation.jsx
src/views/preview/presentation.jsx
+3
-4
src/views/preview/share-banner.jsx
src/views/preview/share-banner.jsx
+16
-22
src/views/preview/share-banner.scss
src/views/preview/share-banner.scss
+7
-3
No files found.
src/views/preview/presentation.jsx
View file @
9ce79dea
...
...
@@ -87,10 +87,9 @@ const PreviewPresentation = ({
const
shareDate
=
((
projectInfo
.
history
&&
projectInfo
.
history
.
shared
))
?
projectInfo
.
history
.
shared
:
''
;
return
(
<
div
className=
"preview"
>
<
ShareBanner
shared=
{
isShared
}
onShare=
{
onShare
}
/>
{
!
isShared
&&
(
<
ShareBanner
onShare=
{
onShare
}
/>
)
}
{
projectInfo
&&
projectInfo
.
author
&&
projectInfo
.
author
.
id
&&
(
<
Formsy
onKeyPress=
{
onKeyPress
}
>
<
div
className=
"inner"
>
...
...
src/views/preview/share-banner.jsx
View file @
9ce79dea
...
...
@@ -6,30 +6,24 @@ const Button = require('../../components/forms/button.jsx');
require
(
'
./share-banner.scss
'
);
const
ShareBanner
=
props
=>
{
if
(
props
.
shared
)
return
null
;
return
(
<
div
className=
"shareBanner"
>
<
div
className=
"inner"
>
<
FlexRow
className=
"preview-row"
>
const
ShareBanner
=
({
onShare
})
=>
(
<
div
className=
"share-banner-outer"
>
<
FlexRow
className=
"inner share-banner"
>
<
span
className=
"share-text"
>
<
FormattedMessage
id=
"preview.share.notShared"
/>
</
span
>
<
Button
className=
"button share-button"
onClick=
{
props
.
onShare
}
onClick=
{
onShare
}
>
<
FormattedMessage
id=
"preview.share.shareButton"
/>
</
Button
>
</
FlexRow
>
</
div
>
</
div
>
);
};
);
ShareBanner
.
propTypes
=
{
onShare
:
PropTypes
.
func
,
shared
:
PropTypes
.
bool
.
isRequired
onShare
:
PropTypes
.
func
};
module
.
exports
=
ShareBanner
;
src/views/preview/share-banner.scss
View file @
9ce79dea
...
...
@@ -2,15 +2,19 @@
$navigation-height
:
50px
;
.share
Bann
er
{
.share
-banner-out
er
{
background-color
:
$ui-orange-25percent
;
width
:
100%
;
overflow
:
hidden
;
color
:
$ui-orange
;
}
.share-banner
{
align-items
:
center
;
justify-content
:
space-between
;
}
.share-button
{
margin-top
:
0
;
background-color
:
$ui-orange
;
font-size
:
.875rem
;
font-weight
:
normal
;
...
...
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