diff --git a/src/components/settings/__tests__/api-section-responsive.test.tsx b/src/components/settings/__tests__/api-section-responsive.test.tsx new file mode 100644 index 000000000..66138197e --- /dev/null +++ b/src/components/settings/__tests__/api-section-responsive.test.tsx @@ -0,0 +1,148 @@ +import { describe, expect, it, vi } from "vitest"; +import { renderToStaticMarkup } from "react-dom/server"; + +/** + * v1.4.27 MB5 — `/settings/api` mobile card-list parity. + * + * The section ships three tables: endpoint catalogue, active tokens, + * revoked tokens. Each table now renders twice: + * - desktop `
| ]*>iOS app<\/td>/);
+ });
+});
diff --git a/src/components/settings/api-section.tsx b/src/components/settings/api-section.tsx
index 850b1f684..3309f025a 100644
--- a/src/components/settings/api-section.tsx
+++ b/src/components/settings/api-section.tsx
@@ -58,6 +58,21 @@ export function ApiSection() {
function ApiEndpointsCard() {
const { t } = useTranslations();
+ // v1.4.27 MB5 — dual-render:
@@ -70,7 +85,8 @@ function ApiEndpointsCard() {
{t("settings.apiEndpointsDescription")}
-
)}
+ {/* Desktop table — verbatim layout for md+. */}
+
);
}
@@ -236,7 +285,8 @@ function ApiTokensCard() {
{t("settings.activeTokensTitle")} -
+ {/* Desktop table — verbatim layout for md+, hidden on phones. */}
+
{revokedTokens.length > 0 && (
@@ -359,47 +506,89 @@ function ApiTokensCard() {
})}
{showRevokedTokens && (
- + {t("settings.noActiveTokens")} + + ) : ( +
-
+
+ {/* Mobile card list — stacked meta layout, no
+ horizontal scroll. Revoked tokens are read-only so
+ no action footer is needed. */}
+
{tok.name} |
+
+ {tok.permissions.join(", ")}
+ |
+
+ {formatDate(tok.createdAt)}
+ |
+
+ {tok.lastUsedAt
+ ? formatDateTime(tok.lastUsedAt)
+ : t("settings.tokenNeverUsed")}
+ |
+
|