From 65e60b28f9ca32b382e44e87b33fad2a3783f0dc Mon Sep 17 00:00:00 2001 From: Brian Peiris <brianpeiris@gmail.com> Date: Thu, 26 Apr 2018 08:07:33 -0700 Subject: [PATCH] add webvr link to bottom of entry dialog --- src/assets/stylesheets/entry.scss | 17 +++++++++++++++++ src/assets/translations.data.json | 2 ++ src/react-components/ui-root.js | 13 +++++++++++++ 3 files changed, 32 insertions(+) diff --git a/src/assets/stylesheets/entry.scss b/src/assets/stylesheets/entry.scss index cce585590..2d86cf428 100644 --- a/src/assets/stylesheets/entry.scss +++ b/src/assets/stylesheets/entry.scss @@ -16,10 +16,26 @@ .entry-panel { overflow-y: auto; display: flex; + flex-direction: column; flex: 1; &__button-container { margin: auto; + text-align: center; + flex: 10; + display: flex; + flex-direction: column; + min-height: max-content; + justify-content: center; + } + &__webvr-link-container { + text-align: center; + margin-bottom: 24px; + } + &__webvr-link { + color: white; + flex: 1; + min-height: max-content; } &__screen-sharing { @@ -48,6 +64,7 @@ .entry-button { display: flex; margin: 20px 0; + margin-bottom: 0; cursor: pointer; background: none; color: white; diff --git a/src/assets/translations.data.json b/src/assets/translations.data.json index 9ae0b27c4..7dcd32f8f 100644 --- a/src/assets/translations.data.json +++ b/src/assets/translations.data.json @@ -12,6 +12,8 @@ "entry.daydream-medium": "Daydream", "entry.daydream-via-chrome": "Using Google Chrome", "entry.enable-screen-sharing": "Share my desktop", + "entry.webvr-link-preamble": "New to WebVR?", + "entry.webvr-link": "Learn more", "profile.save": "SAVE", "profile.display_name.validation_warning": "Alphanumerics and hyphens. At least 3 characters, no more than 32", "profile.header": "Your display name:", diff --git a/src/react-components/ui-root.js b/src/react-components/ui-root.js index 55f5ca69b..82c1c9112 100644 --- a/src/react-components/ui-root.js +++ b/src/react-components/ui-root.js @@ -632,6 +632,19 @@ class UIRoot extends Component { )} {screenSharingCheckbox} </div> + {!mobiledetect.mobile() && ( + <div className="entry-panel__webvr-link-container"> + <FormattedMessage id="entry.webvr-link-preamble" />{" "} + <a + className="entry-panel__webvr-link" + target="_blank" + rel="noopener noreferrer" + href="https://webvr.rocks/" + > + <FormattedMessage id="entry.webvr-link" /> + </a> + </div> + )} </div> ) : null; -- GitLab