diff --git a/backend/melodies/models.py b/backend/melodies/models.py index 6000c37..5b87936 100644 --- a/backend/melodies/models.py +++ b/backend/melodies/models.py @@ -28,7 +28,6 @@ class MelodyInfo(BaseModel): color: str = "" isTrueRing: bool = False previewURL: str = "" - notes: List[int] = [] class MelodyAttributes(BaseModel): diff --git a/backend/melodies/router.py b/backend/melodies/router.py index 63adc76..41d3c86 100644 --- a/backend/melodies/router.py +++ b/backend/melodies/router.py @@ -82,7 +82,7 @@ async def upload_file( url = service.upload_file(melody_id, contents, file.filename, content_type) - # Update the melody document with the new URL if it's a preview + # Update the melody document with the file URL if file_type == "preview": service.update_melody(melody_id, MelodyUpdate( information=MelodyInfo( @@ -90,6 +90,8 @@ async def upload_file( previewURL=url, ) )) + elif file_type == "binary": + service.update_melody(melody_id, MelodyUpdate(url=url)) return {"url": url, "file_type": file_type} diff --git a/bellsystemsblack-300x138_darkTheme.png b/bellsystemsblack-300x138_darkTheme.png new file mode 100644 index 0000000..3ffde5d Binary files /dev/null and b/bellsystemsblack-300x138_darkTheme.png differ diff --git a/frontend/public/logo-dark.png b/frontend/public/logo-dark.png new file mode 100644 index 0000000..3ffde5d Binary files /dev/null and b/frontend/public/logo-dark.png differ diff --git a/frontend/public/logo-light.png b/frontend/public/logo-light.png new file mode 100644 index 0000000..378e9f6 Binary files /dev/null and b/frontend/public/logo-light.png differ diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index b5533d5..05eb451 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -15,8 +15,8 @@ function ProtectedRoute({ children }) { if (loading) { return ( -
-

Loading...

+
+

Loading...

); } @@ -32,10 +32,10 @@ function DashboardPage() { const { user } = useAuth(); return (
-

Dashboard

-

+

Dashboard

+

Welcome, {user?.name}. You are logged in as{" "} - {user?.role}. + {user?.role}.

); diff --git a/frontend/src/auth/LoginPage.jsx b/frontend/src/auth/LoginPage.jsx index 3d54d59..227d801 100644 --- a/frontend/src/auth/LoginPage.jsx +++ b/frontend/src/auth/LoginPage.jsx @@ -25,21 +25,41 @@ export default function LoginPage() { }; return ( -
-
-

- BellSystems Admin -

+
+
+
+ BellSystems +
{error && ( -
+
{error}
)}
-
-
diff --git a/frontend/src/components/ConfirmDialog.jsx b/frontend/src/components/ConfirmDialog.jsx index 176a0b6..3f0c7a6 100644 --- a/frontend/src/components/ConfirmDialog.jsx +++ b/frontend/src/components/ConfirmDialog.jsx @@ -3,24 +3,41 @@ export default function ConfirmDialog({ open, title, message, onConfirm, onCance return (
-
-
-

+
+
+

{title || "Confirm"}

-

+

{message || "Are you sure?"}

diff --git a/frontend/src/components/SearchBar.jsx b/frontend/src/components/SearchBar.jsx index 78ac533..2daac49 100644 --- a/frontend/src/components/SearchBar.jsx +++ b/frontend/src/components/SearchBar.jsx @@ -21,13 +21,14 @@ export default function SearchBar({ onSearch, placeholder = "Search..." }) { value={value} onChange={(e) => setValue(e.target.value)} placeholder={placeholder} - className="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent text-sm" + className="w-full px-3 py-2 rounded-md text-sm border" /> {value && ( @@ -35,7 +36,11 @@ export default function SearchBar({ onSearch, placeholder = "Search..." }) {
diff --git a/frontend/src/devices/DeviceDetail.jsx b/frontend/src/devices/DeviceDetail.jsx index e7d92ed..d12e746 100644 --- a/frontend/src/devices/DeviceDetail.jsx +++ b/frontend/src/devices/DeviceDetail.jsx @@ -7,10 +7,15 @@ import ConfirmDialog from "../components/ConfirmDialog"; function Field({ label, children }) { return (
-
+
{label}
-
{children || "-"}
+
+ {children || "-"} +
); } @@ -18,9 +23,12 @@ function Field({ label, children }) { function BoolBadge({ value, yesLabel = "Yes", noLabel = "No" }) { return ( {value ? yesLabel : noLabel} @@ -65,12 +73,23 @@ export default function DeviceDetail() { }; if (loading) { - return
Loading...
; + return ( +
+ Loading... +
+ ); } if (error) { return ( -
+
{error}
); @@ -90,18 +109,23 @@ export default function DeviceDetail() {
-

+

{device.device_name || "Unnamed Device"}

@@ -110,13 +134,15 @@ export default function DeviceDetail() {
@@ -128,8 +154,14 @@ export default function DeviceDetail() { {/* Left column */}
{/* Basic Info */} -
-

+
+

Basic Information

@@ -137,7 +169,9 @@ export default function DeviceDetail() { {device.device_id} - {device.id} + + {device.id} + @@ -157,8 +191,14 @@ export default function DeviceDetail() {
{/* Device Attributes */} -
-

+
+

Device Attributes

@@ -184,8 +224,14 @@ export default function DeviceDetail() {
{/* Network */} -
-

+
+

Network Settings

@@ -198,13 +244,22 @@ export default function DeviceDetail() { {/* Right column */}
{/* Subscription */} -
-

+
+

Subscription

- + {sub.subscrTier} @@ -216,8 +271,14 @@ export default function DeviceDetail() {
{/* Clock Settings */} -
-

+
+

Clock Settings

@@ -239,8 +300,16 @@ export default function DeviceDetail() {
{(clock.isDaySilenceOn || clock.isNightSilenceOn) && ( -
-

Silence Periods

+
+

+ Silence Periods +

{clock.isDaySilenceOn && ( <> @@ -262,8 +331,14 @@ export default function DeviceDetail() {
{/* Statistics */} -
-

+
+

Statistics & Warranty

@@ -282,8 +357,14 @@ export default function DeviceDetail() {
{/* Melodies & Users summary */} -
-

+
+

Melodies & Users

diff --git a/frontend/src/devices/DeviceForm.jsx b/frontend/src/devices/DeviceForm.jsx index 723f73c..f705af6 100644 --- a/frontend/src/devices/DeviceForm.jsx +++ b/frontend/src/devices/DeviceForm.jsx @@ -200,36 +200,62 @@ export default function DeviceForm() { }; if (loading) { - return
Loading...
; + return
Loading...
; } - const inputClass = - "w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent text-sm"; + const inputClass = "w-full px-3 py-2 rounded-md text-sm border"; return (
-

- {isEdit ? "Edit Device" : "Add Device"} -

+
+

+ {isEdit ? "Edit Device" : "Add Device"} +

+
+ + +
+
{error && ( -
+
{error}
)} - +
{/* ===== Left Column ===== */}
{/* --- Basic Info --- */} -
-

+
+

Basic Information

-
-
-
-
{/* --- Device Attributes --- */} -
-

+
+

Device Attributes

@@ -303,7 +332,7 @@ export default function DeviceForm() { onChange={(e) => updateAttr("hasAssistant", e.target.checked)} className="h-4 w-4 text-blue-600 rounded border-gray-300" /> - Has Assistant + Has Assistant
-
-
-
-
-