This repository has been archived by the owner on Oct 20, 2024. It is now read-only.
generated from SbokyZahodi/FSD-Nuxt3-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from SbokyZahodi/1.2.0
1.2.0
- Loading branch information
Showing
18 changed files
with
165 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<script setup lang="ts"> | ||
import type { NuxtError } from '#app' | ||
defineProps({ | ||
error: Object as () => NuxtError, | ||
}) | ||
const handleError = () => clearError({ redirect: '/' }) | ||
</script> | ||
|
||
<template> | ||
<UCard class="center h-90vh m-10 light:bg-blue-1"> | ||
<UNotFound class=""> | ||
<template v-if="error.statusCode === 404"> | ||
<h2 class="text-3xl"> | ||
{{ error.statusCode }} | ||
</h2> | ||
<UButton class="mt-4 w-50 center" size="xl" @click="handleError"> | ||
Back to home | ||
</UButton> | ||
</template> | ||
<template v-else> | ||
<h2 class="text-3xl"> | ||
{{ error.statusCode }} | ||
</h2> | ||
<NuxtLink to="https://github.com/SbokyZahodi/modpack-constructor/issues"> | ||
<UButton class="mt-4 w-50 center" size="xl"> | ||
Create issue | ||
</UButton> | ||
</NuxtLink> | ||
</template> | ||
</UNotFound> | ||
</UCard> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from './api' | ||
export * from './model' | ||
export * from './ui' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<script lang='ts' setup> | ||
import saveAs from 'file-saver' | ||
const props = defineProps<{ | ||
modlist: IShortModInfo[] | ||
}>() | ||
const pending = ref(false) | ||
async function saveModlistAsTxt() { | ||
const modlist = await $api<IModInfo[]>('projects', { | ||
params: { | ||
ids: JSON.stringify(props.modlist.map(mod => mod.slug)), | ||
}, | ||
onRequest() { | ||
pending.value = true | ||
}, | ||
onResponse() { | ||
pending.value = false | ||
}, | ||
onRequestError({ error }) { | ||
useToast().add({ title: error.message, color: 'red' }) | ||
pending.value = false | ||
}, | ||
}) | ||
const title = `Total mods: ${modlist.length}` | ||
const mods = modlist.map(mod => `* (${mod.title}) - ${mod.description} | https://modrinth.com/mod/${mod.slug}`).join('\n\n') | ||
const file = `${title}\n \n${mods}` | ||
const blob = new Blob([file], { type: 'text/plain;charset=utf-8' }) | ||
saveAs(blob, 'modlist.txt') | ||
} | ||
</script> | ||
|
||
<template> | ||
<UButton :loading="pending" @click="saveModlistAsTxt"> | ||
Mods installed: {{ modlist.length }} | ||
</UButton> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import CopyModList from './CopyModList.vue' | ||
|
||
export { CopyModList } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters