-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if browser is an iOS uiWebView #432
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ class InfoDialog extends Component { | |
slack: Symbol("slack"), | ||
email_submitted: Symbol("email_submitted"), | ||
invite: Symbol("invite"), | ||
safari: Symbol(""), | ||
updates: Symbol("updates"), | ||
report: Symbol("report"), | ||
help: Symbol("help"), | ||
|
@@ -155,6 +156,35 @@ class InfoDialog extends Component { | |
</div> | ||
); | ||
break; | ||
case InfoDialog.dialogTypes.safari: | ||
dialogTitle = "Open in Safari"; | ||
dialogBody = ( | ||
<div> | ||
<div> | ||
Hubs is not supported in your current browser on iOS. Copy and paste this link directly in Safari. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nitpick: I think I'd prefer: "Hubs does not support your current browser on iOS." |
||
</div> | ||
<div className="invite-form"> | ||
<input | ||
type="text" | ||
readOnly | ||
onFocus={e => e.target.select()} | ||
value={document.location} | ||
className="invite-form__link_field" | ||
/> | ||
<div className="invite-form__buttons"> | ||
{navigator.share && ( | ||
<button className="invite-form__action-button" onClick={this.shareLinkClicked}> | ||
<span>Share</span> | ||
</button> | ||
)} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this actually show in Chrome? I would remove it. |
||
<button className="invite-form__action-button" onClick={this.copyLinkClicked}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
<span>{this.state.copyLinkButtonText}</span> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
break; | ||
case InfoDialog.dialogTypes.updates: | ||
dialogTitle = ""; | ||
dialogBody = ( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well use
Symbol("safari")
here. It makes for nicer debugging at least.