feat: add onboarding with oldmarr import (#1606)
This commit is contained in:
21
packages/old-import/src/prepare/prepare-single.ts
Normal file
21
packages/old-import/src/prepare/prepare-single.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { OldmarrConfig } from "@homarr/old-schema";
|
||||
|
||||
import type { OldmarrImportConfiguration } from "../settings";
|
||||
import { prepareApps } from "./prepare-apps";
|
||||
|
||||
export const prepareSingleImport = (config: OldmarrConfig, settings: OldmarrImportConfiguration) => {
|
||||
const validAnalyseConfigs = [{ name: settings.name, config, isError: false }];
|
||||
|
||||
return {
|
||||
preparedApps: prepareApps(validAnalyseConfigs),
|
||||
preparedBoards: settings.onlyImportApps
|
||||
? []
|
||||
: [
|
||||
{
|
||||
name: settings.name,
|
||||
size: settings.screenSize,
|
||||
config,
|
||||
},
|
||||
],
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user