forked from rajun/ar-test
feat: add asset constants
This commit is contained in:
parent
b3f7504459
commit
d96b06803a
48
app/data/assets/constants.ts
Normal file
48
app/data/assets/constants.ts
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
export const ASSETS_COLLECTION = 'ar_assets';
|
||||||
|
export const ASSETS_PAGE_SIZE = 12;
|
||||||
|
|
||||||
|
export const ASSET_INTENT = {
|
||||||
|
create: 'create',
|
||||||
|
update: 'update',
|
||||||
|
delete: 'delete',
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
export type AssetIntent = (typeof ASSET_INTENT)[keyof typeof ASSET_INTENT];
|
||||||
|
|
||||||
|
export const MODEL_SOURCE_MODES = ['file', 'url'] as const;
|
||||||
|
export type ModelSourceMode = (typeof MODEL_SOURCE_MODES)[number];
|
||||||
|
|
||||||
|
export const MODEL_SOURCE_OPTIONS: { value: ModelSourceMode; label: string }[] = [
|
||||||
|
{ value: 'file', label: 'Upload' },
|
||||||
|
{ value: 'url', label: 'URL' },
|
||||||
|
];
|
||||||
|
|
||||||
|
export const MODEL_FIELDS = {
|
||||||
|
glb: {
|
||||||
|
label: 'Model (GLB)',
|
||||||
|
hint: 'Used on Android and the web.',
|
||||||
|
accept: '.glb',
|
||||||
|
urlPlaceholder: 'https://example.com/model.glb',
|
||||||
|
},
|
||||||
|
usdz: {
|
||||||
|
label: 'Model (USDZ)',
|
||||||
|
hint: 'Optional — used on iPhone and iPad.',
|
||||||
|
accept: '.usdz,.reality',
|
||||||
|
urlPlaceholder: 'https://example.com/model.usdz',
|
||||||
|
},
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
export type ModelFieldName = keyof typeof MODEL_FIELDS;
|
||||||
|
|
||||||
|
// `?filter=` on the assets page: everything, assets without a project, or a project ID
|
||||||
|
export const ASSET_FILTER = {
|
||||||
|
param: 'filter',
|
||||||
|
all: 'all',
|
||||||
|
unassigned: 'unassigned',
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
// Unassigned in the project select (Radix Select can't use an empty value)
|
||||||
|
export const NO_PROJECT = 'none';
|
||||||
|
|
||||||
|
// QR codes stay pure black on white so every phone camera can read them
|
||||||
|
export const QR_COLORS = { dark: '#000000', light: '#ffffff' } as const;
|
||||||
Loading…
x
Reference in New Issue
Block a user