diff --git a/web/src/screens/settings/Api.tsx b/web/src/screens/settings/Api.tsx index f659e05..db4f4ee 100644 --- a/web/src/screens/settings/Api.tsx +++ b/web/src/screens/settings/Api.tsx @@ -15,24 +15,22 @@ import { EmptySimple } from "../../components/emptystates"; function APISettings() { const [addFormIsOpen, toggleAddForm] = useToggle(false); - const { data } = useQuery( - ["apikeys"], - () => APIClient.apikeys.getAll(), - { - retry: false, - refetchOnWindowFocus: false, - onError: err => console.log(err) - } - ); + const { data } = useQuery(["apikeys"], () => APIClient.apikeys.getAll(), { + retry: false, + refetchOnWindowFocus: false, + onError: (err) => console.log(err) + }); return (
- +
-

API keys

+

+ API keys +

Manage API keys.

@@ -48,32 +46,36 @@ function APISettings() {
- {data && data.length > 0 ? + {data && data.length > 0 ? (
    -
  1. -
    Name +
  2. +
    + Name
    -
    Key +
    + Key
  3. - {data && data.map((k) => ( - - ))} + {data && data.map((k) => )}
- : } + ) : ( + + )}
); } interface ApiKeyItemProps { - apikey: APIKey + apikey: APIKey; } function APIListItem({ apikey }: ApiKeyItemProps) { @@ -87,7 +89,13 @@ function APIListItem({ apikey }: ApiKeyItemProps) { queryClient.invalidateQueries(["apikeys"]); queryClient.invalidateQueries(["apikeys", apikey.key]); - toast.custom((t) => ); + toast.custom((t) => ( + + )); } } ); @@ -106,15 +114,32 @@ function APIListItem({ apikey }: ApiKeyItemProps) { text="Are you sure you want to remove this API key? This action cannot be undone." /> -
-
- {apikey.name} +
+
+
+
{apikey.name}
+
+ +
+
- +
-
+
@@ -134,4 +156,4 @@ function APIListItem({ apikey }: ApiKeyItemProps) { ); } -export default APISettings; \ No newline at end of file +export default APISettings; diff --git a/web/src/screens/settings/DownloadClient.tsx b/web/src/screens/settings/DownloadClient.tsx index ea08219..7f89d38 100644 --- a/web/src/screens/settings/DownloadClient.tsx +++ b/web/src/screens/settings/DownloadClient.tsx @@ -14,7 +14,7 @@ interface DLSettingsItemProps { idx: number; } -function DownloadClientSettingsListItem({ client, idx }: DLSettingsItemProps) { +function DownloadClientSettingsListItem({ client }: DLSettingsItemProps) { const [updateClientIsOpen, toggleUpdateClient] = useToggle(false); const queryClient = useQueryClient(); @@ -37,13 +37,13 @@ function DownloadClientSettingsListItem({ client, idx }: DLSettingsItemProps) { return (
  • -
    +
    -
    +
    -
    {client.name}
    -
    {client.host}
    -
    {DownloadClientTypeNameMap[client.type]}
    -
    +
    {client.name}
    +
    {client.host}
    +
    {DownloadClientTypeNameMap[client.type]}
    +
    Edit @@ -104,7 +104,7 @@ function DownloadClientSettings() {