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

update setup key edit layout #190

Merged

Conversation

saroojbkhari
Copy link
Contributor

No description provided.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

@braginini braginini left a comment

Choose a reason for hiding this comment

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

Additionally to requested changes:

  1. There is a bug when creating a new key and setting the reusable switch to true but not changing the available uses. When you click Create key, the API endpoind is called with 0 which means unlimited. We should set it to 0 by default (instead of current 1)
    (The bug was there before the PR)
    image

  2. I think that we should do the same layout as in the UserEdit component:

Screenshot from 2023-05-31 16-17-26

  1. We should also close the Setup key detailed view and switch to the table view when clicking Save button. Just like with UserEdit

Comment on lines 480 to 484
style={{
height: "100%",
fontSize: "14px",
borderRadius: "2px",
}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
style={{
height: "100%",
fontSize: "14px",
borderRadius: "2px",
}}

Copy link
Contributor

Choose a reason for hiding this comment

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

no need for these styles, let's do similar to other pages (see the UserEdit component)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

}}
></Paragraph>
{formSetupKey.type === "one-off" ? "One-off" : "Reusable"},
Available uses
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Available uses
available uses

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@braginini braginini self-requested a review June 1, 2023 07:48
@braginini braginini merged commit a7f64d4 into netbirdio:main Jun 1, 2023
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