File tree Expand file tree Collapse file tree 4 files changed +20
-23
lines changed
src/dashboard/Data/Browser Expand file tree Collapse file tree 4 files changed +20
-23
lines changed Original file line number Diff line number Diff line change @@ -246,15 +246,12 @@ class Browser extends DashboardView {
246246 }
247247
248248 async login ( username , password ) {
249- if ( ! ! Parse . User . current ( ) ) {
249+ if ( Parse . User . current ( ) ) {
250250 Parse . User . logOut ( ) ;
251251 }
252- try {
253- const currentUser = await Parse . User . logIn ( username , password ) ;
254- this . setState ( { currentUser : currentUser , useMasterKey : false } , ( ) => this . refresh ( ) ) ;
255- } catch ( error ) {
256- throw error ;
257- }
252+
253+ const currentUser = await Parse . User . logIn ( username , password ) ;
254+ this . setState ( { currentUser : currentUser , useMasterKey : false } , ( ) => this . refresh ( ) ) ;
258255 }
259256
260257 async logout ( ) {
Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ let BrowserToolbar = ({
272272 < Separator />
273273 < MenuItem text = { currentUser ? 'Switch Parse.User' : 'Browse as Parse.User' } onClick = { showLogin } active = { ! ! currentUser } />
274274 { currentUser ? < MenuItem text = { useMasterKey ? < span > Browsing with < b > Master Key</ b > </ span > : < span > Browse with < s > Master Key</ s > </ span > } onClick = { toggleMasterKeyUsage } active = { ! ! currentUser } greenActive = { useMasterKey } /> : < noscript /> }
275- { currentUser ? < MenuItem text = { < span > Logout (< b > { currentUser . get ( " username" ) } </ b > )</ span > } onClick = { logout } active = { ! ! currentUser } /> : < noscript /> }
275+ { currentUser ? < MenuItem text = { < span > Logout (< b > { currentUser . get ( ' username' ) } </ b > )</ span > } onClick = { logout } active = { ! ! currentUser } /> : < noscript /> }
276276 </ BrowserMenu >
277277 ) : (
278278 < noscript />
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ export default class EditRowDialog extends React.Component {
150150 const { selectedObject } = this . props ;
151151 const { currentObject, expandedTextAreas } = this . state ;
152152 const oldStringifyValue = JSON . stringify (
153- type === " Polygon"
153+ type === ' Polygon'
154154 ? selectedObject [ name ] . coordinates
155155 : selectedObject [ name ] ,
156156 null ,
@@ -416,13 +416,13 @@ export default class EditRowDialog extends React.Component {
416416 const description = (
417417 < span >
418418 { targetClass ? `${ type } <${ targetClass } >` : type }
419- < div style = { { marginTop : " 2px" } } >
419+ < div style = { { marginTop : ' 2px' } } >
420420 { expandedTextAreas [ name ] && expandedTextAreas [ name ] . rows > 3 && (
421421 < a
422- style = { { color : " #169cee" } }
422+ style = { { color : ' #169cee' } }
423423 onClick = { ( ) => this . toggleExpandTextArea ( name ) }
424424 >
425- { expandedTextAreas [ name ] . expanded ? " collapse" : " expand" }
425+ { expandedTextAreas [ name ] . expanded ? ' collapse' : ' expand' }
426426 </ a >
427427 ) }
428428 </ div >
Original file line number Diff line number Diff line change 1- import React from " react" ;
2- import ParseApp from " lib/ParseApp" ;
3- import PropTypes from " prop-types" ;
4- import Modal from " components/Modal/Modal.react" ;
5- import LoginRow from " components/LoginRow/LoginRow.react" ;
6- import Notification from " dashboard/Data/Browser/Notification.react" ;
1+ import React from ' react' ;
2+ import ParseApp from ' lib/ParseApp' ;
3+ import PropTypes from ' prop-types' ;
4+ import Modal from ' components/Modal/Modal.react' ;
5+ import LoginRow from ' components/LoginRow/LoginRow.react' ;
6+ import Notification from ' dashboard/Data/Browser/Notification.react' ;
77
88export default class LoginDialog extends React . Component {
99 constructor ( props ) {
1010 super ( props ) ;
1111 this . state = {
1212 open : false ,
13- username : "" ,
14- password : ""
13+ username : '' ,
14+ password : ''
1515 } ;
1616
1717 this . handleOpen = this . handleOpen . bind ( this ) ;
@@ -61,12 +61,12 @@ export default class LoginDialog extends React.Component {
6161 open && (
6262 < Modal
6363 type = { Modal . Types . INFO }
64- title = { currentUser ? " Switch Parse.User" : " Login as Parse.User" }
64+ title = { currentUser ? ' Switch Parse.User' : ' Login as Parse.User' }
6565 subtitle = {
66- < div style = { { paddingTop : " 5px" } } >
66+ < div style = { { paddingTop : ' 5px' } } >
6767 { currentUser && (
6868 < p >
69- Logged in as < strong > { currentUser . get ( " username" ) } </ strong >
69+ Logged in as < strong > { currentUser . get ( ' username' ) } </ strong >
7070 </ p >
7171 ) }
7272 </ div >
You can’t perform that action at this time.
0 commit comments