refactor: use external registry url and remove legacy scripts

This commit is contained in:
dyzulk
2026-01-18 18:23:32 +07:00
parent 1661fa17ee
commit eb9627c54f
4 changed files with 19 additions and 226 deletions

View File

@@ -12,15 +12,29 @@ const searchQuery = ref('')
const activeCategory = ref('All')
// Fetch data
onMounted(async () => {
const fetchPlugins = async () => {
loading.value = true
try {
const res = await fetch('/plugins.json')
plugins.value = await res.json()
// Fetch from the external registry repository
const response = await fetch('https://mivodev.github.io/registry/plugins.json')
if (!response.ok) throw new Error('Failed to fetch plugins')
plugins.value = await response.json()
} catch (e) {
console.error("Failed to load plugins", e)
console.error(e)
// Fallback for local dev or if registry is down
try {
const localRes = await fetch('/plugins.json')
if (localRes.ok) plugins.value = await localRes.json()
} catch (err) {
console.error('Local fallback failed', err)
}
} finally {
loading.value = false
}
}
onMounted(async () => {
fetchPlugins()
})
// Categories

View File

@@ -15,7 +15,7 @@ const formatSize = (bytes) => {
onMounted(async () => {
try {
const res = await fetch('/releases.json')
const res = await fetch('https://mivodev.github.io/registry/releases.json')
if (!res.ok) throw new Error('Failed to load releases')
releases.value = await res.json()
} catch (e) {