mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 15:35:55 +01:00
🎨 Format codebase
This commit is contained in:
@@ -36,7 +36,13 @@ export const AppTile = ({ className, app }: AppTileProps) => {
|
||||
className="dashboard-tile-app"
|
||||
>
|
||||
<Box hidden={false}>
|
||||
<Title order={5} size="md" ta="center" lineClamp={1} className={cx(classes.appName, 'dashboard-tile-app-title')}>
|
||||
<Title
|
||||
order={5}
|
||||
size="md"
|
||||
ta="center"
|
||||
lineClamp={1}
|
||||
className={cx(classes.appName, 'dashboard-tile-app-title')}
|
||||
>
|
||||
{app.name}
|
||||
</Title>
|
||||
</Box>
|
||||
|
||||
@@ -10,9 +10,7 @@ export default function CustomizationSettings() {
|
||||
return (
|
||||
<ScrollArea style={{ height: height - 100 }} offsetScrollbars>
|
||||
<Stack mt="xs" mb="md" spacing="xs">
|
||||
<Text color="dimmed">
|
||||
{t('text')}
|
||||
</Text>
|
||||
<Text color="dimmed">{t('text')}</Text>
|
||||
<CustomizationSettingsAccordeon />
|
||||
</Stack>
|
||||
</ScrollArea>
|
||||
|
||||
@@ -8,7 +8,9 @@ export const LogoImageChanger = () => {
|
||||
const { t } = useTranslation('settings/customization/page-appearance');
|
||||
const updateConfig = useConfigStore((x) => x.updateConfig);
|
||||
const { config, name: configName } = useConfigContext();
|
||||
const [logoImageSrc, setLogoImageSrc] = useState(config?.settings.customization.logoImageUrl ?? '/imgs/logo/logo.png');
|
||||
const [logoImageSrc, setLogoImageSrc] = useState(
|
||||
config?.settings.customization.logoImageUrl ?? '/imgs/logo/logo.png'
|
||||
);
|
||||
|
||||
if (!configName) return null;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { NormalizedDownloadQueueResponse } from '../../../types/api/downloads/queue/NormalizedDownloadQueueResponse';
|
||||
|
||||
export const useGetDownloadClientsQueue = () => useQuery({
|
||||
export const useGetDownloadClientsQueue = () =>
|
||||
useQuery({
|
||||
queryKey: ['network-speed'],
|
||||
queryFn: async (): Promise<NormalizedDownloadQueueResponse> => {
|
||||
const response = await fetch('/api/modules/downloads');
|
||||
|
||||
@@ -6,10 +6,26 @@ import { UnpkgIconsRepository } from '../../../tools/server/images/unpkg-icons-r
|
||||
const Get = async (request: NextApiRequest, response: NextApiResponse) => {
|
||||
const respositories = [
|
||||
new LocalIconsRepository(),
|
||||
new JsdelivrIconsRepository(JsdelivrIconsRepository.tablerRepository, 'Walkxcode Dashboard Icons', 'Walkxcode on Github'),
|
||||
new UnpkgIconsRepository(UnpkgIconsRepository.tablerRepository, 'Tabler Icons', 'Tabler Icons - GitHub (MIT)'),
|
||||
new JsdelivrIconsRepository(JsdelivrIconsRepository.papirusRepository, 'Papirus Icons', 'Papirus Development Team on GitHub (Apache 2.0)'),
|
||||
new JsdelivrIconsRepository(JsdelivrIconsRepository.homelabSvgAssetsRepository, 'Homelab Svg Assets', 'loganmarchione on GitHub (MIT)'),
|
||||
new JsdelivrIconsRepository(
|
||||
JsdelivrIconsRepository.tablerRepository,
|
||||
'Walkxcode Dashboard Icons',
|
||||
'Walkxcode on Github'
|
||||
),
|
||||
new UnpkgIconsRepository(
|
||||
UnpkgIconsRepository.tablerRepository,
|
||||
'Tabler Icons',
|
||||
'Tabler Icons - GitHub (MIT)'
|
||||
),
|
||||
new JsdelivrIconsRepository(
|
||||
JsdelivrIconsRepository.papirusRepository,
|
||||
'Papirus Icons',
|
||||
'Papirus Development Team on GitHub (Apache 2.0)'
|
||||
),
|
||||
new JsdelivrIconsRepository(
|
||||
JsdelivrIconsRepository.homelabSvgAssetsRepository,
|
||||
'Homelab Svg Assets',
|
||||
'loganmarchione on GitHub (MIT)'
|
||||
),
|
||||
];
|
||||
const fetches = respositories.map((rep) => rep.fetch());
|
||||
const data = await Promise.all(fetches);
|
||||
|
||||
@@ -61,7 +61,9 @@ const Get = async (request: NextApiRequest, response: NextApiResponse) => {
|
||||
const responseBody = { apps: data, failedApps: failedClients } as NormalizedDownloadQueueResponse;
|
||||
|
||||
if (failedClients.length > 0) {
|
||||
Consola.warn(`${failedClients.length} download clients failed. Please check your configuration and the above log`);
|
||||
Consola.warn(
|
||||
`${failedClients.length} download clients failed. Please check your configuration and the above log`
|
||||
);
|
||||
}
|
||||
|
||||
return response.status(200).json(responseBody);
|
||||
|
||||
@@ -23,7 +23,7 @@ export class JsdelivrIconsRepository extends AbstractIconRepository {
|
||||
constructor(
|
||||
private readonly repository: JsdelivrRepositoryUrl,
|
||||
private readonly displayName: string,
|
||||
copyright: string,
|
||||
copyright: string
|
||||
) {
|
||||
super(copyright);
|
||||
}
|
||||
|
||||
@@ -14,18 +14,23 @@ export type GenericCurrentlyPlaying = {
|
||||
episodeCount: number | undefined;
|
||||
type: 'audio' | 'video' | 'tv' | 'movie' | undefined;
|
||||
metadata: {
|
||||
video: {
|
||||
video:
|
||||
| {
|
||||
videoCodec: string | undefined;
|
||||
videoFrameRate: string | undefined;
|
||||
height: number | undefined;
|
||||
width: number | undefined;
|
||||
bitrate: number | undefined;
|
||||
} | undefined;
|
||||
audio: {
|
||||
}
|
||||
| undefined;
|
||||
audio:
|
||||
| {
|
||||
audioCodec: string | undefined;
|
||||
audioChannels: number | undefined;
|
||||
} | undefined;
|
||||
transcoding: {
|
||||
}
|
||||
| undefined;
|
||||
transcoding:
|
||||
| {
|
||||
context: string | undefined;
|
||||
sourceVideoCodec: string | undefined;
|
||||
sourceAudioCodec: string | undefined;
|
||||
@@ -41,6 +46,7 @@ export type GenericCurrentlyPlaying = {
|
||||
height: number | undefined;
|
||||
transcodeHwRequested: boolean | undefined;
|
||||
timeStamp: number | undefined;
|
||||
} | undefined;
|
||||
}
|
||||
| undefined;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -25,7 +25,7 @@ const definition = defineWidget({
|
||||
component: DateTile,
|
||||
});
|
||||
|
||||
export type IDateWidget = IWidget<typeof definition['id'], typeof definition>;
|
||||
export type IDateWidget = IWidget<(typeof definition)['id'], typeof definition>;
|
||||
|
||||
interface DateTileProps {
|
||||
widget: IDateWidget;
|
||||
|
||||
@@ -107,7 +107,9 @@ export const DetailCollapseable = ({ session }: { session: GenericSessionInfo })
|
||||
</Group>
|
||||
<Text>{session.sessionName}</Text>
|
||||
</Flex>
|
||||
{details.length > 0 && <Divider label="Stats for nerds" labelPosition="center" mt="lg" mb="sm" />}
|
||||
{details.length > 0 && (
|
||||
<Divider label="Stats for nerds" labelPosition="center" mt="lg" mb="sm" />
|
||||
)}
|
||||
<Grid>
|
||||
{details.map((detail, index) => (
|
||||
<Grid.Col xs={12} sm={6} key={index}>
|
||||
|
||||
@@ -46,7 +46,7 @@ const definition = defineWidget({
|
||||
},
|
||||
});
|
||||
|
||||
export type IUsenetWidget = IWidget<typeof definition['id'], typeof definition>;
|
||||
export type IUsenetWidget = IWidget<(typeof definition)['id'], typeof definition>;
|
||||
|
||||
interface UseNetTileProps {
|
||||
widget: IUsenetWidget;
|
||||
|
||||
@@ -28,7 +28,7 @@ const definition = defineWidget({
|
||||
component: WeatherTile,
|
||||
});
|
||||
|
||||
export type IWeatherWidget = IWidget<typeof definition['id'], typeof definition>;
|
||||
export type IWeatherWidget = IWidget<(typeof definition)['id'], typeof definition>;
|
||||
|
||||
interface WeatherTileProps {
|
||||
widget: IWeatherWidget;
|
||||
|
||||
Reference in New Issue
Block a user