Skip to content

Commit f750674

Browse files
committed
fix(ui): hide environment variable values and mask inputs as password
- Display only environment variable names in instance info panel (hide values) - Display only environment variable names in logs view (hide values) - Change environment variable value inputs to password type in settings editor
1 parent 259d457 commit f750674

3 files changed

Lines changed: 10 additions & 14 deletions

File tree

packages/ui/src/components/environment-variables-editor.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const EnvironmentVariablesEditor: Component<EnvironmentVariablesEditorProps> = (
8181
title={t("envEditor.fields.name.readOnlyTitle")}
8282
/>
8383
<input
84-
type="text"
84+
type="password"
8585
value={value}
8686
disabled={props.disabled}
8787
onInput={(e) => handleUpdateVariable(key, e.currentTarget.value)}
@@ -108,16 +108,16 @@ const EnvironmentVariablesEditor: Component<EnvironmentVariablesEditorProps> = (
108108
<div class="flex-1 flex items-center gap-2">
109109
<Key class="w-3.5 h-3.5 icon-muted flex-shrink-0" />
110110
<input
111-
type="text"
112-
value={newKey()}
113-
onInput={(e) => setNewKey(e.currentTarget.value)}
111+
type="password"
112+
value={newValue()}
113+
onInput={(e) => setNewValue(e.currentTarget.value)}
114114
onKeyPress={handleKeyPress}
115115
disabled={props.disabled}
116116
class="flex-1 px-2.5 py-1.5 text-sm bg-surface-base border border-base rounded text-primary focus-ring-accent disabled:opacity-50 disabled:cursor-not-allowed"
117-
placeholder={t("envEditor.fields.name.placeholder")}
117+
placeholder={t("envEditor.fields.value.placeholder")}
118118
/>
119119
<input
120-
type="text"
120+
type="password"
121121
value={newValue()}
122122
onInput={(e) => setNewValue(e.currentTarget.value)}
123123
onKeyPress={handleKeyPress}

packages/ui/src/components/instance-info.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,13 @@ const InstanceInfo: Component<InstanceInfoProps> = (props) => {
151151
</div>
152152
<div class="space-y-1">
153153
<For each={environmentEntries()}>
154-
{([key, value]) => (
154+
{([key]) => (
155155
<div dir="ltr" class="flex items-center gap-2 px-2 py-1.5 rounded border bg-surface-secondary border-base">
156156
<span class="text-xs font-mono font-medium flex-1 text-primary" title={key}>
157157
{key}
158158
</span>
159-
<span class="text-xs font-mono flex-1 text-secondary" title={value}>
160-
{value}
159+
<span class="text-xs font-mono flex-1 text-secondary">
160+
***
161161
</span>
162162
</div>
163163
)}

packages/ui/src/components/logs-view.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,9 @@ const LogsView: Component<LogsViewProps> = (props) => {
109109
</div>
110110
<div class="space-y-1">
111111
<For each={Object.entries(instance()?.environmentVariables!)}>
112-
{([key, value]) => (
112+
{([key]) => (
113113
<div class="env-var-item">
114114
<span class="env-var-key">{key}</span>
115-
<span class="env-var-separator">=</span>
116-
<span class="env-var-value" title={value}>
117-
{value}
118-
</span>
119115
</div>
120116
)}
121117
</For>

0 commit comments

Comments
 (0)