Add boilerplate files and licenses
This commit is contained in:
4
src/atoms/deviceSku.ts
Normal file
4
src/atoms/deviceSku.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import { atom } from 'jotai';
|
||||
import { SKU_EP133 } from '~/lib/constants';
|
||||
|
||||
export const deviceSkuAtom = atom<string>(SKU_EP133);
|
||||
13
src/atoms/droppedProjectFile.ts
Normal file
13
src/atoms/droppedProjectFile.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { atom } from 'jotai';
|
||||
import type JSZip from 'jszip';
|
||||
|
||||
export type DroppedProjectFile = {
|
||||
name: string;
|
||||
data: Uint8Array;
|
||||
};
|
||||
|
||||
export const droppedProjectFileAtom = atom<DroppedProjectFile | null>(null);
|
||||
export const droppedBackupFileAtom = atom<Uint8Array | null>(null);
|
||||
export const unzippedBackupAtom = atom<JSZip | null>(null);
|
||||
export const backupSkuAtom = atom<string | null>(null);
|
||||
export const backupProjectIdsAtom = atom<number[]>([]);
|
||||
3
src/atoms/feedbackDialog.ts
Normal file
3
src/atoms/feedbackDialog.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { atom } from 'jotai';
|
||||
|
||||
export const feedbackDialogAtom = atom<boolean>(false);
|
||||
4
src/atoms/project.ts
Normal file
4
src/atoms/project.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import { atom } from 'jotai';
|
||||
|
||||
export const projectIdAtom = atom<string>('');
|
||||
export const customSceneNamesByProjectAtom = atom<Record<string, boolean>>({});
|
||||
3
src/atoms/swUpdate.ts
Normal file
3
src/atoms/swUpdate.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { atom } from 'jotai';
|
||||
|
||||
export const swUpdateAvailableAtom = atom(false);
|
||||
19
src/atoms/toast.ts
Normal file
19
src/atoms/toast.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { atom } from 'jotai';
|
||||
|
||||
export type ToastSeverity = 'info' | 'error';
|
||||
|
||||
export interface ToastMessage {
|
||||
id: string;
|
||||
message: string;
|
||||
severity: ToastSeverity;
|
||||
timestamp: number;
|
||||
}
|
||||
|
||||
export const toastsAtom = atom<ToastMessage[]>([]);
|
||||
|
||||
export const removeToastAtom = atom(null, (get, set, id: string) => {
|
||||
set(
|
||||
toastsAtom,
|
||||
get(toastsAtom).filter((toast) => toast.id !== id),
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user