feat: set menu card max-w .

- fix: program crashing when OIDC provider request fails.
This commit is contained in:
Abhinav Raut
2024-08-26 03:30:09 +05:30
parent 7056ed04db
commit f42824aceb
4 changed files with 7 additions and 6 deletions
@@ -1,6 +1,6 @@
<template>
<div
class="box flex-1 rounded-lg px-8 py-4 transition-shadow duration-170 cursor-pointer hover:bg-muted"
class="box flex-1 rounded-lg px-8 py-4 transition-shadow duration-170 cursor-pointer hover:bg-muted max-w-80"
@click="handleClick"
>
<div class="flex items-center mb-4">
@@ -7,7 +7,7 @@
<DialogTrigger as-child>
<Button size="sm">New canned response</Button>
</DialogTrigger>
<DialogContent class="sm:max-w-[425px]">
<DialogContent class="sm:max-w-[625px]">
<DialogHeader>
<DialogTitle>Add a canned response</DialogTitle>
<DialogDescription> Set canned response name. Click save when you're done. </DialogDescription>
@@ -27,7 +27,7 @@
<FormItem>
<FormLabel>Content</FormLabel>
<FormControl>
<Textarea v-bind="componentField" />
<Textarea v-bind="componentField" class="h-52"></Textarea>
</FormControl>
<FormDescription></FormDescription>
<FormMessage />
@@ -14,7 +14,7 @@
<DropdownMenuItem @click="deleteCannedResponse"> Delete </DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
<DialogContent class="sm:max-w-[425px]">
<DialogContent class="sm:max-w-[625px]">
<DialogHeader>
<DialogTitle>Edit canned response</DialogTitle>
<DialogDescription>Click save when you're done. </DialogDescription>
@@ -34,7 +34,7 @@
<FormItem>
<FormLabel>Content</FormLabel>
<FormControl>
<Textarea v-bind="componentField" />
<Textarea v-bind="componentField" class="h-52"></Textarea>
</FormControl>
<FormDescription></FormDescription>
<FormMessage />
+2 -1
View File
@@ -56,7 +56,8 @@ func New(cfg Config, rd *redis.Client, logger *logf.Logger) (*Auth, error) {
for _, provider := range cfg.Providers {
oidcProv, err := oidc.NewProvider(context.Background(), provider.ProviderURL)
if err != nil {
return nil, fmt.Errorf("initializing `%s` oidc login: %v", provider.Provider, err)
logger.Error("error initializing oidc provider", "error", err, "provider", provider.Provider)
continue
}
oauthCfg := oauth2.Config{