feat: cloud upload - multi-image, category select, capture time, progress bar

This commit is contained in:
2026-05-21 01:14:19 +08:00
parent d4b07fba58
commit cb2581afb2
5 changed files with 650 additions and 6 deletions
+24
View File
@@ -0,0 +1,24 @@
import { defineStore } from 'pinia'
import { ref } from 'vue'
import { supabase } from '@/lib/supabase'
import type { CloudType } from '@/types/database'
export const useCloudsStore = defineStore('clouds', () => {
const cloudTypes = ref<CloudType[]>([])
const loading = ref(false)
async function fetchCloudTypes() {
if (cloudTypes.value.length > 0) return
loading.value = true
const { data } = await supabase
.from('cloud_types')
.select('*')
.order('id')
if (data) {
cloudTypes.value = data as CloudType[]
}
loading.value = false
}
return { cloudTypes, loading, fetchCloudTypes }
})