Implement Curseforge profile codes

This commit is contained in:
tomasalias
2025-07-24 03:41:41 +02:00
parent 7716a0c524
commit 5fd8c38c1c
8 changed files with 1085 additions and 5 deletions

View File

@@ -163,6 +163,14 @@
<div v-else class="table-content empty">No profiles found</div>
</div>
<div class="button-row">
<Button
v-if="selectedProfileType.name === 'Curseforge'"
@click="showCurseForgeProfileModal"
:disabled="loading"
>
<CodeIcon />
Import from Profile Code
</Button>
<Button
:disabled="
loading ||
@@ -194,10 +202,12 @@
</div>
</div>
</ModalWrapper>
<CurseForgeProfileImportModal ref="curseforgeProfileModal" :close-parent="hide" />
</template>
<script setup>
import ModalWrapper from '@/components/ui/modal/ModalWrapper.vue'
import CurseForgeProfileImportModal from '@/components/ui/CurseForgeProfileImportModal.vue'
import {
CodeIcon,
FolderOpenIcon,
@@ -283,6 +293,11 @@ const hide = () => {
unlistener.value = null
}
}
const showCurseForgeProfileModal = () => {
curseforgeProfileModal.value?.show()
}
onUnmounted(() => {
if (unlistener.value) {
unlistener.value()
@@ -334,6 +349,7 @@ const game_versions = computed(() => {
})
const modal = ref(null)
const curseforgeProfileModal = ref(null)
const check_valid = computed(() => {
return (