From e3dfa04094432a3828af3e9eea361f778fff8cc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nicole=20miko=C5=82ajczyk?= Date: Fri, 6 Mar 2026 17:16:56 +0100 Subject: [PATCH] nicolium: migrate tokens page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nicole mikołajczyk --- .../src/pages/settings/auth-token-list.tsx | 188 ++++++++---------- packages/nicolium/src/styles/new/index.scss | 1 + .../nicolium/src/styles/new/settings.scss | 46 +++++ 3 files changed, 135 insertions(+), 100 deletions(-) create mode 100644 packages/nicolium/src/styles/new/settings.scss diff --git a/packages/nicolium/src/pages/settings/auth-token-list.tsx b/packages/nicolium/src/pages/settings/auth-token-list.tsx index 2f108769e..92c6469b3 100644 --- a/packages/nicolium/src/pages/settings/auth-token-list.tsx +++ b/packages/nicolium/src/pages/settings/auth-token-list.tsx @@ -1,16 +1,13 @@ import { useInfiniteQuery, useMutation } from '@tanstack/react-query'; +import clsx from 'clsx'; import React from 'react'; import { defineMessages, FormattedDate, FormattedMessage, useIntl } from 'react-intl'; import Badge from '@/components/badge'; -import Button from '@/components/ui/button'; import Card, { CardBody, CardHeader, CardTitle } from '@/components/ui/card'; import Column from '@/components/ui/column'; -import HStack from '@/components/ui/hstack'; import Icon from '@/components/ui/icon'; import Spinner from '@/components/ui/spinner'; -import Stack from '@/components/ui/stack'; -import Text from '@/components/ui/text'; import { useAppSelector } from '@/hooks/use-app-selector'; import { oauthTokensQueryOptions, @@ -62,102 +59,93 @@ const AuthToken: React.FC = ({ token, isCurrent }) => { }; return ( -
- - - - - {token.app_name} - {token.app_website && ( - - +
+

+ {token.app_name} + {token.app_website && ( + + + + )} +

+ {token.scopes?.length > 0 && ( +
+

+ +

+ {token.scopes.map((scope) => ( + + ))} +
+ )} + {token.created_at && ( +

+ - - )} - - - {token.scopes?.length > 0 && ( - - - - - {token.scopes.map((scope) => ( - - ))} - - )} - {token.created_at && ( - - - ), - }} - /> - - )} - {token.last_used && ( - - - ), - }} - /> - - )} - {token.valid_until && ( - - - ), - }} - /> - - )} - - - - - + ), + }} + /> +

+ )} + {token.last_used && ( +

+ + ), + }} + /> +

+ )} + {token.valid_until && ( +

+ + ), + }} + /> +

+ )} +
+
+ +
); }; @@ -176,7 +164,7 @@ const AuthTokenListPage: React.FC = () => { }); const body = tokens ? ( -
+
{tokens.map((token) => (