Skip to content

Commit

Permalink
test config migrator
Browse files Browse the repository at this point in the history
  • Loading branch information
YeonV committed Feb 14, 2025
1 parent dd2c088 commit 8802788
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
36 changes: 35 additions & 1 deletion src/store/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* eslint-disable @typescript-eslint/no-unused-vars */

import { produce } from 'immer'
import { Ledfx } from '../api/ledfx'

export interface MigrationState {
[key: string]: any
Expand Down Expand Up @@ -44,5 +45,38 @@ export const migrations: Migrations = {
}),

16: (state) => ({ ...state }),
17: (state) => ({ ...state })
17: (state) => ({ ...state }),
18: (state) => ({
...state,
updateScene: async (
name: string,
id: string,
scene_image?: string | null,
scene_tags?: string | null,
scene_puturl?: string | null,
scene_payload?: string | null,
scene_midiactivate?: string | null,
virtuals?: Record<string, any>
) =>
virtuals
? await Ledfx('/api/scenes', 'POST', {
name,
id,
scene_image,
scene_tags,
scene_puturl,
scene_payload,
scene_midiactivate,
virtuals
})
: await Ledfx('/api/scenes', 'POST', {
name,
id,
scene_image,
scene_tags,
scene_puturl,
scene_payload,
scene_midiactivate
})
})
}
2 changes: 1 addition & 1 deletion src/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { IMCell } from '../pages/Devices/EditVirtuals/EditMatrix/M.utils'

export const drawerWidth = 240
export const frontendConfig = 17
export const frontendConfig = 18

export const formatTime = (dura: number) => {
let seconds: string | number
Expand Down

0 comments on commit 8802788

Please sign in to comment.