Env var delete or copy
This commit is contained in:
@@ -142,7 +142,7 @@ export default function EnvironmentPage() {
|
|||||||
|
|
||||||
{/* Rows */}
|
{/* Rows */}
|
||||||
<div className="divide-y divide-border md:divide-none">
|
<div className="divide-y divide-border md:divide-none">
|
||||||
{currentGroup?.variables.map((variable) => (
|
{currentGroup?.variables.map((variable, i) => (
|
||||||
<div
|
<div
|
||||||
key={variable.key}
|
key={variable.key}
|
||||||
className="
|
className="
|
||||||
@@ -192,10 +192,34 @@ export default function EnvironmentPage() {
|
|||||||
)}
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
<Button variant="ghost" size="icon-sm">
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
size="icon-sm"
|
||||||
|
className="hover:text-primary"
|
||||||
|
onClick={() =>
|
||||||
|
navigator.clipboard.writeText(
|
||||||
|
`${variable.key}=${variable.value}`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
>
|
||||||
<Copy className="w-3 h-3" />
|
<Copy className="w-3 h-3" />
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="ghost" size="icon-sm">
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
size="icon-sm"
|
||||||
|
className="hover:text-destructive"
|
||||||
|
onClick={() => {
|
||||||
|
setEnvGroups((env) => ({
|
||||||
|
...env,
|
||||||
|
[selectedApp]: {
|
||||||
|
...env[selectedApp],
|
||||||
|
variables: env[selectedApp].variables.filter(
|
||||||
|
(_, iv) => iv !== i
|
||||||
|
),
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Trash2 className="w-3 h-3" />
|
<Trash2 className="w-3 h-3" />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user