🧹 Formatting in connection confirmation panels

This commit is contained in:
2023-12-16 22:39:29 -05:00
parent 5ffcb0d642
commit 1180a2b42c
3 changed files with 12 additions and 10 deletions

View File

@@ -29,9 +29,7 @@ export const AirDCPPSettingsConfirmation = (settingsObject): ReactElement => {
<dt>Active Sessions: {settings.user.active_sessions}</dt> <dt>Active Sessions: {settings.user.active_sessions}</dt>
<dt> <dt>
Permissions:{" "} Permissions:{" "}
<pre> {JSON.stringify(settings.user.permissions, undefined, 2)}
{JSON.stringify(settings.user.permissions, undefined, 2)}
</pre>
</dt> </dt>
</dl> </dl>
</p> </p>

View File

@@ -37,7 +37,6 @@ export const QbittorrentConnectionForm = (): ReactElement => {
}), }),
enabled: !!connectionDetails, enabled: !!connectionDetails,
}); });
console.log(qbittorrentClientInfo);
// Update action using a mutation // Update action using a mutation
const { mutate } = useMutation({ const { mutate } = useMutation({
mutationFn: async (values) => mutationFn: async (values) =>
@@ -47,7 +46,9 @@ export const QbittorrentConnectionForm = (): ReactElement => {
data: { settingsPayload: values, settingsKey: "bittorrent" }, data: { settingsPayload: values, settingsKey: "bittorrent" },
}), }),
onSuccess: () => { onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ["settings"] }); queryClient.invalidateQueries({
queryKey: ["settings", "qbittorrentClientInfo"],
});
}, },
}); });
@@ -80,9 +81,9 @@ export const QbittorrentConnectionForm = (): ReactElement => {
</span> </span>
<p className="whitespace-nowrap text-sm">Connected</p> <p className="whitespace-nowrap text-sm">Connected</p>
</span> </span>
<p className="font-hasklig text-sm text-slate-700 dark:text-slate-700"> <pre className="font-hasklig text-sm text-slate-700 dark:text-slate-700">
<pre> {JSON.stringify(qbittorrentClientInfo?.data, null, 4)}</pre> {JSON.stringify(qbittorrentClientInfo?.data, null, 4)}
</p> </pre>
</div> </div>
</> </>
); );

View File

@@ -71,7 +71,10 @@ export const Settings = (props: ISettingsProps): ReactElement => {
<aside className="px-4 py-4 sm:px-6 sm:py-8 lg:px-8"> <aside className="px-4 py-4 sm:px-6 sm:py-8 lg:px-8">
{map(settingsObject, (settingObject, idx) => { {map(settingsObject, (settingObject, idx) => {
return ( return (
<div className="w-64 py-2 text-slate" key={idx}> <div
className="w-64 py-2 text-slate-700 dark:text-slate-400"
key={idx}
>
<h3 className="text-l pb-2"> <h3 className="text-l pb-2">
{settingObject.category.toUpperCase()} {settingObject.category.toUpperCase()}
</h3> </h3>
@@ -93,7 +96,7 @@ export const Settings = (props: ISettingsProps): ReactElement => {
</a> </a>
{/* Second level children */} {/* Second level children */}
{!isUndefined(item.children) ? ( {!isUndefined(item.children) ? (
<ul className="pl-4"> <ul className="pl-4 mt-2">
{map(item.children, (item, idx) => ( {map(item.children, (item, idx) => (
<li key={item.id} className="mb-2"> <li key={item.id} className="mb-2">
<a <a