Skip to content

[pat] List view UI with empty state #14888

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 1 commit into from
Nov 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 26 additions & 11 deletions components/dashboard/src/settings/PersonalAccessTokens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,32 @@ function ListAccessTokensView() {
}, []);

return (
<div>
<ul>
{tokens.map((t: PersonalAccessToken) => {
return (
<li>
{t.id} - {t.name} - {t.value}
</li>
);
})}
</ul>
</div>
<>
<div className="flex items-start sm:justify-between mb-2">
<div>
<h3>Personal Access Tokens</h3>
<h2 className="text-gray-500">Create or regenerate active personal access tokens.</h2>
</div>
</div>
<div className="bg-gray-100 dark:bg-gray-800 rounded-xl w-full py-28 flex flex-col items-center">
<h3 className="text-center pb-3 text-gray-500 dark:text-gray-400">No Personal Access Tokens (PAT)</h3>
<p className="text-center pb-6 text-gray-500 text-base w-96">
Generate a personal access token (PAT) for applications that need access to the Gitpod API.{" "}
</p>
<button>New Personal Access Token</button>
</div>
{tokens.length > 0 && (
<ul>
{tokens.map((t: PersonalAccessToken) => {
return (
<li>
{t.id} - {t.name} - {t.value}
</li>
);
})}
</ul>
)}
</>
);
}

Expand Down