From 1ea4ca21490c95bd734b4740ed0d0c4782dcc43d Mon Sep 17 00:00:00 2001 From: Meierschlumpf Date: Sat, 7 Jan 2023 09:45:00 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Format=20with=20prettier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/configs/default.json | 418 +++++++++--------- src/components/Config/LoadConfig.tsx | 4 +- .../ChangeWidgetPositionModal.tsx | 11 +- .../Dashboard/Views/DashboardView.tsx | 46 +- .../Dashboard/Wrappers/Sidebar/Sidebar.tsx | 49 +- .../Dashboard/Wrappers/WrapperContent.tsx | 4 +- .../Wrappers/gridstack/init-gridstack.ts | 24 +- .../Wrappers/gridstack/use-gridstack.ts | 17 +- .../Customization/CustomizationSettings.tsx | 4 +- src/config/store.ts | 2 +- src/hooks/use-resize.ts | 8 +- src/hooks/widgets/dashDot/api.ts | 5 +- src/pages/api/modules/torrents.ts | 3 +- src/widgets/WidgetWrapper.tsx | 10 +- src/widgets/useNet/UseNetTile.tsx | 6 +- 15 files changed, 307 insertions(+), 304 deletions(-) diff --git a/data/configs/default.json b/data/configs/default.json index a697701ac..6a7df11ae 100644 --- a/data/configs/default.json +++ b/data/configs/default.json @@ -26,64 +26,6 @@ } ], "apps": [ - { - "id": "76217a87-7151-42d0-b0cf-1b72aef63f83", - "name": "Small app", - "url": "https://homarr.dev", - "appearance": { - "iconUrl": "/imgs/logo/logo.png" - }, - "network": { - "enabledStatusChecker": false, - "okStatus": [] - }, - "behaviour": { - "isOpeningNewTab": true, - "externalUrl": "https://homarr.dev" - }, - "area": { - "type": "sidebar", - "properties": { - "location": "left" - } - }, - "shape": { - "md": { - "location": { - "x": 0, - "y": 0 - }, - "size": { - "width": 1, - "height": 1 - } - }, - "sm": { - "location": { - "x": 0, - "y": 0 - }, - "size": { - "width": 1, - "height": 1 - } - }, - "lg": { - "location": { - "x": 0, - "y": 0 - }, - "size": { - "width": 1, - "height": 1 - } - } - }, - "integration": { - "type": null, - "properties": [] - } - }, { "id": "47af36c0-47c1-4e5b-bfc7-ad645ee6a990", "name": "Donate", @@ -145,6 +87,64 @@ } } }, + { + "id": "76217a87-7151-42d0-b0cf-1b72aef63f83", + "name": "Small app", + "url": "https://homarr.dev", + "appearance": { + "iconUrl": "/imgs/logo/logo.png" + }, + "network": { + "enabledStatusChecker": false, + "okStatus": [] + }, + "behaviour": { + "isOpeningNewTab": true, + "externalUrl": "https://homarr.dev" + }, + "area": { + "type": "sidebar", + "properties": { + "location": "left" + } + }, + "shape": { + "md": { + "location": { + "x": 0, + "y": 0 + }, + "size": { + "width": 1, + "height": 1 + } + }, + "sm": { + "location": { + "x": 0, + "y": 0 + }, + "size": { + "width": 1, + "height": 1 + } + }, + "lg": { + "location": { + "x": 0, + "y": 0 + }, + "size": { + "width": 1, + "height": 1 + } + } + }, + "integration": { + "type": null, + "properties": [] + } + }, { "id": "e41a11f5-9c6e-41bc-ac0e-4c4c47582faa", "name": "Haha", @@ -169,8 +169,8 @@ "shape": { "md": { "location": { - "x": 0, - "y": 3 + "x": 5, + "y": 1 }, "size": { "width": 1, @@ -189,8 +189,8 @@ }, "lg": { "location": { - "x": 0, - "y": 6 + "x": 4, + "y": 2 }, "size": { "width": 1, @@ -204,13 +204,13 @@ } }, { - "id": "47af36c0-47c1-4e5b-bfc7-ad645ee6a33a", - "name": "Documentation", - "url": "https://homarr.dev", + "id": "47af36c0-47c1-4e5b-bfc7-ad645ee6a337", + "name": "Discord", + "url": "https://discord.com/invite/aCsmEV5RgA", "behaviour": { - "onClickUrl": "https://homarr.dev", - "externalUrl": "https://homarr.dev", - "isOpeningNewTab": true + "onClickUrl": "https://discord.com/invite/aCsmEV5RgA", + "isOpeningNewTab": true, + "externalUrl": "https://discord.com/invite/aCsmEV5RgA" }, "network": { "enabledStatusChecker": false, @@ -219,7 +219,7 @@ ] }, "appearance": { - "iconUrl": "/imgs/logo/logo.png" + "iconUrl": "https://cdn.jsdelivr.net/gh/walkxhub/dashboard-icons/png/discord.png" }, "integration": { "type": null, @@ -234,28 +234,28 @@ "shape": { "md": { "location": { - "x": 0, - "y": 10 + "x": 3, + "y": 0 }, "size": { - "width": 2, + "width": 1, "height": 1 } }, "sm": { "location": { "x": 0, - "y": 10 + "y": 1 }, "size": { - "width": 2, + "width": 1, "height": 1 } }, "lg": { "location": { - "x": 3, - "y": 1 + "x": 0, + "y": 0 }, "size": { "width": 1, @@ -308,8 +308,8 @@ }, "lg": { "location": { - "x": 1, - "y": 0 + "x": 2, + "y": 2 }, "size": { "width": 1, @@ -322,67 +322,6 @@ "properties": [] } }, - { - "id": "47af36c0-47c1-4e5b-bfc7-ad645ee6a337", - "name": "Discord", - "url": "https://discord.com/invite/aCsmEV5RgA", - "behaviour": { - "onClickUrl": "https://discord.com/invite/aCsmEV5RgA", - "isOpeningNewTab": true, - "externalUrl": "https://discord.com/invite/aCsmEV5RgA" - }, - "network": { - "enabledStatusChecker": false, - "okStatus": [ - 200 - ] - }, - "appearance": { - "iconUrl": "https://cdn.jsdelivr.net/gh/walkxhub/dashboard-icons/png/discord.png" - }, - "integration": { - "type": null, - "properties": [] - }, - "area": { - "type": "category", - "properties": { - "id": "47af36c0-47c1-4e5b-bfc7-ad645ee6a33f" - } - }, - "shape": { - "md": { - "location": { - "x": 0, - "y": 1 - }, - "size": { - "width": 1, - "height": 1 - } - }, - "sm": { - "location": { - "x": 0, - "y": 1 - }, - "size": { - "width": 1, - "height": 1 - } - }, - "lg": { - "location": { - "x": 0, - "y": 0 - }, - "size": { - "width": 1, - "height": 1 - } - } - } - }, { "id": "47af36c0-47c1-4e5b-bfc7-ad645ee6a330", "name": "Contribute", @@ -414,8 +353,8 @@ "shape": { "md": { "location": { - "x": 2, - "y": 3 + "x": 0, + "y": 1 }, "size": { "width": 1, @@ -434,8 +373,8 @@ }, "lg": { "location": { - "x": 2, - "y": 3 + "x": 3, + "y": 2 }, "size": { "width": 1, @@ -479,7 +418,7 @@ "md": { "location": { "x": 0, - "y": 5 + "y": 9 }, "size": { "width": 1, @@ -501,29 +440,43 @@ "type": null, "properties": [] } - } - ], - "widgets": [ + }, { - "id": "weather", - "properties": { - "displayInFahrenheit": false, - "location": "Paris" + "id": "47af36c0-47c1-4e5b-bfc7-ad645ee6a33a", + "name": "Documentation", + "url": "https://homarr.dev", + "behaviour": { + "onClickUrl": "https://homarr.dev", + "externalUrl": "https://homarr.dev", + "isOpeningNewTab": true + }, + "network": { + "enabledStatusChecker": false, + "okStatus": [ + 200 + ] + }, + "appearance": { + "iconUrl": "/imgs/logo/logo.png" + }, + "integration": { + "type": null, + "properties": [] }, "area": { "type": "category", "properties": { - "id": "47af36c0-47c1-4e5b-bfc7-ad645ee6a33f" + "id": "c1c4bec3-1044-4a80-957f-afe7ff49f421" } }, "shape": { "md": { "location": { - "x": 0, + "x": 2, "y": 0 }, "size": { - "width": 3, + "width": 2, "height": 1 } }, @@ -533,66 +486,24 @@ "y": 0 }, "size": { - "width": 3, + "width": 2, "height": 1 } }, "lg": { "location": { - "x": 0, - "y": 0 + "x": 1, + "y": 2 }, "size": { - "width": 3, + "width": 1, "height": 1 } } } - }, - { - "id": "calendar", - "properties": { - "sundayStart": false - }, - "area": { - "type": "wrapper", - "properties": { - "id": "default" - } - }, - "shape": { - "md": { - "location": { - "x": 0, - "y": 0 - }, - "size": { - "width": 3, - "height": 5 - } - }, - "sm": { - "location": { - "x": 0, - "y": 0 - }, - "size": { - "width": 3, - "height": 5 - } - }, - "lg": { - "location": { - "x": 0, - "y": 0 - }, - "size": { - "width": 3, - "height": 5 - } - } - } - }, + } + ], + "widgets": [ { "id": "date", "properties": { @@ -617,8 +528,8 @@ }, "md": { "location": { - "x": 1, - "y": 1 + "x": 4, + "y": 0 }, "size": { "width": 2, @@ -627,13 +538,102 @@ }, "lg": { "location": { - "x": 1, - "y": 1 + "x": 7, + "y": 0 + }, + "size": { + "width": 5, + "height": 2 + } + } + } + }, + { + "id": "weather", + "properties": { + "displayInFahrenheit": false, + "location": "Paris" + }, + "area": { + "type": "category", + "properties": { + "id": "47af36c0-47c1-4e5b-bfc7-ad645ee6a33f" + } + }, + "shape": { + "md": { + "location": { + "x": 0, + "y": 0 }, "size": { "width": 2, "height": 1 } + }, + "sm": { + "location": { + "x": 0, + "y": 0 + }, + "size": { + "width": 3, + "height": 1 + } + }, + "lg": { + "location": { + "x": 0, + "y": 0 + }, + "size": { + "width": 7, + "height": 2 + } + } + } + }, + { + "id": "calendar", + "properties": { + "sundayStart": false + }, + "area": { + "type": "wrapper", + "properties": { + "id": "default" + } + }, + "shape": { + "md": { + "location": { + "x": 0, + "y": 4 + }, + "size": { + "width": 3, + "height": 5 + } + }, + "sm": { + "location": { + "x": 0, + "y": 0 + }, + "size": { + "width": 3, + "height": 5 + } + }, + "lg": { + "location": { + "x": 0, + "y": 0 + }, + "size": { + "width": 3, + "height": 5 + } } } } @@ -647,8 +647,8 @@ }, "customization": { "layout": { - "enabledLeftSidebar": true, - "enabledRightSidebar": true, + "enabledLeftSidebar": false, + "enabledRightSidebar": false, "enabledDocker": false, "enabledPing": false, "enabledSearchbar": true diff --git a/src/components/Config/LoadConfig.tsx b/src/components/Config/LoadConfig.tsx index e653a19ba..0f40c62ff 100644 --- a/src/components/Config/LoadConfig.tsx +++ b/src/components/Config/LoadConfig.tsx @@ -36,7 +36,9 @@ export const LoadConfigComponent = () => { let newConfig: ConfigType = JSON.parse(fileText); if (!newConfig.schemaVersion) { - console.warn('a legacy configuration schema was deteced and migrated to the current schema'); + console.warn( + 'a legacy configuration schema was deteced and migrated to the current schema' + ); const oldConfig = JSON.parse(fileText) as Config; newConfig = migrateConfig(oldConfig); } diff --git a/src/components/Dashboard/Modals/ChangePosition/ChangeWidgetPositionModal.tsx b/src/components/Dashboard/Modals/ChangePosition/ChangeWidgetPositionModal.tsx index 4ad1db3db..60bfdb9b3 100644 --- a/src/components/Dashboard/Modals/ChangePosition/ChangeWidgetPositionModal.tsx +++ b/src/components/Dashboard/Modals/ChangePosition/ChangeWidgetPositionModal.tsx @@ -14,7 +14,7 @@ export const ChangeWidgetPositionModal = ({ }: ContextModalProps) => { const { name: configName } = useConfigContext(); const updateConfig = useConfigStore((x) => x.updateConfig); - const shapeSize = useGridstackStore(x => x.currentShapeSize); + const shapeSize = useGridstackStore((x) => x.currentShapeSize); const handleSubmit = (x: number, y: number, width: number, height: number) => { if (!configName) { @@ -72,13 +72,14 @@ const useWidthData = (integration: string): SelectItem[] => { const currentWidget = widgets[integration as keyof typeof widgets]; if (!currentWidget) return []; const offset = currentWidget.gridstack.minWidth ?? 2; - const length = (currentWidget.gridstack.maxWidth > wrapperColumnCount! - ? wrapperColumnCount! - : currentWidget.gridstack.maxWidth) - offset; + const length = + (currentWidget.gridstack.maxWidth > wrapperColumnCount! + ? wrapperColumnCount! + : currentWidget.gridstack.maxWidth) - offset; return Array.from({ length: length + 1 }, (_, i) => i + offset).map((n) => ({ value: n.toString(), // eslint-disable-next-line no-mixed-operators - label: `${(100 / wrapperColumnCount! * n).toFixed(2)}%`, + label: `${((100 / wrapperColumnCount!) * n).toFixed(2)}%`, })); }; diff --git a/src/components/Dashboard/Views/DashboardView.tsx b/src/components/Dashboard/Views/DashboardView.tsx index dac54a60c..11f6cb0b4 100644 --- a/src/components/Dashboard/Views/DashboardView.tsx +++ b/src/components/Dashboard/Views/DashboardView.tsx @@ -17,31 +17,33 @@ export const DashboardView = () => { return ( - {sidebarsVisible.isLoading ? + {sidebarsVisible.isLoading ? (
- : - <> - {sidebarsVisible.left ? ( - - ) : null} + ) : ( + <> + {sidebarsVisible.left ? ( + + ) : null} - - {!isReady ? null : wrappers.map((item) => - item.type === 'category' ? ( - - ) : ( - - ) - )} - + + {!isReady + ? null + : wrappers.map((item) => + item.type === 'category' ? ( + + ) : ( + + ) + )} + - {sidebarsVisible.right ? ( - - ) : null} - -} + {sidebarsVisible.right ? ( + + ) : null} + + )}
); }; @@ -49,8 +51,8 @@ export const DashboardView = () => { const usePrepareGridstack = () => { const mainAreaRef = useRef(null); const { width } = useResize(mainAreaRef, []); - const setMainAreaWidth = useGridstackStore(x => x.setMainAreaWidth); - const mainAreaWidth = useGridstackStore(x => x.mainAreaWidth); + const setMainAreaWidth = useGridstackStore((x) => x.setMainAreaWidth); + const mainAreaWidth = useGridstackStore((x) => x.mainAreaWidth); useEffect(() => { if (width === 0) return; diff --git a/src/components/Dashboard/Wrappers/Sidebar/Sidebar.tsx b/src/components/Dashboard/Wrappers/Sidebar/Sidebar.tsx index 08a3af69a..501e38e2a 100644 --- a/src/components/Dashboard/Wrappers/Sidebar/Sidebar.tsx +++ b/src/components/Dashboard/Wrappers/Sidebar/Sidebar.tsx @@ -9,21 +9,21 @@ interface DashboardSidebarProps extends DashboardSidebarInnerProps { } export const DashboardSidebar = ({ location, isGridstackReady }: DashboardSidebarProps) => ( - - {isGridstackReady && } - - ); + + {isGridstackReady && } + +); - interface DashboardSidebarInnerProps { - location: 'right' | 'left'; - } +interface DashboardSidebarInnerProps { + location: 'right' | 'left'; +} // Is Required because of the gridstack main area width. const SidebarInner = ({ location }: DashboardSidebarInnerProps) => { @@ -32,16 +32,17 @@ const SidebarInner = ({ location }: DashboardSidebarInnerProps) => { const minRow = useMinRowForFullHeight(refs.wrapper); return ( -
- -
); +
+ +
+ ); }; const useMinRowForFullHeight = (wrapperRef: RefObject) => diff --git a/src/components/Dashboard/Wrappers/WrapperContent.tsx b/src/components/Dashboard/Wrappers/WrapperContent.tsx index b846d2979..cfb82ae39 100644 --- a/src/components/Dashboard/Wrappers/WrapperContent.tsx +++ b/src/components/Dashboard/Wrappers/WrapperContent.tsx @@ -19,9 +19,9 @@ interface WrapperContentProps { } export function WrapperContent({ apps, refs, widgets }: WrapperContentProps) { - const shapeSize = useGridstackStore(x => x.currentShapeSize); + const shapeSize = useGridstackStore((x) => x.currentShapeSize); - if (!shapeSize) return null; + if (!shapeSize) return null; return ( <> diff --git a/src/components/Dashboard/Wrappers/gridstack/init-gridstack.ts b/src/components/Dashboard/Wrappers/gridstack/init-gridstack.ts index f95d01fe1..36836222d 100644 --- a/src/components/Dashboard/Wrappers/gridstack/init-gridstack.ts +++ b/src/components/Dashboard/Wrappers/gridstack/init-gridstack.ts @@ -64,20 +64,16 @@ export const initializeGridstack = ( grid.batchUpdate(); grid.removeAll(false); - items.forEach( - ({ id, shape }) => { - const item = itemRefs.current[id]?.current; - setAttributesFromShape(item, shape[shapeSize]); - item && grid.makeWidget(item as HTMLDivElement); - } - ); - widgets.forEach( - ({ id, shape }) => { - const item = itemRefs.current[id]?.current; - setAttributesFromShape(item, shape[shapeSize]); - item && grid.makeWidget(item as HTMLDivElement); - } - ); + items.forEach(({ id, shape }) => { + const item = itemRefs.current[id]?.current; + setAttributesFromShape(item, shape[shapeSize]); + item && grid.makeWidget(item as HTMLDivElement); + }); + widgets.forEach(({ id, shape }) => { + const item = itemRefs.current[id]?.current; + setAttributesFromShape(item, shape[shapeSize]); + item && grid.makeWidget(item as HTMLDivElement); + }); grid.batchUpdate(false); }; diff --git a/src/components/Dashboard/Wrappers/gridstack/use-gridstack.ts b/src/components/Dashboard/Wrappers/gridstack/use-gridstack.ts index e5227d33f..723eb3e84 100644 --- a/src/components/Dashboard/Wrappers/gridstack/use-gridstack.ts +++ b/src/components/Dashboard/Wrappers/gridstack/use-gridstack.ts @@ -1,11 +1,5 @@ import { GridStack, GridStackNode } from 'fily-publish-gridstack'; -import { - createRef, - MutableRefObject, - RefObject, - useEffect, useMemo, - useRef, -} from 'react'; +import { createRef, MutableRefObject, RefObject, useEffect, useMemo, useRef } from 'react'; import { useConfigContext } from '../../../../config/provider'; import { useConfigStore } from '../../../../config/store'; import { AppType } from '../../../../types/app'; @@ -39,12 +33,13 @@ export const useGridstack = ( // reference of the gridstack object for modifications after initialization const gridRef = useRef(); const wrapperColumnCount = useWrapperColumnCount(); - const shapeSize = useGridstackStore(x => x.currentShapeSize); - const mainAreaWidth = useGridstackStore(x => x.mainAreaWidth); + const shapeSize = useGridstackStore((x) => x.currentShapeSize); + const mainAreaWidth = useGridstackStore((x) => x.mainAreaWidth); // width of the wrapper (updating on page resize) const root: HTMLHtmlElement = useMemo(() => document.querySelector(':root')!, []); - if (!mainAreaWidth || !shapeSize || !wrapperColumnCount) throw new Error('UseGridstack should not be executed before mainAreaWidth has been set!'); + if (!mainAreaWidth || !shapeSize || !wrapperColumnCount) + throw new Error('UseGridstack should not be executed before mainAreaWidth has been set!'); const items = useMemo( () => @@ -86,7 +81,7 @@ export const useGridstack = ( }, [mainAreaWidth, wrapperColumnCount, gridRef.current]); useEffect(() => { - // column count is used to define count of columns of gridstack within global.scss + // column count is used to define count of columns of gridstack within global.scss root.style.setProperty('--gridstack-column-count', wrapperColumnCount.toString()); }, [wrapperColumnCount]); diff --git a/src/components/Settings/Customization/CustomizationSettings.tsx b/src/components/Settings/Customization/CustomizationSettings.tsx index 5b6def2dc..c4b2b2dee 100644 --- a/src/components/Settings/Customization/CustomizationSettings.tsx +++ b/src/components/Settings/Customization/CustomizationSettings.tsx @@ -47,7 +47,9 @@ export default function CustomizationSettings() { - + ); } diff --git a/src/config/store.ts b/src/config/store.ts index ecd7ecd58..4d32ef860 100644 --- a/src/config/store.ts +++ b/src/config/store.ts @@ -70,7 +70,7 @@ interface UseConfigStoreType { addConfig: ( name: string, config: ConfigType, - shouldSaveConfigToFileSystem: boolean, + shouldSaveConfigToFileSystem: boolean ) => Promise; updateConfig: ( name: string, diff --git a/src/hooks/use-resize.ts b/src/hooks/use-resize.ts index e9c47cf15..da6a94c3f 100644 --- a/src/hooks/use-resize.ts +++ b/src/hooks/use-resize.ts @@ -11,12 +11,8 @@ export const useResize = (myRef: MutableRefObject, depend }, [myRef]); useEffect(() => { - window.addEventListener('load', () => - handleResize() - ); - window.addEventListener('resize', () => - handleResize() - ); + window.addEventListener('load', () => handleResize()); + window.addEventListener('resize', () => handleResize()); return () => { window.removeEventListener('load', handleResize); diff --git a/src/hooks/widgets/dashDot/api.ts b/src/hooks/widgets/dashDot/api.ts index 6e8496c85..4032469e5 100644 --- a/src/hooks/widgets/dashDot/api.ts +++ b/src/hooks/widgets/dashDot/api.ts @@ -1,7 +1,10 @@ import { useMutation, useQuery } from '@tanstack/react-query'; import axios from 'axios'; import { Results } from 'sabnzbd-api'; -import { UsenetQueueRequestParams, UsenetQueueResponse } from '../../../pages/api/modules/usenet/queue'; +import { + UsenetQueueRequestParams, + UsenetQueueResponse, +} from '../../../pages/api/modules/usenet/queue'; import { UsenetHistoryRequestParams, UsenetHistoryResponse, diff --git a/src/pages/api/modules/torrents.ts b/src/pages/api/modules/torrents.ts index f47a80191..81600cace 100644 --- a/src/pages/api/modules/torrents.ts +++ b/src/pages/api/modules/torrents.ts @@ -40,7 +40,8 @@ async function Post(req: NextApiRequest, res: NextApiResponse) { ); await Promise.all( delugeApp.map((app) => { - const password = app.integration?.properties.find((x) => x.field === 'password')?.value ?? undefined; + const password = + app.integration?.properties.find((x) => x.field === 'password')?.value ?? undefined; const test = new Deluge({ baseUrl: app.url, password, diff --git a/src/widgets/WidgetWrapper.tsx b/src/widgets/WidgetWrapper.tsx index c321cbc12..da0837307 100644 --- a/src/widgets/WidgetWrapper.tsx +++ b/src/widgets/WidgetWrapper.tsx @@ -11,8 +11,8 @@ interface WidgetWrapperProps { } export const WidgetWrapper = ({ widgetId, widget, className, children }: WidgetWrapperProps) => ( - - - {children} - - ); + + + {children} + +); diff --git a/src/widgets/useNet/UseNetTile.tsx b/src/widgets/useNet/UseNetTile.tsx index c3c8d3272..61182c37e 100644 --- a/src/widgets/useNet/UseNetTile.tsx +++ b/src/widgets/useNet/UseNetTile.tsx @@ -17,7 +17,11 @@ import dayjs from 'dayjs'; import duration from 'dayjs/plugin/duration'; import { useTranslation } from 'next-i18next'; import { useConfigContext } from '../../config/provider'; -import { useGetUsenetInfo, usePauseUsenetQueue, useResumeUsenetQueue } from '../../hooks/widgets/dashDot/api'; +import { + useGetUsenetInfo, + usePauseUsenetQueue, + useResumeUsenetQueue, +} from '../../hooks/widgets/dashDot/api'; import { humanFileSize } from '../../tools/humanFileSize'; import { AppIntegrationType } from '../../types/app'; import { defineWidget } from '../helper';