diff --git a/frontend/src/components/BackupForm.jsx b/frontend/src/components/BackupForm.jsx
index 2f43338..676da9d 100644
--- a/frontend/src/components/BackupForm.jsx
+++ b/frontend/src/components/BackupForm.jsx
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import { getNamespaces, getPVCs, createBackup } from '../api/snapix';
-import { Button, Select, Option, Input } from '@mui/base'
+import { Button, Input } from '@mui/base';
export default function BackupForm() {
const [namespaces, setNamespaces] = useState([]);
@@ -28,47 +28,57 @@ export default function BackupForm() {
pvc_name: selectedPvc,
backup_name: backupName,
}).then(() => {
- alert("Backup started!");
+ alert('Backup started!');
setBackupName('');
});
}
};
return (
-
+
📦 Backup PVC
-
+
-
+
-
+
-
-
+
setBackupName(e.target.value)}
+ onChange={(e) => setBackupName(e.target.value)}
placeholder="e.g. git-bkp"
/>
-
+
+
);
}
-
diff --git a/frontend/src/style/global.css b/frontend/src/style/global.css
index 0c0f3ef..f428be8 100644
--- a/frontend/src/style/global.css
+++ b/frontend/src/style/global.css
@@ -1,26 +1,28 @@
h2 {
- text-align: center;
+ text-align: center;
}
.form-group {
- border: 2px solid #ccc;
- border-radius: 8px;
- padding: 13px;
- margin: 10px;
- height: 400px;
- width: 500px;
- flex: 1;
- max-width: 500px;
- min-width: 500px;
+ border: 2px solid #ccc;
+ border-radius: 8px;
+ padding: 13px;
+ margin: 10px;
+ height: auto;
+ width: 500px;
+ flex: 1;
+ max-width: 500px;
+ min-width: 300px;
}
.form-content {
- display: flex;
- flex-direction: column;
- padding: 10px;
+ display: flex;
+ flex-direction: column;
+ padding: 10px;
}
-input {
+/* Unified input/select styling */
+input,
+select {
width: 100%;
padding: 10px;
background-color: #1a1a1a;
@@ -29,13 +31,46 @@ input {
color: white;
font-size: 1rem;
box-sizing: border-box;
+ appearance: none;
}
-input:hover {
- border-color: #1a73e8;
+input:hover,
+select:hover {
+ border-color: #1a73e8;
+}
+
+input:disabled,
+select:disabled {
+ opacity: 0.5;
+ cursor: not-allowed;
}
.btn {
- background-color: #4CAF50;
- margin-top: 30px;
+ background-color: #4CAF50;
+ color: white;
+ margin-top: 30px;
+ padding: 10px 20px;
+ border: none;
+ border-radius: 8px;
+ cursor: pointer;
+ font-size: 1rem;
+}
+
+.btn:hover {
+ background-color: #45a049;
+}
+
+/* Scrollbar inside
dropdown (some browsers only) */
+select {
+ scrollbar-color: #666 #1a1a1a;
+ scrollbar-width: thin;
+}
+
+select::-webkit-scrollbar {
+ width: 6px;
+}
+
+select::-webkit-scrollbar-thumb {
+ background-color: #666;
+ border-radius: 4px;
}