Skip to content

Commit a50b4e3

Browse files
dbieberclaude
andauthored
Convert Blob Storage System to dropdown with Dropbox option (#102)
Update the Blob Storage System field in the settings UI to be a dropdown with Dropbox as an option. This ensures that when selected, it sets the value to 'dropbox' as expected by the backend. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 74f2ef5 commit a50b4e3

File tree

1 file changed

+27
-3
lines changed
  • gonotego/settings-server/src

1 file changed

+27
-3
lines changed

gonotego/settings-server/src/App.tsx

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ const SettingsUI = () => {
2121
{ display: 'Twitter', value: 'twitter' },
2222
{ display: 'Email', value: 'email' }
2323
];
24+
25+
const BLOB_STORAGE_SYSTEMS = [
26+
{ display: 'Dropbox', value: 'dropbox' }
27+
];
2428

2529
const [settings, setSettings] = useState({
2630
HOTKEY: '',
@@ -217,6 +221,11 @@ const SettingsUI = () => {
217221
const system = NOTE_TAKING_SYSTEMS.find(sys => sys.value === value);
218222
return system ? system.display : value;
219223
};
224+
225+
const getBlobStorageDisplayName = (value) => {
226+
const system = BLOB_STORAGE_SYSTEMS.find(sys => sys.value === value);
227+
return system ? system.display : value;
228+
};
220229

221230
return (
222231
<div className="w-full max-w-4xl mx-auto p-6 space-y-6">
@@ -303,10 +312,25 @@ const SettingsUI = () => {
303312
</div>
304313
<div className="grid gap-2">
305314
<label className="text-sm font-medium">Blob Storage System</label>
306-
<Input
315+
<Select
307316
value={settings.BLOB_STORAGE_SYSTEM}
308-
onChange={(e) => handleChange('BLOB_STORAGE_SYSTEM', e.target.value)}
309-
/>
317+
onValueChange={(value) => handleChange('BLOB_STORAGE_SYSTEM', value)}
318+
>
319+
<SelectTrigger>
320+
<SelectValue placeholder="Select a blob storage system">
321+
{settings.BLOB_STORAGE_SYSTEM ? getBlobStorageDisplayName(settings.BLOB_STORAGE_SYSTEM) : ""}
322+
</SelectValue>
323+
</SelectTrigger>
324+
<SelectContent>
325+
<SelectGroup>
326+
{BLOB_STORAGE_SYSTEMS.map(system => (
327+
<SelectItem key={system.value} value={system.value}>
328+
{system.display}
329+
</SelectItem>
330+
))}
331+
</SelectGroup>
332+
</SelectContent>
333+
</Select>
310334
</div>
311335
</CardContent>
312336
</Card>

0 commit comments

Comments
 (0)