-
-
Notifications
You must be signed in to change notification settings - Fork 12
Web: add dolt login for local dolt server #404
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
Conversation
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.
LGTM!
web/main/doltServer.ts
Outdated
event.sender.send("login-started", requestId); | ||
|
||
let timedOut = false; | ||
const timeoutDuration = 5 * 60 * 1000; // 5 minutes |
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.
This seems like too long maybe? 1 minute might be better?
web/renderer/gen/graphql-types.tsx
Outdated
@@ -245,6 +245,7 @@ export type Mutation = { | |||
deleteBranch: Scalars['Boolean']['output']; | |||
deleteRemote: Scalars['Boolean']['output']; | |||
deleteTag: Scalars['Boolean']['output']; | |||
doltLogin: Scalars['Boolean']['output']; |
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.
Where are the graphql changes for these?
} finally { | ||
setPending(false); | ||
// Cleanup ID reference | ||
if (requestId) setCancelId(null); |
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.
Can this go at the end of the try
block instead? Then you don't need to reassign the requestId
variable
{success.active ? ( | ||
<div className={css.successMsg}> | ||
Logged in as {loggedInUser?.username} ({loggedInUser?.email}) | ||
</div> |
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.
Should maybe only show this if loggedInUser
is defined too
className={css.loginButton} | ||
disabled={pending} | ||
> | ||
{pending ? "Login..." : "Dolt Login"} |
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.
{pending ? "Login..." : "Dolt Login"} | |
{pending ? "Logging in..." : "Dolt Login"} |
|
||
return ( | ||
<QueryHandler | ||
result={{ ...res, data: res.data }} |
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.
result={{ ...res, data: res.data }} | |
result={res} |
dolt login button in remotes tab:
after adding credentials on dolthub: