mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 23:45:48 +01:00
🚑 Critical hotfix for various bugs
This commit is contained in:
@@ -9,7 +9,7 @@ export default function ConfigChanger() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getConfigs().then((configs) => setConfigList(configs));
|
getConfigs().then((configs) => setConfigList(configs));
|
||||||
// setConfig(initialConfig);
|
// setConfig(initialConfig);
|
||||||
}, [config.name]);
|
}, [config]);
|
||||||
// If configlist is empty, return a loading indicator
|
// If configlist is empty, return a loading indicator
|
||||||
if (configList.length === 0) {
|
if (configList.length === 0) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ export default function SaveConfigComponent(props: any) {
|
|||||||
>
|
>
|
||||||
<TextInput
|
<TextInput
|
||||||
required
|
required
|
||||||
defaultValue={config.name}
|
|
||||||
label="Config name"
|
label="Config name"
|
||||||
placeholder="Your new config name"
|
placeholder="Your new config name"
|
||||||
{...form.getInputProps('configName')}
|
{...form.getInputProps('configName')}
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
import { Select } from '@mantine/core';
|
|
||||||
import { useState } from 'react';
|
|
||||||
|
|
||||||
export default function SelectConfig(props: any) {
|
|
||||||
const [value, setValue] = useState<string | null>('');
|
|
||||||
return (
|
|
||||||
<Select
|
|
||||||
value={value}
|
|
||||||
onChange={setValue}
|
|
||||||
data={[
|
|
||||||
{ value: 'default', label: 'Default' },
|
|
||||||
{ value: 'yourmom', label: 'Your mom' },
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -94,7 +94,6 @@ export function ReadarrMediaDisplay(props: any) {
|
|||||||
}
|
}
|
||||||
const baseUrl = new URL(readarr.url).origin;
|
const baseUrl = new URL(readarr.url).origin;
|
||||||
// Remove '/' from the end of the lidarr url
|
// Remove '/' from the end of the lidarr url
|
||||||
console.log(poster);
|
|
||||||
const fullLink = `${baseUrl}${poster.url}`;
|
const fullLink = `${baseUrl}${poster.url}`;
|
||||||
// Return a movie poster containting the title and the description
|
// Return a movie poster containting the title and the description
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export function ConfigProvider({ children }: Props) {
|
|||||||
async function loadConfig(configName: string) {
|
async function loadConfig(configName: string) {
|
||||||
try {
|
try {
|
||||||
const response = await axios.get(`/api/configs/${configName}`);
|
const response = await axios.get(`/api/configs/${configName}`);
|
||||||
setConfigInternal(response.data);
|
setConfigInternal(JSON.parse(response.data));
|
||||||
showNotification({
|
showNotification({
|
||||||
title: 'Config',
|
title: 'Config',
|
||||||
icon: <Check />,
|
icon: <Check />,
|
||||||
|
|||||||
Reference in New Issue
Block a user