tuning ui and adding adaptive themeing to extension

This commit is contained in:
Bryan Van Deusen
2026-01-25 18:47:06 -05:00
parent dc6755a0c2
commit 997f31ae27
23 changed files with 978 additions and 114 deletions
+33
View File
@@ -0,0 +1,33 @@
import { defineStore } from 'pinia'
import { ref } from 'vue'
import { credentialsApi } from '../services/api'
export const useCredentialsStore = defineStore('credentials', () => {
const credentials = ref([])
const platforms = ref({})
const loading = ref(false)
async function fetchCredentials() {
loading.value = true
try {
const response = await credentialsApi.list()
credentials.value = response.data.items
platforms.value = response.data.platforms || {}
return response.data
} finally {
loading.value = false
}
}
function hasPlatformCredentials(platform) {
return !!platforms.value[platform]
}
return {
credentials,
platforms,
loading,
fetchCredentials,
hasPlatformCredentials,
}
})
+11 -2
View File
@@ -4,6 +4,7 @@ import { downloadsApi } from '../services/api'
export const useDownloadsStore = defineStore('downloads', () => {
const downloads = ref([])
const recentActivity = ref([])
const stats = ref(null)
const loading = ref(false)
const total = ref(0)
@@ -13,9 +14,9 @@ export const useDownloadsStore = defineStore('downloads', () => {
async function fetchDownloads(params = {}) {
loading.value = true
try {
// Use provided per_page or default to 1000 for client-side pagination
const response = await downloadsApi.list({
page: currentPage.value,
per_page: perPage.value,
per_page: params.per_page || 1000,
...params,
})
downloads.value = response.data.items
@@ -26,6 +27,12 @@ export const useDownloadsStore = defineStore('downloads', () => {
}
}
async function fetchRecentActivity(params = {}) {
const response = await downloadsApi.recentActivity(params)
recentActivity.value = response.data.items
return response.data
}
async function fetchStats(params = {}) {
const response = await downloadsApi.stats(params)
stats.value = response.data
@@ -38,12 +45,14 @@ export const useDownloadsStore = defineStore('downloads', () => {
return {
downloads,
recentActivity,
stats,
loading,
total,
currentPage,
perPage,
fetchDownloads,
fetchRecentActivity,
fetchStats,
retryDownload,
}
+2 -2
View File
@@ -15,9 +15,9 @@ export const useSubscriptionsStore = defineStore('subscriptions', () => {
async function fetchSubscriptions(params = {}) {
loading.value = true
try {
// Fetch all items for client-side pagination in v-data-table
const response = await subscriptionsApi.list({
page: currentPage.value,
per_page: perPage.value,
per_page: 1000,
...params,
})
subscriptions.value = response.data.items