fix: modal bg transparency, static key removal from dropdown and trust type just the HMAC

This commit is contained in:
amee
2026-03-30 13:07:05 +05:30
parent d94b9ac76c
commit 5d9851c6c6
4 changed files with 15 additions and 12 deletions
@@ -47,7 +47,7 @@ const EnvironmentForm = ({ moduleId, environment, onClose }: EnvironmentFormProp
setLoading(true);
setError('');
const trust_credentials = formData.trust_type === 'hmac'
const trust_credentials = formData.trust_type === 'hmac'
? { hmac_secret: formData.hmac_secret }
: { secret_key: formData.hmac_secret };
@@ -116,15 +116,17 @@ const EnvironmentForm = ({ moduleId, environment, onClose }: EnvironmentFormProp
/>
</div>
<div>
<label className="block text-sm font-medium mb-1">Trust Type *</label>
<select
value={formData.trust_type}
onChange={(e) => setFormData({ ...formData, trust_type: e.target.value })}
className="w-full px-3 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
>
<option value="hmac">HMAC-SHA256</option>
<option value="static_key">Static Key</option>
</select>
<div>
<label className="block text-sm font-medium mb-1 text-(--text-primary)">
Trust Type
</label>
<input
type="text"
value="HMAC-SHA256"
disabled
className="w-full px-3 py-2 bg-(--background) border border-(--card-border) text-(--text-secondary) rounded-lg opacity-60 cursor-not-allowed"
/>
</div>
</div>
</div>
@@ -188,7 +190,7 @@ const EnvironmentForm = ({ moduleId, environment, onClose }: EnvironmentFormProp
<div>
<label className="block text-sm font-medium mb-1">
{formData.trust_type === 'hmac' ? 'HMAC Secret' : 'Secret Key'} {!environment && '*'}
HMAC Secret {!environment && "*"}
</label>
<input
type="password"
@@ -10,7 +10,6 @@ interface ModuleFormProps {
module: Module | null;
onClose: (saved: boolean) => void;
}
/*hhhh*/
interface ModuleFormData {
module_id: string;
+1
View File
@@ -73,6 +73,7 @@
"status": {
"active": "نشط",
"inactive": "غير نشط",
"default": "افتراضي",
"pending": "قيد الانتظار",
"approved": "موافق عليه",
"rejected": "مرفوض",
+1
View File
@@ -73,6 +73,7 @@
"status": {
"active": "Active",
"inactive": "Inactive",
"default": "Default",
"pending": "Pending",
"approved": "Approved",
"rejected": "Rejected",