Skip to content

Commit 7397e33

Browse files
committed
feat(app): rename providers to connection, enhance UX
1 parent f6ffa9e commit 7397e33

File tree

8 files changed

+219
-172
lines changed

8 files changed

+219
-172
lines changed

src/components/Settings/Sections/Models/AddProviderDialog.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ const AddProvider = ({
8282

8383
setProviders((prev) => [...prev, data]);
8484

85-
toast.success('Provider added successfully.');
85+
toast.success('Connection added successfully.');
8686
} catch (error) {
8787
console.error('Error adding provider:', error);
88-
toast.error('Failed to add provider.');
88+
toast.error('Failed to add connection.');
8989
} finally {
9090
setLoading(false);
9191
setOpen(false);
@@ -99,7 +99,7 @@ const AddProvider = ({
9999
className="px-3 md:px-4 py-1.5 md:py-2 rounded-lg text-xs sm:text-sm border border-light-200 dark:border-dark-200 text-black dark:text-white bg-light-secondary/50 dark:bg-dark-secondary/50 hover:bg-light-secondary hover:dark:bg-dark-secondary hover:border-light-300 hover:dark:border-dark-300 flex flex-row items-center space-x-1 active:scale-95 transition duration-200"
100100
>
101101
<Plus className="w-3.5 h-3.5 md:w-4 md:h-4" />
102-
<span>Add Provider</span>
102+
<span>Add Connection</span>
103103
</button>
104104
<AnimatePresence>
105105
{open && (
@@ -120,15 +120,15 @@ const AddProvider = ({
120120
<form onSubmit={handleSubmit} className="flex flex-col flex-1">
121121
<div className="px-6 pt-6 pb-4">
122122
<h3 className="text-black/90 dark:text-white/90 font-medium">
123-
Add new provider
123+
Add new connection
124124
</h3>
125125
</div>
126126
<div className="border-t border-light-200 dark:border-dark-200" />
127127
<div className="flex-1 overflow-y-auto px-6 py-4">
128128
<div className="flex flex-col space-y-4">
129129
<div className="flex flex-col items-start space-y-2">
130130
<label className="text-xs text-black/70 dark:text-white/70">
131-
Select provider type
131+
Select connection type
132132
</label>
133133
<Select
134134
value={selectedProvider ?? ''}
@@ -149,13 +149,13 @@ const AddProvider = ({
149149
className="flex flex-col items-start space-y-2"
150150
>
151151
<label className="text-xs text-black/70 dark:text-white/70">
152-
Name*
152+
Connection Name*
153153
</label>
154154
<input
155155
value={name}
156156
onChange={(e) => setName(e.target.value)}
157157
className="w-full rounded-lg border border-light-200 dark:border-dark-200 bg-light-primary dark:bg-dark-primary px-4 py-3 pr-10 text-sm text-black/80 dark:text-white/80 placeholder:text-black/40 dark:placeholder:text-white/40 focus-visible:outline-none focus-visible:border-light-300 dark:focus-visible:border-dark-300 transition-colors disabled:cursor-not-allowed disabled:opacity-60"
158-
placeholder={'Provider Name'}
158+
placeholder={'e.g., My OpenAI Connection'}
159159
type="text"
160160
required={true}
161161
/>
@@ -199,7 +199,7 @@ const AddProvider = ({
199199
{loading ? (
200200
<Loader2 className="animate-spin" size={16} />
201201
) : (
202-
'Add Provider'
202+
'Add Connection'
203203
)}
204204
</button>
205205
</div>

src/components/Settings/Sections/Models/DeleteProviderDialog.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ const DeleteProvider = ({
3434
return prev.filter((p) => p.id !== modelProvider.id);
3535
});
3636

37-
toast.success('Provider deleted successfully.');
37+
toast.success('Connection deleted successfully.');
3838
} catch (error) {
3939
console.error('Error deleting provider:', error);
40-
toast.error('Failed to delete provider.');
40+
toast.error('Failed to delete connection.');
4141
} finally {
4242
setLoading(false);
4343
}
@@ -51,7 +51,7 @@ const DeleteProvider = ({
5151
setOpen(true);
5252
}}
5353
className="group p-1.5 rounded-md hover:bg-light-200 hover:dark:bg-dark-200 transition-colors group"
54-
title="Delete provider"
54+
title="Delete connection"
5555
>
5656
<Trash2
5757
size={14}
@@ -76,14 +76,15 @@ const DeleteProvider = ({
7676
<DialogPanel className="w-full mx-4 lg:w-[600px] max-h-[85vh] flex flex-col border bg-light-primary dark:bg-dark-primary border-light-secondary dark:border-dark-secondary rounded-lg">
7777
<div className="px-6 pt-6 pb-4">
7878
<h3 className="text-black/90 dark:text-white/90 font-medium">
79-
Delete provider
79+
Delete connection
8080
</h3>
8181
</div>
8282
<div className="border-t border-light-200 dark:border-dark-200" />
8383
<div className="flex-1 overflow-y-auto px-6 py-4">
84-
<p className="text-SM text-black/60 dark:text-white/60">
85-
Are you sure you want to delete the provider &quot;
84+
<p className="text-sm text-black/60 dark:text-white/60">
85+
Are you sure you want to delete the connection &quot;
8686
{modelProvider.name}&quot;? This action cannot be undone.
87+
All associated models will also be removed.
8788
</p>
8889
</div>
8990
<div className="px-6 py-6 flex justify-end space-x-2">

0 commit comments

Comments
 (0)