diff --git a/categories.ts b/categories.ts index 7a888b7..6642cea 100644 --- a/categories.ts +++ b/categories.ts @@ -1,14 +1,14 @@ export default [ - 'A', - 'B', - 'C', - 'D', - 'T', 'AM', 'A1', 'A2', + 'A', 'B1', + 'B', 'C1', + 'C', 'D1', + 'D', + 'T', 'PT', ]; diff --git a/components/MediaBox.vue b/components/MediaBox.vue index a2782cd..5e2ada7 100644 --- a/components/MediaBox.vue +++ b/components/MediaBox.vue @@ -15,7 +15,7 @@ const media = computed(() => { const dotSplit = props.mediaPath?.split('.'); const extension = dotSplit?.pop()?.toLowerCase(); let type = null; - if (extension === 'jpg') { + if (extension === 'jpg' || extension === 'jpeg') { type = 'image'; } else if (extension === 'wmv') { type = 'video'; diff --git a/db/database.db b/db/database.db index b1594be..4cd2423 100644 Binary files a/db/database.db and b/db/database.db differ diff --git a/pages/index.vue b/pages/index.vue index 4dd85e3..3327d96 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -36,11 +36,14 @@ function changeLanguage() { const dark = ref(false); +const prefersDark = computed(() => + window.matchMedia + ? window.matchMedia('(prefers-color-scheme: dark)').matches + : false, +); + function getTheme() { - if ( - window.matchMedia && - window.matchMedia('(prefers-color-scheme: dark)').matches - ) { + if (prefersDark.value) { dark.value = true; } else { dark.value = false; @@ -53,6 +56,8 @@ const themeStore = useThemeStore(); function themeAuto() { themeStore.set(''); + getTheme(); + themeStore.set(''); }