mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-11-18 11:36:17 +00:00
Update virtual-machines.tsx
This commit is contained in:
@@ -562,6 +562,8 @@ export function VirtualMachines() {
|
|||||||
if (vmDetails?.config?.description) {
|
if (vmDetails?.config?.description) {
|
||||||
const decoded = decodeRecursively(vmDetails.config.description)
|
const decoded = decodeRecursively(vmDetails.config.description)
|
||||||
setEditedNotes(decoded)
|
setEditedNotes(decoded)
|
||||||
|
} else {
|
||||||
|
setEditedNotes("") // Ensure editedNotes is empty if no description exists
|
||||||
}
|
}
|
||||||
setIsEditingNotes(true)
|
setIsEditingNotes(true)
|
||||||
}
|
}
|
||||||
@@ -1155,7 +1157,6 @@ export function VirtualMachines() {
|
|||||||
Resources
|
Resources
|
||||||
</h3>
|
</h3>
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
{vmDetails.config.description && (
|
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
size="sm"
|
size="sm"
|
||||||
@@ -1174,7 +1175,6 @@ export function VirtualMachines() {
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
size="sm"
|
size="sm"
|
||||||
@@ -1226,7 +1226,7 @@ export function VirtualMachines() {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{showNotes && vmDetails.config.description && (
|
{showNotes && (
|
||||||
<div className="mt-6 pt-6 border-t border-border">
|
<div className="mt-6 pt-6 border-t border-border">
|
||||||
<div className="flex items-center justify-between mb-3">
|
<div className="flex items-center justify-between mb-3">
|
||||||
<h4 className="text-sm font-semibold text-muted-foreground uppercase tracking-wide">
|
<h4 className="text-sm font-semibold text-muted-foreground uppercase tracking-wide">
|
||||||
@@ -1271,7 +1271,7 @@ export function VirtualMachines() {
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : vmDetails.config.description ? (
|
||||||
<>
|
<>
|
||||||
{(() => {
|
{(() => {
|
||||||
const processed = processDescription(vmDetails.config.description)
|
const processed = processDescription(vmDetails.config.description)
|
||||||
@@ -1290,6 +1290,10 @@ export function VirtualMachines() {
|
|||||||
)
|
)
|
||||||
})()}
|
})()}
|
||||||
</>
|
</>
|
||||||
|
) : (
|
||||||
|
<div className="text-sm text-muted-foreground italic">
|
||||||
|
No notes yet. Click Edit to add notes.
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user