mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00

* Removed recoil and replaced it with react-ridge-state, a 0.4kb alternative. * Added AuthContext and SettingsContext persistent localStorage states. * Fixed tailwind.config.js incorrect key directive. See https://tailwindcss.com/docs/content-configuration#safelisting-classes. * Changed darkMode in Tailwind to "class" and started manually adjusting the theme according to the appropriate media query. * Added possibility of changing the theme manually via the Settings tab. * Changed Releases.tsx behavior to show the UI only when the HTTP request succeeded and there is some data (i.e. table is non-empty). * Changed the table color of screens/filters/list.tsx to a one notch lighter shade of gray for eye-comfort. * Replaced "User" in the header, with the users real username. * Made data version, commit and date fields optional in settings/Application.tsx. * Started working on a RegExp playground, which works fine, but JS won't cooperate and return the right match length. Either way, the RegExp must be implemented on backend and then must be communicated with the frontend. Otherwise a potential for incorrect results exists. * Removed Layout.tsx, since it was redundant. * Created a Checkbox component class for easier and consistent future use. * Rewritten App.tsx, Login.tsx, Logout.tsx to accomodate for new changes. * Fixed previous mistake regarding tailwind.config.js purge key, since we're still using old postcss7 from October last year * Removed package-lock.json from both root and web directories. * Refresh TypeScript configuration to support a types/ directory containing d.ts. The effect of this is that types don't have to be imported anymore and are at all times available globally. This also unifies them into a single source of truth, which will be a lot easier to manage in the future. Note: Only certain interop types have been moved at the time of writing. * Fixed minor Checkbox argument mistake. * fix: remove length from data check * chore: lock files are annoying * fix: select * fix: wip release filtering
84 lines
No EOL
4.1 KiB
TypeScript
84 lines
No EOL
4.1 KiB
TypeScript
import React from "react";
|
|
|
|
|
|
function ActionSettings() {
|
|
// const [addClientIsOpen, toggleAddClient] = useToggle(false)
|
|
|
|
return (
|
|
<div className="divide-y divide-gray-200 lg:col-span-9">
|
|
|
|
|
|
<div className="py-6 px-4 sm:p-6 lg:pb-8">
|
|
{/*{addClientIsOpen &&*/}
|
|
{/*<AddNewClientForm isOpen={addClientIsOpen} toggle={toggleAddClient}/>*/}
|
|
{/*}*/}
|
|
<div className="-ml-4 -mt-4 flex justify-between items-center flex-wrap sm:flex-nowrap">
|
|
<div className="ml-4 mt-4">
|
|
<h3 className="text-lg leading-6 font-medium text-gray-900">Actions</h3>
|
|
<p className="mt-1 text-sm text-gray-500">
|
|
Manage actions.
|
|
</p>
|
|
</div>
|
|
<div className="ml-4 mt-4 flex-shrink-0">
|
|
<button
|
|
type="button"
|
|
className="relative inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
|
|
// onClick={toggleAddClient}
|
|
>
|
|
Add new
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div className="flex flex-col mt-6">
|
|
<div className="-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
|
|
<div className="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8">
|
|
<div className="shadow overflow-hidden border-b border-gray-200 sm:rounded-lg">
|
|
<table className="min-w-full divide-y divide-gray-200">
|
|
<thead className="bg-gray-50">
|
|
<tr>
|
|
<th
|
|
scope="col"
|
|
className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
|
|
>
|
|
Name
|
|
</th>
|
|
<th
|
|
scope="col"
|
|
className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
|
|
>
|
|
Type
|
|
</th>
|
|
<th
|
|
scope="col"
|
|
className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
|
|
>
|
|
Port
|
|
</th>
|
|
<th
|
|
scope="col"
|
|
className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
|
|
>
|
|
Enabled
|
|
</th>
|
|
<th scope="col" className="relative px-6 py-3">
|
|
<span className="sr-only">Edit</span>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>empty</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default ActionSettings; |