diff --git a/Cargo.lock b/Cargo.lock index 8859b55c2..b49d398a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8956,7 +8956,7 @@ dependencies = [ [[package]] name = "theseus" -version = "0.9.0" +version = "0.9.1" dependencies = [ "async-recursion", "async-tungstenite", @@ -9007,7 +9007,7 @@ dependencies = [ [[package]] name = "theseus_gui" -version = "0.9.0" +version = "0.9.1" dependencies = [ "chrono", "cocoa 0.25.0", diff --git a/apps/app-frontend/package.json b/apps/app-frontend/package.json index 4f2297f82..dc83eb7bc 100644 --- a/apps/app-frontend/package.json +++ b/apps/app-frontend/package.json @@ -1,7 +1,7 @@ { "name": "@modrinth/app-frontend", "private": true, - "version": "0.9.0", + "version": "0.9.1", "type": "module", "scripts": { "dev": "vite", diff --git a/apps/app-frontend/src/App.vue b/apps/app-frontend/src/App.vue index 7452562cd..786e1f312 100644 --- a/apps/app-frontend/src/App.vue +++ b/apps/app-frontend/src/App.vue @@ -16,6 +16,7 @@ import { RestoreIcon, LogOutIcon, RightArrowIcon, + LeftArrowIcon, } from '@modrinth/assets' import { Avatar, Button, ButtonStyled, Notifications, OverflowMenu } from '@modrinth/ui' import { useLoading, useTheming } from '@/store/state' @@ -256,25 +257,19 @@ themeStore.$subscribe(() => { sidebarToggled.value = !themeStore.toggleSidebar }) -const forceSidebar = ref(false) +const forceSidebar = computed( + () => route.path.startsWith('/browse') || route.path.startsWith('/project'), +) const sidebarVisible = computed(() => sidebarToggled.value || forceSidebar.value) const showAd = computed(() => !(!sidebarVisible.value || hasPlus.value)) -router.afterEach((to) => { - forceSidebar.value = to.path.startsWith('/browse') || to.path.startsWith('/project') -}) - -const currentTimeout = ref(null) watch( showAd, () => { if (!showAd.value) { - if (currentTimeout.value) clearTimeout(currentTimeout.value) hide_ads_window(true) } else { - currentTimeout.value = setTimeout(() => { - init_ads_window(true) - }, 400) + init_ads_window(true) } }, { immediate: true }, @@ -443,6 +438,20 @@ function handleAuxClick(e) {
+
+ + +
@@ -704,7 +713,7 @@ function handleAuxClick(e) { display: grid; grid-template-columns: 1fr 0px; - transition: grid-template-columns 0.4s ease-in-out; + // transition: grid-template-columns 0.4s ease-in-out; &.sidebar-enabled { grid-template-columns: 1fr 300px; diff --git a/apps/app-frontend/src/components/ui/Instance.vue b/apps/app-frontend/src/components/ui/Instance.vue index 731c9cc7d..034826b0b 100644 --- a/apps/app-frontend/src/components/ui/Instance.vue +++ b/apps/app-frontend/src/components/ui/Instance.vue @@ -35,10 +35,12 @@ const props = defineProps({ }) const playing = ref(false) - +const loading = ref(false) const modLoading = computed( () => - currentEvent.value === 'installing' || (currentEvent.value === 'launched' && !playing.value), + loading.value || + currentEvent.value === 'installing' || + (currentEvent.value === 'launched' && !playing.value), ) const installing = computed(() => props.instance.install_stage !== 'installed') @@ -56,6 +58,7 @@ const checkProcess = async () => { const play = async (e, context) => { e?.stopPropagation() + loading.value = true await run(props.instance.path) .catch((err) => handleSevereError(err, { profilePath: props.instance.path })) .finally(() => { @@ -65,6 +68,7 @@ const play = async (e, context) => { source: context, }) }) + loading.value = false } const stop = async (e, context) => { @@ -118,7 +122,7 @@ onUnmounted(() => unlisten())