+ {formData.adapter !== 'packycode' && (
-
-
-
-
-
-
+
setFormData(prev => ({ ...prev, system_token: e.target.value }))}
- placeholder={t('relayStation.tokenPlaceholder')}
+ id="api_url"
+ type="url"
+ value={formData.api_url}
+ onChange={(e) => setFormData(prev => ({ ...prev, api_url: e.target.value }))}
+ placeholder="https://api.example.com"
+ className="w-full"
/>
+ )}
+
+
+ {formData.adapter === 'packycode' ? (
+ // PackyCode 固定使用 API Key,不显示选择器
+
+
+
setFormData(prev => ({ ...prev, system_token: e.target.value }))}
+ placeholder="sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+ className="w-full font-mono text-sm"
+ />
+
+ {t('relayStation.packycodeTokenNote')}
+
+
+ ) : (
+ // 其他适配器显示认证方式选择
+ <>
+
+
+
+
+
+
+
+ setFormData(prev => ({ ...prev, system_token: e.target.value }))}
+ placeholder={t('relayStation.tokenPlaceholder')}
+ className="w-full font-mono text-sm"
+ />
+
+ >
+ )}
{(formData.adapter === 'newapi' || formData.adapter === 'oneapi') && (
@@ -542,31 +890,55 @@ const CreateStationDialog: React.FC<{
value={formData.user_id}
onChange={(e) => setFormData(prev => ({ ...prev, user_id: e.target.value }))}
placeholder={t('relayStation.userIdPlaceholder')}
+ className="w-full"
/>
)}
-