You've already forked AstralRinth
Fix syncing, repairing, add edit method (#111)
* Fix syncing, repairing, add edit method * comp err * temp push up * fixes * fix more * add frontend
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
<script setup>
|
||||
import { Button, Modal, XIcon, DownloadIcon } from 'omorphia'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { install as pack_install } from '@/helpers/pack'
|
||||
import { ref } from 'vue'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
const version = ref('')
|
||||
const title = ref('')
|
||||
const icon = ref('')
|
||||
const confirmModal = ref(null)
|
||||
|
||||
defineExpose({
|
||||
show: (id) => {
|
||||
show: (id, projectTitle, projectIcon) => {
|
||||
version.value = id
|
||||
title.value = projectTitle
|
||||
icon.value = projectIcon
|
||||
confirmModal.value.show()
|
||||
},
|
||||
})
|
||||
|
||||
async function install() {
|
||||
let id = await pack_install(version.value)
|
||||
await router.push({ path: `/instance/${encodeURIComponent(id)}` })
|
||||
confirmModal.value.hide()
|
||||
await pack_install(version.value, title.value, icon.value ? icon.value : null)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user