1
1
<script setup lang="ts">
2
- import { Alert , AlertDescription } from ' @/components/ui/alert' ;
3
2
import { Button } from ' @/components/ui/button' ;
4
3
import { Card , CardContent , CardDescription , CardHeader , CardTitle } from ' @/components/ui/card' ;
5
4
import { Input } from ' @/components/ui/input' ;
6
5
import { Label } from ' @/components/ui/label' ;
7
- import { toast } from ' @/hooks/use-toast' ;
8
6
import AppLayout from ' @/layouts/AppLayout.vue' ;
9
7
import SettingsLayout from ' @/layouts/settings/Layout.vue' ;
10
8
import { type BreadcrumbItem } from ' @/types' ;
@@ -42,10 +40,7 @@ const updateApiKey = () => {
42
40
onSuccess : () => {
43
41
form .reset ();
44
42
hasApiKey .value = true ;
45
- toast ({
46
- title: ' Success' ,
47
- description: ' Your OpenAI API key has been updated successfully.' ,
48
- });
43
+ alert (' Success: Your OpenAI API key has been updated successfully.' );
49
44
},
50
45
onFinish : () => {
51
46
isValidating .value = false ;
@@ -58,10 +53,7 @@ const deleteApiKey = () => {
58
53
form .delete (' /settings/api-keys' , {
59
54
onSuccess : () => {
60
55
hasApiKey .value = false ;
61
- toast ({
62
- title: ' API Key Deleted' ,
63
- description: ' Your OpenAI API key has been removed.' ,
64
- });
56
+ alert (' Your OpenAI API key has been removed.' );
65
57
},
66
58
});
67
59
}
@@ -128,12 +120,10 @@ const deleteApiKey = () => {
128
120
</p >
129
121
</div >
130
122
131
- <Alert v-if =" form.errors.openai_api_key" variant = " destructive " >
123
+ <div v-if =" form.errors.openai_api_key" class = " flex items-center gap-2 rounded-md border border-red-500 bg-red-50 p-3 text-sm text-red-800 dark:border-red-700 dark:bg-red-950 dark:text-red-200 " >
132
124
<AlertCircle class =" h-4 w-4" />
133
- <AlertDescription >
134
- {{ form.errors.openai_api_key }}
135
- </AlertDescription >
136
- </Alert >
125
+ <span >{{ form.errors.openai_api_key }}</span >
126
+ </div >
137
127
</CardContent >
138
128
139
129
<CardFooter class =" flex gap-3" >
0 commit comments