8000 feat(site): add ability to create tokens from account tokens page by Kira-Pilot · Pull Request #6608 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat(site): add ability to create tokens from account tokens page #6608

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

Merged
merged 12 commits into from
Mar 16, 2023

Conversation

Kira-Pilot
Copy link
Member

resolves #5778

Some notes:

  • We are stuck using a native datepicker (wrapped in the MUI TextField component) as we are on an older version of MUI; as such, styling options are limited.
  • The original mocks for this design had a "no expiration" option. This is something I'd like to add down the road (here's a ticket) but right now we do not support this option in the API or the CLI, and there's some plumbing involved that warrants its own PR.

Token creation without `--max-token-lifetime set
Kapture 2023-03-14 at 16 59 53

Token creation with a --max-token-lifetime of 20 days set
Kapture 2023-03-14 at 17 02 52

8000
value: "custom",
}

export const filterByMaxTokenLifetime = (
Copy link
Member Author

Choose a reason for hiding this comment

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

Will write some unit tests for these helper functions

lifetime: 30,
}

const CreateTokenPage: FC = () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

Will add some visual stories/tests for this new form

@@ -0,0 +1,73 @@
import i18next from "i18next"

export const NANO_HOUR = 3600000000000
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a bit of a pain - explanation here.

Copy link
Collaborator
@BrunoQuaresma BrunoQuaresma left a comment

Choose a reason for hiding this comment

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

Awesome work!

@Kira-Pilot Kira-Pilot changed the title feat(UI): add ability to create tokens from account tokens page feat(site): add ability to create tokens from account tokens page Mar 15, 2023
@Kira-Pilot Kira-Pilot merged commit 811a69f into main Mar 16, 2023
@Kira-Pilot Kira-Pilot deleted the create-token-ui/kira-pilot branch March 16, 2023 15:25
@github-actions github-actions bot locked and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tokens: support creation from UI
2 participants
0