Introduced ProfileStore

Corrected All Links to DataStore
This commit is contained in:
2024-12-21 22:33:42 +01:00
parent 813944fc23
commit b465f4a75a
64 changed files with 508 additions and 959 deletions

View File

@@ -2,6 +2,7 @@
const supabase = useSupabaseClient()
const dataStore = useDataStore()
const profileStore = useProfileStore()
const selectedTab = ref(0)
@@ -12,7 +13,7 @@ const accountData = ref(null)
const availableAccounts = ref(null)
const selectedAccount = ref(null)
const setupPage = async () => {
availableAccounts.value = (await supabase.from("emailAccounts").select("*").contains("profiles",[dataStore.activeProfile.id])).data
availableAccounts.value = (await supabase.from("emailAccounts").select("*").contains("profiles",[profileStore.activeProfile.id])).data
console.log(availableAccounts.value)
if(availableAccounts.value.length > 0) {

View File

@@ -2,6 +2,7 @@
const supabase = useSupabaseClient()
const dataStore = useDataStore()
const profileStore = useProfileStore()
const route = useRoute()
const router = useRouter()
const toast = useToast()
@@ -29,7 +30,7 @@ const setupPage = async () => {
} else {
emailData.value.account = emailAccounts.value[0].id
preloadedContent.value = `<p></p><p></p><p></p>${dataStore.activeProfile.emailSignature}`
preloadedContent.value = `<p></p><p></p><p></p>${profileStore.activeProfile.emailSignature}`
//Check Query
if(route.query.to) emailData.value.to = route.query.to