-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: Possibility to create invite with QR generation and clipboard support #56
Conversation
…upport Signed-off-by: Tom Lanser <[email protected]>
0300f03
to
d8a7801
Compare
public static acceptStates: DidExchangeState[] = [DidExchangeState.InvitationReceived] | ||
public static acceptStates: DidExchangeState[] = [ | ||
DidExchangeState.InvitationReceived, | ||
DidExchangeState.RequestReceived, |
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.
Will this not cause any UI issues when autoAcceptConnections
is on true
?
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.
I'll test it out but I think it will just go directly to the done state
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.
It will just swap to the Done state so the UI is responding correctly.
return | ||
} | ||
|
||
const url = (await invite).invitation.toUrl({ domain: 'https://example.com' }) |
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.
@TimoGlastra Is the domain not being set in the config of the agent? I assume if we do not that it has a reason, but it would be quite nice to do toUrl
with an optional domain.
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.
It is, but there's a few complications:
- What is you don't have an endpoint, and use a mediator, should the default mediator be used? What if it's different from the mediator that is used for this invitation?
- the invitation object doesn't have access to the config
- You may use a different url for the invitation (one that shows a nice ui of the invitation), than the endpoint that is used for DIDComm
packages/toolbox-ui/src/pages/agent/connections/ConnectionsScreen.tsx
Outdated
Show resolved
Hide resolved
@@ -23,6 +26,33 @@ export const ConnectionsScreen = () => { | |||
await agent?.connections.acceptRequest(connectionId) | |||
} | |||
|
|||
const declineRequest = async (connectionId: string) => { | |||
await agent?.connections.deleteById(connectionId) |
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.
We should really fix the agent being optionally undefined in the react hooks package 😞
Left some comments now that @blu3beri tagged me, 😄 |
Signed-off-by: Tom Lanser <[email protected]>
Signed-off-by: Tom Lanser <[email protected]>
Screenshots are not using the Animo colors yet so it will change a bit.