chore: ran linting

This commit is contained in:
Anish Sarkar 2026-01-21 03:28:34 +05:30
parent 5a95a6b543
commit d35d89f3a9
2 changed files with 10 additions and 14 deletions

View file

@ -778,8 +778,7 @@ function RolesTab({
role.name === "Owner" && "text-amber-600", role.name === "Owner" && "text-amber-600",
role.name === "Editor" && "text-blue-600", role.name === "Editor" && "text-blue-600",
role.name === "Viewer" && "text-gray-600", role.name === "Viewer" && "text-gray-600",
!["Owner", "Editor", "Viewer"].includes(role.name) && !["Owner", "Editor", "Viewer"].includes(role.name) && "text-primary"
"text-primary"
)} )}
/> />
</div> </div>
@ -1488,7 +1487,8 @@ function CreateRoleDialog({
</div> </div>
</div> </div>
<p className="text-xs text-muted-foreground"> <p className="text-xs text-muted-foreground">
Use presets to quickly apply Editor (create/read/update) or Viewer (read-only) permissions Use presets to quickly apply Editor (create/read/update) or Viewer (read-only)
permissions
</p> </p>
<ScrollArea className="h-64 rounded-lg border p-4"> <ScrollArea className="h-64 rounded-lg border p-4">
<div className="space-y-4"> <div className="space-y-4">
@ -1500,9 +1500,7 @@ function CreateRoleDialog({
return ( return (
<div key={category} className="space-y-2"> <div key={category} className="space-y-2">
<label <label className="flex items-center gap-2 cursor-pointer hover:bg-muted/50 p-1 rounded w-full text-left">
className="flex items-center gap-2 cursor-pointer hover:bg-muted/50 p-1 rounded w-full text-left"
>
<Checkbox <Checkbox
checked={allSelected} checked={allSelected}
onCheckedChange={() => toggleCategory(category)} onCheckedChange={() => toggleCategory(category)}

View file

@ -38,12 +38,9 @@ const githubConnectorFormSchema = z.object({
github_pat: z github_pat: z
.string() .string()
.optional() .optional()
.refine( .refine((pat) => !pat || pat.startsWith("ghp_") || pat.startsWith("github_pat_"), {
(pat) => !pat || pat.startsWith("ghp_") || pat.startsWith("github_pat_"),
{
message: "GitHub PAT should start with 'ghp_' or 'github_pat_'", message: "GitHub PAT should start with 'ghp_' or 'github_pat_'",
} }),
),
repo_full_names: z.string().min(1, { repo_full_names: z.string().min(1, {
message: "At least one repository is required.", message: "At least one repository is required.",
}), }),
@ -114,14 +111,15 @@ export const GithubConnectForm: FC<ConnectFormProps> = ({ onSubmit, isSubmitting
<AlertTitle className="text-xs sm:text-sm">Personal Access Token (Optional)</AlertTitle> <AlertTitle className="text-xs sm:text-sm">Personal Access Token (Optional)</AlertTitle>
<AlertDescription className="text-[10px] sm:text-xs !pl-0"> <AlertDescription className="text-[10px] sm:text-xs !pl-0">
A GitHub PAT is only required for private repositories. Public repos work without a A GitHub PAT is only required for private repositories. Public repos work without a
token. {" "} token.{" "}
<a <a
href="https://github.com/settings/tokens/new?description=surfsense&scopes=repo" href="https://github.com/settings/tokens/new?description=surfsense&scopes=repo"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
className="font-medium underline underline-offset-4" className="font-medium underline underline-offset-4 inline-flex items-center gap-1.5"
> >
Get your token Get your token
<ExternalLink className="h-3 w-3 sm:h-4 sm:w-4" />
</a>{" "} </a>{" "}
</AlertDescription> </AlertDescription>
</div> </div>