mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-21 01:16:49 +00:00
fix: correct lint
This commit is contained in:
@@ -20,8 +20,8 @@ export const PamResourcesPage = () => {
|
||||
I={ProjectPermissionPamAccountActions.Read}
|
||||
a={ProjectPermissionSub.PamResources}
|
||||
>
|
||||
<div className="bg-bunker-800 h-full">
|
||||
<div className="bg-bunker-800 container mx-auto flex flex-col justify-between text-white">
|
||||
<div className="h-full bg-bunker-800">
|
||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
||||
<PageHeader
|
||||
title="Resources"
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ export const GenericResourceFields = () => {
|
||||
<Select
|
||||
value={value || (null as unknown as string)}
|
||||
onValueChange={onChange}
|
||||
className="border-mineshaft-500 w-full border"
|
||||
className="w-full border border-mineshaft-500"
|
||||
dropdownContainerClassName="max-w-none"
|
||||
isLoading={isGatewaysLoading}
|
||||
placeholder="Select a Gateway..."
|
||||
|
||||
+9
-9
@@ -17,11 +17,11 @@ export const SqlResourceFields = ({ setSelectedTabIndex, selectedTabIndex }: Pro
|
||||
const sslEnabled = watch("connectionDetails.sslEnabled");
|
||||
return (
|
||||
<Tab.Group selectedIndex={selectedTabIndex} onChange={setSelectedTabIndex}>
|
||||
<Tab.List className="-pb-1 border-mineshaft-600 mb-6 w-full border-b-2">
|
||||
<Tab.List className="-pb-1 mb-6 w-full border-b-2 border-mineshaft-600">
|
||||
<Tab
|
||||
className={({ selected }) =>
|
||||
`outline-hidden -mb-[0.14rem] whitespace-nowrap px-4 py-2 text-sm font-medium disabled:opacity-60 ${
|
||||
selected ? "border-mineshaft-300 text-mineshaft-200 border-b-2" : "text-bunker-300"
|
||||
`-mb-[0.14rem] px-4 py-2 text-sm font-medium whitespace-nowrap outline-hidden disabled:opacity-60 ${
|
||||
selected ? "border-b-2 border-mineshaft-300 text-mineshaft-200" : "text-bunker-300"
|
||||
}`
|
||||
}
|
||||
>
|
||||
@@ -29,15 +29,15 @@ export const SqlResourceFields = ({ setSelectedTabIndex, selectedTabIndex }: Pro
|
||||
</Tab>
|
||||
<Tab
|
||||
className={({ selected }) =>
|
||||
`outline-hidden -mb-[0.14rem] whitespace-nowrap px-4 py-2 text-sm font-medium disabled:opacity-60 ${
|
||||
selected ? "border-mineshaft-300 text-mineshaft-200 border-b-2" : "text-bunker-300"
|
||||
`-mb-[0.14rem] px-4 py-2 text-sm font-medium whitespace-nowrap outline-hidden disabled:opacity-60 ${
|
||||
selected ? "border-b-2 border-mineshaft-300 text-mineshaft-200" : "text-bunker-300"
|
||||
}`
|
||||
}
|
||||
>
|
||||
SSL ({sslEnabled ? "Enabled" : "Disabled"})
|
||||
</Tab>
|
||||
</Tab.List>
|
||||
<Tab.Panels className="border-mineshaft-600 bg-mineshaft-700/70 mb-4 rounded-sm border p-3 pb-0">
|
||||
<Tab.Panels className="mb-4 rounded-sm border border-mineshaft-600 bg-mineshaft-700/70 p-3 pb-0">
|
||||
<Tab.Panel>
|
||||
<div className="mt-[0.675rem] flex items-start gap-2">
|
||||
<Controller
|
||||
@@ -91,7 +91,7 @@ export const SqlResourceFields = ({ setSelectedTabIndex, selectedTabIndex }: Pro
|
||||
render={({ field: { value, onChange }, fieldState: { error } }) => (
|
||||
<FormControl isError={Boolean(error?.message)} errorText={error?.message}>
|
||||
<Switch
|
||||
className="bg-mineshaft-400/50 data-[state=checked]:bg-green/80 shadow-inner"
|
||||
className="bg-mineshaft-400/50 shadow-inner data-[state=checked]:bg-green/80"
|
||||
id="ssl-enabled"
|
||||
thumbClassName="bg-mineshaft-800"
|
||||
isChecked={value}
|
||||
@@ -113,7 +113,7 @@ export const SqlResourceFields = ({ setSelectedTabIndex, selectedTabIndex }: Pro
|
||||
label="SSL Certificate"
|
||||
isOptional
|
||||
>
|
||||
<TextArea className="resize-none! h-14" {...field} isDisabled={!sslEnabled} />
|
||||
<TextArea className="h-14 resize-none!" {...field} isDisabled={!sslEnabled} />
|
||||
</FormControl>
|
||||
)}
|
||||
/>
|
||||
@@ -127,7 +127,7 @@ export const SqlResourceFields = ({ setSelectedTabIndex, selectedTabIndex }: Pro
|
||||
errorText={error?.message}
|
||||
>
|
||||
<Switch
|
||||
className="bg-mineshaft-400/50 data-[state=checked]:bg-green/80 shadow-inner"
|
||||
className="bg-mineshaft-400/50 shadow-inner data-[state=checked]:bg-green/80"
|
||||
id="ssl-reject-unauthorized"
|
||||
thumbClassName="bg-mineshaft-800"
|
||||
isChecked={sslEnabled ? value : false}
|
||||
|
||||
@@ -9,20 +9,20 @@ export const PamResourceHeader = ({ resourceType, onBack }: Props) => {
|
||||
const details = PAM_RESOURCE_TYPE_MAP[resourceType];
|
||||
|
||||
return (
|
||||
<div className="border-mineshaft-500 mb-4 flex w-full items-start gap-2 border-b pb-4">
|
||||
<div className="mb-4 flex w-full items-start gap-2 border-b border-mineshaft-500 pb-4">
|
||||
<img
|
||||
alt={`${details.name} logo`}
|
||||
src={`/images/integrations/${details.image}`}
|
||||
className="bg-bunker-500 h-12 w-12 rounded-md p-2"
|
||||
className="h-12 w-12 rounded-md bg-bunker-500 p-2"
|
||||
/>
|
||||
<div>
|
||||
<div className="text-mineshaft-300 flex items-center">{details.name}</div>
|
||||
<p className="text-mineshaft-400 text-sm leading-4">Resource</p>
|
||||
<div className="flex items-center text-mineshaft-300">{details.name}</div>
|
||||
<p className="text-sm leading-4 text-mineshaft-400">Resource</p>
|
||||
</div>
|
||||
{onBack && (
|
||||
<button
|
||||
type="button"
|
||||
className="text-mineshaft-400 hover:text-mineshaft-300 ml-auto mt-1 text-xs underline underline-offset-2"
|
||||
className="mt-1 ml-auto text-xs text-mineshaft-400 underline underline-offset-2 hover:text-mineshaft-300"
|
||||
onClick={onBack}
|
||||
>
|
||||
Select another resource type
|
||||
|
||||
@@ -40,7 +40,7 @@ export const PamResourceRow = ({ resource, onUpdate, onDelete, search }: Props)
|
||||
<span>
|
||||
<HighlightText text={name} highlight={search} />
|
||||
</span>
|
||||
<Badge className="bg-mineshaft-400/50 text-bunker-300 flex h-5 w-min items-center gap-1.5 whitespace-nowrap">
|
||||
<Badge className="flex h-5 w-min items-center gap-1.5 bg-mineshaft-400/50 whitespace-nowrap text-bunker-300">
|
||||
<span>
|
||||
<HighlightText text={resourceTypeName} highlight={search} />
|
||||
</span>
|
||||
|
||||
@@ -178,14 +178,14 @@ export const PamResourcesTable = ({ projectId, resources }: Props) => {
|
||||
variant="plain"
|
||||
size="sm"
|
||||
className={twMerge(
|
||||
"border-mineshaft-600 bg-mineshaft-800 hover:border-primary/60 hover:bg-primary/10 flex h-10 w-11 items-center justify-center overflow-hidden border p-0 transition-all",
|
||||
"flex h-10 w-11 items-center justify-center overflow-hidden border border-mineshaft-600 bg-mineshaft-800 p-0 transition-all hover:border-primary/60 hover:bg-primary/10",
|
||||
isTableFiltered && "border-primary/50 text-primary"
|
||||
)}
|
||||
>
|
||||
<FontAwesomeIcon icon={faFilter} />
|
||||
</IconButton>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent className="thin-scrollbar max-h-[70vh] overflow-y-auto" align="end">
|
||||
<DropdownMenuContent className="max-h-[70vh] thin-scrollbar overflow-y-auto" align="end">
|
||||
<DropdownMenuLabel>Resource Type</DropdownMenuLabel>
|
||||
{resources.length ? (
|
||||
[...new Set(resources.map(({ resourceType }) => resourceType))].map((type) => {
|
||||
|
||||
@@ -81,7 +81,7 @@ export const ResourceTypeSelect = ({ onSelect }: Props) => {
|
||||
return (
|
||||
<div className="flex h-full flex-col items-center justify-center py-2.5">
|
||||
<Spinner size="lg" className="text-mineshaft-500" />
|
||||
<p className="text-mineshaft-400 mt-4 text-sm">Loading options...</p>
|
||||
<p className="mt-4 text-sm text-mineshaft-400">Loading options...</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -95,7 +95,7 @@ export const ResourceTypeSelect = ({ onSelect }: Props) => {
|
||||
placeholder="Search options..."
|
||||
className="bg-mineshaft-800 placeholder:text-mineshaft-400"
|
||||
/>
|
||||
<div className="h-118 grid grid-cols-4 content-start gap-2">
|
||||
<div className="grid h-118 grid-cols-4 content-start gap-2">
|
||||
{filteredOptions.slice(offset, perPage * page)?.map((option) => {
|
||||
const { image, name, size = 50 } = PAM_RESOURCE_TYPE_MAP[option.resource];
|
||||
|
||||
@@ -103,7 +103,7 @@ export const ResourceTypeSelect = ({ onSelect }: Props) => {
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => handleResourceSelect(option.resource)}
|
||||
className="border-mineshaft-600 bg-mineshaft-700 hover:bg-mineshaft-600 group relative flex h-28 cursor-pointer flex-col items-center justify-center rounded-md border p-4 duration-200"
|
||||
className="group relative flex h-28 cursor-pointer flex-col items-center justify-center rounded-md border border-mineshaft-600 bg-mineshaft-700 p-4 duration-200 hover:bg-mineshaft-600"
|
||||
>
|
||||
<div className="relative">
|
||||
<img
|
||||
@@ -142,7 +142,7 @@ export const ResourceTypeSelect = ({ onSelect }: Props) => {
|
||||
{"If you don't see the resource you're looking for,"}{" "}
|
||||
<a
|
||||
target="_blank"
|
||||
className="hover:text-mineshaft-300 underline"
|
||||
className="underline hover:text-mineshaft-300"
|
||||
href="https://infisical.com/slack"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
@@ -151,7 +151,7 @@ export const ResourceTypeSelect = ({ onSelect }: Props) => {
|
||||
or{" "}
|
||||
<a
|
||||
target="_blank"
|
||||
className="hover:text-mineshaft-300 underline"
|
||||
className="underline hover:text-mineshaft-300"
|
||||
href="https://github.com/Infisical/infisical/discussions"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
@@ -162,7 +162,7 @@ export const ResourceTypeSelect = ({ onSelect }: Props) => {
|
||||
</>
|
||||
}
|
||||
>
|
||||
<div className="text-mineshaft-400 -ml-3 flex items-center gap-1.5">
|
||||
<div className="-ml-3 flex items-center gap-1.5 text-mineshaft-400">
|
||||
<span className="text-xs">Don't see the resource you're looking for?</span>
|
||||
<FontAwesomeIcon size="xs" icon={faInfoCircle} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user