mirror of
https://github.com/ascribe/onion.git
synced 2025-01-03 18:35:09 +01:00
fix bug in FileDragAndDropDialog
This commit is contained in:
parent
ddf3eb18fc
commit
cee8d7cae7
@ -47,13 +47,13 @@ export default function RedirectProxyHandler({to, when}) {
|
|||||||
this.state.currentUser && this.state.currentUser.email :
|
this.state.currentUser && this.state.currentUser.email :
|
||||||
this.state.currentUser && !this.state.currentUser.email;
|
this.state.currentUser && !this.state.currentUser.email;
|
||||||
|
|
||||||
if(!exprToValidate && when === 'loggedIn' && redirect) {
|
if(exprToValidate) {
|
||||||
|
window.setTimeout(() => this.history.pushState(null, to, query));
|
||||||
|
} else if(!exprToValidate && when === 'loggedIn' && redirect) {
|
||||||
|
|
||||||
delete query.redirect;
|
delete query.redirect;
|
||||||
window.setTimeout(() => this.history.pushState(null, '/' + redirect, query));
|
window.setTimeout(() => this.history.pushState(null, '/' + redirect, query));
|
||||||
|
|
||||||
} else if(exprToValidate) {
|
|
||||||
window.setTimeout(() => this.history.pushState(null, to, query));
|
|
||||||
} else if(!exprToValidate && when === 'loggedOut' && redirectAuthenticated) {
|
} else if(!exprToValidate && when === 'loggedOut' && redirectAuthenticated) {
|
||||||
/*
|
/*
|
||||||
* redirectAuthenticated contains an arbirary path
|
* redirectAuthenticated contains an arbirary path
|
||||||
|
@ -43,7 +43,7 @@ let FileDragAndDropDialog = React.createClass({
|
|||||||
<div className="file-drag-and-drop-dialog present-options">
|
<div className="file-drag-and-drop-dialog present-options">
|
||||||
<p>{getLangText('Would you rather')}</p>
|
<p>{getLangText('Would you rather')}</p>
|
||||||
<Link
|
<Link
|
||||||
to={location.pathname + location.query}
|
to={location.pathname}
|
||||||
query={queryParamsHash}>
|
query={queryParamsHash}>
|
||||||
<span className="btn btn-default btn-sm">
|
<span className="btn btn-default btn-sm">
|
||||||
{getLangText('Hash your work')}
|
{getLangText('Hash your work')}
|
||||||
@ -53,7 +53,7 @@ let FileDragAndDropDialog = React.createClass({
|
|||||||
<span> or </span>
|
<span> or </span>
|
||||||
|
|
||||||
<Link
|
<Link
|
||||||
to={location.pathname + location.query}
|
to={location.pathname}
|
||||||
query={queryParamsUpload}>
|
query={queryParamsUpload}>
|
||||||
<span className="btn btn-default btn-sm">
|
<span className="btn btn-default btn-sm">
|
||||||
{getLangText('Upload and hash your work')}
|
{getLangText('Upload and hash your work')}
|
||||||
|
Loading…
Reference in New Issue
Block a user