-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Two more WaveShare Spectra 6 color displays (#119)
* fix a bug * 7.3" works * clear build cache * updated dither
- Loading branch information
1 parent
fa2e102
commit 50efaee
Showing
6 changed files
with
76 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
frontend/src/scenes/frame/panels/FrameSettings/frameSettingsLogic.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { kea, key, path, props } from 'kea' | ||
|
||
import type { frameSettingsLogicType } from './frameSettingsLogicType' | ||
import { loaders } from 'kea-loaders' | ||
import { apiFetch } from '../../../../utils/apiFetch' | ||
|
||
export const frameSettingsLogic = kea<frameSettingsLogicType>([ | ||
path(['src', 'scenes', 'frame', 'panels', 'FrameSettings', 'frameSettingsLogic']), | ||
props({} as { frameId: number }), | ||
key((props) => props.frameId), | ||
loaders(({ props }) => ({ | ||
buildCache: [ | ||
false, | ||
{ | ||
clearBuildCache: async () => { | ||
if (confirm('Are you sure you want to clear the build cache?')) { | ||
try { | ||
await apiFetch(`/api/frames/${props.frameId}/clear_build_cache`, { method: 'POST' }) | ||
} catch (error) { | ||
console.error(error) | ||
} | ||
} | ||
return false | ||
}, | ||
}, | ||
], | ||
})), | ||
]) |