diff --git a/package-lock.json b/package-lock.json index 3889d3c..764cd40 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@tauri-apps/api": "2.3.0", "@tauri-apps/plugin-opener": "2.2.6", "pinia": "3.0.1", + "primeicons": "7.0.0", "primevue": "4.3.1", "uuid": "11.1.0", "vue": "3.5.13", @@ -2359,6 +2360,12 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/primeicons": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/primeicons/-/primeicons-7.0.0.tgz", + "integrity": "sha512-jK3Et9UzwzTsd6tzl2RmwrVY/b8raJ3QZLzoDACj+oTJ0oX7L9Hy+XnVwgo4QVKlKpnP/Ur13SXV/pVh4LzaDw==", + "license": "MIT" + }, "node_modules/primevue": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/primevue/-/primevue-4.3.1.tgz", diff --git a/package.json b/package.json index db1967f..39f1449 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "@tauri-apps/api": "2.3.0", "@tauri-apps/plugin-opener": "2.2.6", "pinia": "3.0.1", + "primeicons": "7.0.0", "primevue": "4.3.1", "uuid": "11.1.0", "vue": "3.5.13", diff --git a/src/main.ts b/src/main.ts index a85f0f3..fd77094 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,6 +2,7 @@ import { createApp } from 'vue' import { createPinia } from 'pinia' import Aura from '@primeuix/themes/aura' import PrimeVue from 'primevue/config' +import 'primeicons/primeicons.css' import { router } from './router' import App from './App.vue' diff --git a/src/types/data.ts b/src/types/data.ts new file mode 100644 index 0000000..6cc56d3 --- /dev/null +++ b/src/types/data.ts @@ -0,0 +1,25 @@ +export const FieldTypes = [ + 'text', + 'image', + 'number', + 'dropdown', + 'toggle', +] as const + +export type FieldType = typeof FieldTypes[number] + +export interface Column { + name: string + type: FieldType +} + +export type Columns = Column[] + +export type Row = { + _id: string +} & Record + +export interface Inventory { + columns: Column[] + rows: Row[] +} diff --git a/src/views/Editor.vue b/src/views/Editor.vue index f454d84..52fc189 100644 --- a/src/views/Editor.vue +++ b/src/views/Editor.vue @@ -1,12 +1,17 @@