diff --git a/README.md b/README.md index 7713fe5..7aa879d 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,20 @@ This project utilizes `pnpm`, thus it is recommended +Also use [db-prawo-jazdy](https://git.mandarynki.eu/netman/db-prawo-jazdy) for running this project + ```bash pnpm install ``` # To-do: -- [ ] re-forge database structure, script for processing, share appropriate files -- [ ] choose category +- [x] re-forge database structure (good for now) +- [ ] db: script for processing, share appropriate files +- [x] choose category (good for now) - [ ] beautify website - [ ] better answer click recognition -- [ ] come up with how to show results appropriately +- [x] come up with how to show results appropriately - [ ] i18n - pl, en, de, ua (not all questions are not available in ua, api handle) - [ ] exam (maybe also results?) warning leave message on exit (refresh) - [ ] lazy loading diff --git a/app.vue b/app.vue index 6cd7ce9..6701a98 100644 --- a/app.vue +++ b/app.vue @@ -1,5 +1,5 @@ diff --git a/components/Media.vue b/components/Media.vue index d3a7519..c4a573a 100644 --- a/components/Media.vue +++ b/components/Media.vue @@ -2,13 +2,15 @@ const runtimeConfig = useRuntimeConfig(); const cdnUrl = runtimeConfig.public.cdn_url; -defineProps<{ - media: { - fileName: string | undefined; - fileType: string | undefined; - ogName: string | null | undefined; - }; +const props = defineProps<{ + media: string | null | undefined; }>(); + +const mediaSplit = computed(() => { + const dotSplit = props.media?.split('.'); + const extension = dotSplit?.pop()?.toLowerCase(); + return [dotSplit?.join('.'), extension]; +});