fix(import): autofix missing sizes of items with grid-algorithm (#2522)
This commit is contained in:
1 parent
65f00f19de
commit
d410af3402
6 files changed
+115
-14
No files matched your search
@@ -1,13 +1,16 @@
|
||||
import type { BoardSize, OldmarrConfig } from "@homarr/old-schema";
|
||||
|
||||
export const mapColumnCount = (old: OldmarrConfig, screenSize: BoardSize) => {
|
||||
export const mapColumnCount = (
|
||||
gridstackSettings: OldmarrConfig["settings"]["customization"]["gridstack"],
|
||||
screenSize: BoardSize,
|
||||
) => {
|
||||
switch (screenSize) {
|
||||
case "lg":
|
||||
return old.settings.customization.gridstack.columnCountLarge;
|
||||
return gridstackSettings.columnCountLarge;
|
||||
case "md":
|
||||
return old.settings.customization.gridstack.columnCountMedium;
|
||||
return gridstackSettings.columnCountMedium;
|
||||
case "sm":
|
||||
return old.settings.customization.gridstack.columnCountSmall;
|
||||
return gridstackSettings.columnCountSmall;
|
||||
default:
|
||||
return 10;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user