+
+
@@ -121,9 +123,6 @@ defineExpose({
-
diff --git a/theseus_gui/src/components/ui/RunningAppBar.vue b/theseus_gui/src/components/ui/RunningAppBar.vue
index 62d4eeff0..a48792fec 100644
--- a/theseus_gui/src/components/ui/RunningAppBar.vue
+++ b/theseus_gui/src/components/ui/RunningAppBar.vue
@@ -37,10 +37,10 @@
- {{ loadingBar.bar_type.PackDownload.pack_name }}
+ {{ loadingBar.bar_type.pack_name ?? 'Installing Modpack' }}
-
{{ loadingBar.message }}
+
{{ Math.floor(loadingBar.current) }}% {{ loadingBar.message }}
@@ -67,7 +67,8 @@ const showCard = ref(false)
const currentProcesses = ref(await getRunningProfiles())
-await process_listener(async () => {
+await process_listener(async (event) => {
+ console.log(event)
await refresh()
})
@@ -89,11 +90,7 @@ const goToTerminal = () => {
router.push(`/instance/${encodeURIComponent(currentProcesses.value[0].path)}/logs`)
}
-const currentLoadingBars = ref(
- Object.values(await progress_bars_list()).filter(
- (bar) => bar.bar_type !== 'StateInit' && Object.keys(bar.bar_type)[0] === 'PackDownload'
- )
-)
+const currentLoadingBars = ref(Object.values(await progress_bars_list()))
await loading_listener(async (event) => {
console.log('loading listener', event.message, event)
@@ -102,9 +99,7 @@ await loading_listener(async (event) => {
const refreshInfo = async () => {
const currentLoadingBarCount = currentLoadingBars.value.length
- currentLoadingBars.value = Object.values(await progress_bars_list()).filter(
- (bar) => bar.bar_type !== 'StateInit' && Object.keys(bar.bar_type)[0] === 'PackDownload'
- )
+ currentLoadingBars.value = Object.values(await progress_bars_list())
if (currentLoadingBars.value.length === 0) {
showCard.value = false
} else if (currentLoadingBarCount < currentLoadingBars.value.length) {
diff --git a/theseus_gui/src/components/ui/SplashScreen.vue b/theseus_gui/src/components/ui/SplashScreen.vue
new file mode 100644
index 000000000..c7ea66cfe
--- /dev/null
+++ b/theseus_gui/src/components/ui/SplashScreen.vue
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
diff --git a/theseus_gui/src/pages/Browse.vue b/theseus_gui/src/pages/Browse.vue
index fc42b1da7..c350e59e6 100644
--- a/theseus_gui/src/pages/Browse.vue
+++ b/theseus_gui/src/pages/Browse.vue
@@ -13,7 +13,6 @@ import {
Card,
ClientIcon,
ServerIcon,
- AnimatedLogo,
NavRow,
formatCategoryHeader,
} from 'omorphia'
@@ -23,6 +22,7 @@ import { useBreadcrumbs } from '@/store/breadcrumbs'
import { get_categories, get_loaders, get_game_versions } from '@/helpers/tags'
import { useRoute } from 'vue-router'
import Instance from '@/components/ui/Instance.vue'
+import SplashScreen from '@/components/ui/SplashScreen.vue'
const route = useRoute()
@@ -36,25 +36,28 @@ const breadcrumbs = useBreadcrumbs()
const showSnapshots = ref(false)
const loading = ref(true)
-const [categories, loaders, availableGameVersions] = await Promise.all([
- get_categories(),
- get_loaders(),
- get_game_versions(),
-])
+const categories = ref([])
+const loaders = ref([])
+const availableGameVersions = ref([])
-onMounted(() => {
+onMounted(async () => {
+ ;[categories.value, loaders.value, availableGameVersions.value] = await Promise.all([
+ get_categories(),
+ get_loaders(),
+ get_game_versions(),
+ ])
breadcrumbs.setContext({ name: 'Browse', link: route.path })
if (searchStore.projectType === 'modpack') {
searchStore.instanceContext = null
}
searchStore.searchInput = ''
- handleReset()
- switchPage(1)
+ await handleReset(true)
+ loading.value = false
})
const sortedCategories = computed(() => {
const values = new Map()
- for (const category of categories.filter(
+ for (const category of categories.value.filter(
(cat) =>
cat.project_type ===
(searchStore.projectType === 'datapack' ? 'mod' : searchStore.projectType)
@@ -67,7 +70,7 @@ const sortedCategories = computed(() => {
return values
})
-const getSearchResults = async (shouldLoad = false) => {
+const getSearchResults = async () => {
const queryString = searchStore.getQueryString()
if (searchStore.instanceContext) {
showVersions.value = false
@@ -75,16 +78,10 @@ const getSearchResults = async (shouldLoad = false) => {
searchStore.projectType === 'mod' || searchStore.projectType === 'resourcepack'
)
}
- if (shouldLoad === true) {
- loading.value = true
- }
const response = await ofetch(`https://api.modrinth.com/v2/search${queryString}`)
- loading.value = false
searchStore.setSearchResults(response)
}
-getSearchResults(true)
-
const handleReset = async () => {
searchStore.currentPage = 1
searchStore.offset = 0
@@ -131,221 +128,227 @@ watch(
-
-