added sounds, updated nped config and tweaks + code quality improvements

This commit is contained in:
2025-09-23 13:03:54 +01:00
parent eab7e79d01
commit c2074f86a2
27 changed files with 224 additions and 139 deletions

View File

@@ -1,4 +1,5 @@
import type { SystemValues } from "../../../types/types";
import { CAM_BASE } from "../../../utils/config";
export async function handleSystemSave(values: SystemValues) {
const payload = {
@@ -16,7 +17,7 @@ export async function handleSystemSave(values: SystemValues) {
};
try {
const response = await fetch("http://192.168.75.11/api/update-config", {
const response = await fetch(`${CAM_BASE}/api/update-config`, {
method: "POST",
headers: {
"Content-Type": "application/json",
@@ -39,7 +40,7 @@ export async function handleSystemSave(values: SystemValues) {
}
export async function handleSystemRecall() {
const url = "http://192.168.75.11/api/fetch-config?id=GLOBAL--Device";
const url = `${CAM_BASE}/api/fetch-config?id=GLOBAL--Device`;
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), 7000);

View File

@@ -8,7 +8,6 @@ import { useSystemConfig } from "../../../hooks/useSystemConfig";
const SystemConfigFields = () => {
const { saveSystemSettings, systemSettingsData } = useSystemConfig();
const initialvalues: SystemValues = {
deviceName: systemSettingsData?.deviceName ?? "",
timeZone: systemSettingsData?.timeZone ?? "",