From 26f2c9ef9dfc49bc57b8cc329fd66fa6cba9af5b Mon Sep 17 00:00:00 2001 From: Jai A Date: Tue, 9 May 2023 18:48:54 -0700 Subject: [PATCH 1/5] Loading bars --- theseus_gui/src/App.vue | 25 ++-- .../components/modrinth-loading-indicator.js | 136 ++++++++++++++++++ theseus_gui/src/pages/Index.vue | 2 +- theseus_gui/src/pages/project/Index.vue | 2 + theseus_gui/src/store/loading.js | 15 ++ theseus_gui/src/store/state.js | 3 +- 6 files changed, 173 insertions(+), 10 deletions(-) create mode 100644 theseus_gui/src/components/modrinth-loading-indicator.js create mode 100644 theseus_gui/src/store/loading.js diff --git a/theseus_gui/src/App.vue b/theseus_gui/src/App.vue index fb1b7424d..10eca9aa2 100644 --- a/theseus_gui/src/App.vue +++ b/theseus_gui/src/App.vue @@ -2,12 +2,13 @@ import { onMounted } from 'vue' import { RouterView, RouterLink } from 'vue-router' import { HomeIcon, SearchIcon, LibraryIcon, PlusIcon, SettingsIcon, Button } from 'omorphia' -import { useTheming } from '@/store/state' +import {useLoading, useTheming} from '@/store/state' import AccountsCard from '@/components/ui/AccountsCard.vue' import InstanceCreationModal from '@/components/ui/InstanceCreationModal.vue' import { get } from '@/helpers/settings' import Breadcrumbs from '@/components/ui/Breadcrumbs.vue' import RunningAppBar from '@/components/ui/RunningAppBar.vue' +import ModrinthLoadingIndicator from '@/components/modrinth-loading-indicator' const themeStore = useTheming() @@ -16,6 +17,8 @@ onMounted(async () => { themeStore.setThemeState(settings) themeStore.collapsedNavigation = collapsed_navigation }) + +const loading = useLoading()