Skip to content
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

add a password manager app demo #8

Merged
merged 4 commits into from
Apr 12, 2024
Merged

add a password manager app demo #8

merged 4 commits into from
Apr 12, 2024

Conversation

oceans404
Copy link
Member

Description

  • updates the scaffold-nillion homepage to link to all demo apps
  • adds a Nillion Password Manager

const [connectedToSnap, setConnectedToSnap] = useState<boolean>(false);
const [userKey, setUserKey] = useState<string | null>(null);
const [userId, setUserId] = useState<string | null>(null);
const [nillion, setNillion] = useState<any>(null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do TS types for our wasm types not work here? e.g. I imagine you should be able to use NillionClient rather than any.

Copy link
Member Author

@oceans404 oceans404 Apr 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

caught between a rock and a hard place here

I can't get the nillion types to replace any without

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm this isn't great. Those type definitions are being generated so we should make sure they're usable and find a way to use them. I think it's okay to keep it this now until we figure that out tho. cc @wwwehr @navasvarela you may know how to make this work.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could the types potentially be a separate import from the js client library?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oceans404 There is a TS type descriptor file generated as part of the client's npm, nillion_client_js_browser.d.ts. This file contains all the type definitions ONLY. I'm not a TS programmer myself but I'd imagine you can import this file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@navasvarela thanks Juan, this worked

import type * as NillionTypes from "@nillion/nillion-client-js-browser/nillion_client_js_browser.d.ts";

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@navasvarela I noticed there's no nillion type here - just NillionClient

@Davetbutler
Copy link
Member

Nice one @oceans404. Been through the flow and all works nicely for me on my machine.

My only observation would be the header bar is getting a bit crowded, could we make the names a bit shorter? Think they will all fit nicely then.

Screenshot 2024-04-11 at 20 21 50

@oceans404
Copy link
Member Author

good catch, ill fix the navbar @Davetbutler

@oceans404
Copy link
Member Author

@Davetbutler fixed the navbar titles:

Screenshot 2024-04-11 at 1 04 28 PM

@oceans404 oceans404 merged commit cd448b2 into main Apr 12, 2024
1 check passed
@oceans404 oceans404 deleted the pw-manager branch April 12, 2024 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants