mirror of
https://github.com/9technologygroup/patchmon.net.git
synced 2025-11-05 06:23:22 +00:00
fix(frontend): Missing radix parameter
This commit is contained in:
@@ -116,6 +116,7 @@ const Settings = () => {
|
|||||||
serverPort: settings.server_port || 3001,
|
serverPort: settings.server_port || 3001,
|
||||||
updateInterval: settings.update_interval || 60,
|
updateInterval: settings.update_interval || 60,
|
||||||
autoUpdate: settings.auto_update || false,
|
autoUpdate: settings.auto_update || false,
|
||||||
|
// biome-ignore lint/complexity/noUselessTernary: Seems to be desired given the comment
|
||||||
signupEnabled: settings.signup_enabled === true ? true : false, // Explicit boolean conversion
|
signupEnabled: settings.signup_enabled === true ? true : false, // Explicit boolean conversion
|
||||||
defaultUserRole: settings.default_user_role || "user",
|
defaultUserRole: settings.default_user_role || "user",
|
||||||
githubRepoUrl:
|
githubRepoUrl:
|
||||||
@@ -528,7 +529,7 @@ const Settings = () => {
|
|||||||
type="number"
|
type="number"
|
||||||
value={formData.serverPort}
|
value={formData.serverPort}
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
handleInputChange("serverPort", parseInt(e.target.value))
|
handleInputChange("serverPort", parseInt(e.target.value, 10))
|
||||||
}
|
}
|
||||||
className={`w-full border rounded-md shadow-sm focus:ring-primary-500 focus:border-primary-500 bg-white dark:bg-secondary-700 text-secondary-900 dark:text-white ${
|
className={`w-full border rounded-md shadow-sm focus:ring-primary-500 focus:border-primary-500 bg-white dark:bg-secondary-700 text-secondary-900 dark:text-white ${
|
||||||
errors.serverPort
|
errors.serverPort
|
||||||
@@ -579,7 +580,7 @@ const Settings = () => {
|
|||||||
step="5"
|
step="5"
|
||||||
value={formData.updateInterval}
|
value={formData.updateInterval}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const val = parseInt(e.target.value);
|
const val = parseInt(e.target.value, 10);
|
||||||
if (!Number.isNaN(val)) {
|
if (!Number.isNaN(val)) {
|
||||||
handleInputChange(
|
handleInputChange(
|
||||||
"updateInterval",
|
"updateInterval",
|
||||||
@@ -628,7 +629,7 @@ const Settings = () => {
|
|||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
handleInputChange(
|
handleInputChange(
|
||||||
"updateInterval",
|
"updateInterval",
|
||||||
parseInt(e.target.value),
|
parseInt(e.target.value, 10),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
className="w-full accent-primary-600"
|
className="w-full accent-primary-600"
|
||||||
@@ -646,7 +647,7 @@ const Settings = () => {
|
|||||||
<div className="mt-2 text-sm text-secondary-600 dark:text-secondary-300">
|
<div className="mt-2 text-sm text-secondary-600 dark:text-secondary-300">
|
||||||
<span className="font-medium">Effective cadence:</span>{" "}
|
<span className="font-medium">Effective cadence:</span>{" "}
|
||||||
{(() => {
|
{(() => {
|
||||||
const mins = parseInt(formData.updateInterval) || 60;
|
const mins = parseInt(formData.updateInterval, 10) || 60;
|
||||||
if (mins < 60)
|
if (mins < 60)
|
||||||
return `${mins} minute${mins === 1 ? "" : "s"}`;
|
return `${mins} minute${mins === 1 ? "" : "s"}`;
|
||||||
const hrs = Math.floor(mins / 60);
|
const hrs = Math.floor(mins / 60);
|
||||||
|
|||||||
Reference in New Issue
Block a user