Add asterisks near required fields in Settings forms

This commit is contained in:
Alex Gleason committed 2025-12-03 00:33:05 -06:00
1 parent 43ad67b048
commit 69d8dfa9cd
6 files changed
+80 -28

No files matched your search

+15 -5
View File
@@ -217,7 +217,9 @@ export function MCPServersSection() {
<AccordionContent className="px-4 pb-4">
<div className="space-y-3">
<div className="grid gap-2">
<Label htmlFor={`${name}-type`}>{t('mcpServerType')}</Label>
<Label htmlFor={`${name}-type`}>
{t('mcpServerType')} <span className="text-destructive">*</span>
</Label>
<Select value={server.type} disabled>
<SelectTrigger>
<SelectValue />
@@ -228,7 +230,9 @@ export function MCPServersSection() {
</Select>
</div>
<div className="grid gap-2">
<Label htmlFor={`${name}-url`}>{t('mcpServerUrl')}</Label>
<Label htmlFor={`${name}-url`}>
{t('mcpServerUrl')} <span className="text-destructive">*</span>
</Label>
<Input
id={`${name}-url`}
value={server.url}
@@ -271,7 +275,9 @@ export function MCPServersSection() {
{t('mcpServerDescription')}
</p>
<div className="grid gap-2">
<Label htmlFor="new-server-name">{t('mcpServerName')}</Label>
<Label htmlFor="new-server-name">
{t('mcpServerName')} <span className="text-destructive">*</span>
</Label>
<Input
id="new-server-name"
placeholder="e.g., my-mcp-server"
@@ -280,7 +286,9 @@ export function MCPServersSection() {
/>
</div>
<div className="grid gap-2">
<Label htmlFor="new-server-type">{t('mcpServerType')}</Label>
<Label htmlFor="new-server-type">
{t('mcpServerType')} <span className="text-destructive">*</span>
</Label>
<Select value={serverType} disabled>
<SelectTrigger>
<SelectValue />
@@ -294,7 +302,9 @@ export function MCPServersSection() {
</p>
</div>
<div className="grid gap-2">
<Label htmlFor="new-server-url">{t('mcpServerUrl')}</Label>
<Label htmlFor="new-server-url">
{t('mcpServerUrl')} <span className="text-destructive">*</span>
</Label>
<Input
id="new-server-url"
placeholder="https://example.com/mcp"
+3 -1
View File
@@ -121,7 +121,9 @@ export function PluginsSection() {
<AccordionContent className="px-4 pb-4">
<div className="space-y-3">
<div className="grid gap-2">
<Label htmlFor="plugin-git-url">{t('gitRepositoryUrl')}</Label>
<Label htmlFor="plugin-git-url">
{t('gitRepositoryUrl')} <span className="text-destructive">*</span>
</Label>
<Input
id="plugin-git-url"
placeholder="https://github.com/user/plugin.git"
+18 -6
View File
@@ -92,7 +92,9 @@ function SortableTemplateItem({
<AccordionContent className="px-4 pb-4">
<div className="space-y-3">
<div className="grid gap-2">
<Label htmlFor={`template-name-${index}`}>{t('templateName')}</Label>
<Label htmlFor={`template-name-${index}`}>
{t('templateName')} <span className="text-destructive">*</span>
</Label>
<Input
id={`template-name-${index}`}
placeholder="MKStack"
@@ -101,7 +103,9 @@ function SortableTemplateItem({
/>
</div>
<div className="grid gap-2">
<Label htmlFor={`template-description-${index}`}>{t('templateDescription')}</Label>
<Label htmlFor={`template-description-${index}`}>
{t('templateDescription')} <span className="text-destructive">*</span>
</Label>
<Textarea
id={`template-description-${index}`}
placeholder="Build Nostr clients with React."
@@ -111,7 +115,9 @@ function SortableTemplateItem({
/>
</div>
<div className="grid gap-2">
<Label htmlFor={`template-url-${index}`}>{t('templateGitUrl')}</Label>
<Label htmlFor={`template-url-${index}`}>
{t('templateGitUrl')} <span className="text-destructive">*</span>
</Label>
<Input
id={`template-url-${index}`}
type="url"
@@ -300,7 +306,9 @@ export function ProjectTemplatesSection() {
<AccordionContent className="px-4 pb-4">
<div className="space-y-3">
<div className="grid gap-2">
<Label htmlFor="new-template-name">{t('templateName')}</Label>
<Label htmlFor="new-template-name">
{t('templateName')} <span className="text-destructive">*</span>
</Label>
<Input
id="new-template-name"
placeholder="MKStack"
@@ -309,7 +317,9 @@ export function ProjectTemplatesSection() {
/>
</div>
<div className="grid gap-2">
<Label htmlFor="new-template-description">{t('templateDescription')}</Label>
<Label htmlFor="new-template-description">
{t('templateDescription')} <span className="text-destructive">*</span>
</Label>
<Textarea
id="new-template-description"
placeholder="Build Nostr clients with React."
@@ -319,7 +329,9 @@ export function ProjectTemplatesSection() {
/>
</div>
<div className="grid gap-2">
<Label htmlFor="new-template-url">{t('templateGitUrl')}</Label>
<Label htmlFor="new-template-url">
{t('templateGitUrl')} <span className="text-destructive">*</span>
</Label>
<Input
id="new-template-url"
type="url"
+6 -2
View File
@@ -112,7 +112,9 @@ function SortableProviderItem({ provider, preset, onRemove, onSetProvider, onOpe
<AccordionContent className="px-4 pb-4">
<div className="space-y-3">
<div className="grid gap-2">
<Label htmlFor={`${provider.id}-name`}>{t('name')}</Label>
<Label htmlFor={`${provider.id}-name`}>
{t('name')} <span className="text-destructive">*</span>
</Label>
<Input
id={`${provider.id}-name`}
placeholder={preset?.name || provider.id}
@@ -121,7 +123,9 @@ function SortableProviderItem({ provider, preset, onRemove, onSetProvider, onOpe
/>
</div>
<div className="grid gap-2">
<Label htmlFor={`${provider.id}-baseURL`}>{t('baseUrl')}</Label>
<Label htmlFor={`${provider.id}-baseURL`}>
{t('baseUrl')} <span className="text-destructive">*</span>
</Label>
<Input
id={`${provider.id}-baseURL`}
placeholder="https://api.example.com/v1"
+20 -8
View File
@@ -116,7 +116,9 @@ function SortableProviderItem({ provider, index, preset, onRemove, onUpdate, sho
<AccordionContent className="px-4 pb-4">
<div className="space-y-3">
<div className="grid gap-2">
<Label htmlFor={`provider-${index}-name`}>Name</Label>
<Label htmlFor={`provider-${index}-name`}>
Name <span className="text-destructive">*</span>
</Label>
<Input
id={`provider-${index}-name`}
placeholder="Provider name"
@@ -144,7 +146,9 @@ function SortableProviderItem({ provider, index, preset, onRemove, onUpdate, sho
) : provider.type === 'nsite' ? (
<>
<div className="grid gap-2">
<Label htmlFor={`provider-${index}-gateway`}>Gateway</Label>
<Label htmlFor={`provider-${index}-gateway`}>
Gateway <span className="text-destructive">*</span>
</Label>
<Input
id={`provider-${index}-gateway`}
placeholder="nsite.lol"
@@ -153,7 +157,9 @@ function SortableProviderItem({ provider, index, preset, onRemove, onUpdate, sho
/>
</div>
<div className="grid gap-2">
<Label htmlFor={`provider-${index}-relays`}>Relay URLs (comma-separated)</Label>
<Label htmlFor={`provider-${index}-relays`}>
Relay URLs (comma-separated) <span className="text-destructive">*</span>
</Label>
<Input
id={`provider-${index}-relays`}
placeholder="wss://relay.nostr.band, wss://relay.damus.io"
@@ -165,7 +171,9 @@ function SortableProviderItem({ provider, index, preset, onRemove, onUpdate, sho
/>
</div>
<div className="grid gap-2">
<Label htmlFor={`provider-${index}-blossom`}>Blossom Servers (comma-separated)</Label>
<Label htmlFor={`provider-${index}-blossom`}>
Blossom Servers (comma-separated) <span className="text-destructive">*</span>
</Label>
<Input
id={`provider-${index}-blossom`}
placeholder="https://blossom.primal.net/"
@@ -181,7 +189,7 @@ function SortableProviderItem({ provider, index, preset, onRemove, onUpdate, sho
<>
<div className="grid gap-2">
<Label htmlFor={`provider-${index}-apiKey`}>
{preset?.apiKeyLabel || t('apiKey')}
{preset?.apiKeyLabel || t('apiKey')} <span className="text-destructive">*</span>
</Label>
<PasswordInput
id={`provider-${index}-apiKey`}
@@ -746,7 +754,9 @@ export function DeploySettings() {
<AccordionContent className="px-4 pb-4">
<div className="space-y-3">
<div className="grid gap-2">
<Label htmlFor="custom-provider-type">{t('providerType')}</Label>
<Label htmlFor="custom-provider-type">
{t('providerType')} <span className="text-destructive">*</span>
</Label>
<Select
value={customProviderType}
onValueChange={(value: 'shakespeare' | 'netlify' | 'vercel' | 'nsite') => {
@@ -776,7 +786,9 @@ export function DeploySettings() {
{customProviderType && (
<>
<div className="grid gap-2">
<Label htmlFor="custom-name">{t('providerName')}</Label>
<Label htmlFor="custom-name">
{t('providerName')} <span className="text-destructive">*</span>
</Label>
<Input
id="custom-name"
placeholder="e.g., My Production Deploy"
@@ -837,7 +849,7 @@ export function DeploySettings() {
<>
<div className="grid gap-2">
<Label htmlFor="custom-apikey">
{customProviderType === 'netlify' ? 'Personal Access Token' : 'Access Token'}
{customProviderType === 'netlify' ? 'Personal Access Token' : 'Access Token'} <span className="text-destructive">*</span>
</Label>
<PasswordInput
id="custom-apikey"
+18 -6
View File
@@ -174,7 +174,9 @@ export function GitSettings() {
<AccordionContent className="px-4 pb-4">
<div className="space-y-3">
<div className="grid gap-2">
<Label htmlFor={`${origin}-origin`}>{t('origin')}</Label>
<Label htmlFor={`${origin}-origin`}>
{t('origin')} <span className="text-destructive">*</span>
</Label>
<Input
id={`${origin}-origin`}
placeholder="https://github.com"
@@ -184,7 +186,9 @@ export function GitSettings() {
/>
</div>
<div className="grid gap-2">
<Label htmlFor={`${origin}-username`}>{t('username')}</Label>
<Label htmlFor={`${origin}-username`}>
{t('username')} <span className="text-destructive">*</span>
</Label>
<Input
id={`${origin}-username`}
placeholder="git"
@@ -193,7 +197,9 @@ export function GitSettings() {
/>
</div>
<div className="grid gap-2">
<Label htmlFor={`${origin}-password`}>{t('password')}</Label>
<Label htmlFor={`${origin}-password`}>
{t('password')} <span className="text-destructive">*</span>
</Label>
<PasswordInput
id={`${origin}-password`}
placeholder={t('enterPassword')}
@@ -371,7 +377,9 @@ export function GitSettings() {
<AccordionContent className="px-4 pb-4">
<div className="space-y-3">
<div className="grid gap-2">
<Label htmlFor="custom-origin">{t('origin')}</Label>
<Label htmlFor="custom-origin">
{t('origin')} <span className="text-destructive">*</span>
</Label>
<Input
id="custom-origin"
placeholder="https://git.example.com"
@@ -380,7 +388,9 @@ export function GitSettings() {
/>
</div>
<div className="grid gap-2">
<Label htmlFor="custom-username">{t('username')}</Label>
<Label htmlFor="custom-username">
{t('username')} <span className="text-destructive">*</span>
</Label>
<Input
id="custom-username"
placeholder="git"
@@ -389,7 +399,9 @@ export function GitSettings() {
/>
</div>
<div className="grid gap-2">
<Label htmlFor="custom-password">{t('password')}</Label>
<Label htmlFor="custom-password">
{t('password')} <span className="text-destructive">*</span>
</Label>
<PasswordInput
id="custom-password"
placeholder={t('enterPassword')}