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

fix(#1989): Optimize Key Details UI for mobile #2025

Merged
merged 4 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export default async function APIKeyDetailPage(props: {

<div className="flex flex-col gap-4 mt-4">
<Card>
<CardContent className="grid grid-cols-6 divide-x">
<CardContent className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-2 sm:divide-x">
<Metric
label={key.expires && key.expires.getTime() < Date.now() ? "Expired" : "Expires in"}
value={key.expires ? ms(key.expires.getTime() - Date.now()) : <Minus />}
Expand Down Expand Up @@ -354,8 +354,10 @@ const Metric: React.FC<{
}> = ({ label, value, tooltip }) => {
const component = (
<div className="flex flex-col items-start justify-center px-4 py-2">
<p className="text-sm text-content-subtle">{label}</p>
<div className="text-2xl font-semibold leading-none tracking-tight">{value}</div>
<p className="text-sm text-content-subtle truncate w-full">{label}</p>
<div className="text-2xl font-semibold leading-none tracking-tight truncate w-full">
{value}
</div>
</div>
);

Expand Down
10 changes: 2 additions & 8 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,12 @@
"publishConfig": {
"access": "public"
},
"keywords": [
"unkey",
"client",
"api"
],
"keywords": ["unkey", "client", "api"],
"bugs": {
"url": "https://github.com/unkeyed/unkey/issues"
},
"homepage": "https://github.com/unkeyed/unkey#readme",
"files": [
"./dist/**"
],
"files": ["./dist/**"],
"author": "Andreas Thomas <[email protected]>",
"scripts": {
"generate": "openapi-typescript https://api.unkey.dev/openapi.json -o ./src/openapi.d.ts",
Expand Down
11 changes: 2 additions & 9 deletions packages/hono/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,12 @@
"publishConfig": {
"access": "public"
},
"keywords": [
"unkey",
"client",
"api",
"hono"
],
"keywords": ["unkey", "client", "api", "hono"],
"bugs": {
"url": "https://github.com/unkeyed/unkey/issues"
},
"homepage": "https://github.com/unkeyed/unkey#readme",
"files": [
"./dist/**"
],
"files": ["./dist/**"],
"author": "Andreas Thomas <[email protected]>",
"scripts": {
"build": "tsup",
Expand Down
10 changes: 2 additions & 8 deletions packages/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,12 @@
"publishConfig": {
"access": "public"
},
"keywords": [
"unkey",
"client",
"api"
],
"keywords": ["unkey", "client", "api"],
"bugs": {
"url": "https://github.com/unkeyed/unkey/issues"
},
"homepage": "https://github.com/unkeyed/unkey#readme",
"files": [
"./dist/**"
],
"files": ["./dist/**"],
"author": "Andreas Thomas <[email protected]>",
"scripts": {
"build": "tsup"
Expand Down
11 changes: 2 additions & 9 deletions packages/ratelimit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,12 @@
"publishConfig": {
"access": "public"
},
"keywords": [
"unkey",
"ratelimit",
"global",
"serverless"
],
"keywords": ["unkey", "ratelimit", "global", "serverless"],
"bugs": {
"url": "https://github.com/unkeyed/unkey/issues"
},
"homepage": "https://github.com/unkeyed/unkey#readme",
"files": [
"./dist/**"
],
"files": ["./dist/**"],
"author": "Andreas Thomas <[email protected]>",
"scripts": {
"build": "tsup"
Expand Down