diff --git a/patches/0005-Make-the-sidebars-foldable.patch b/patches/0005-Make-the-sidebars-foldable.patch index 06ccc04..512acff 100644 --- a/patches/0005-Make-the-sidebars-foldable.patch +++ b/patches/0005-Make-the-sidebars-foldable.patch @@ -16,6 +16,11 @@ restart without needing a settings migration: works, and still seeds the state. Its label was pointing at the wrong message ("Next image"), which is fixed here too. +Once the fold state is saved, a check pops onto the button and its +tooltip says it is remembered after a restart, since nothing else shows +that. On pages that need the sidebar (browse, projects, users) the button +stays in place, disabled, instead of vanishing and shifting the title bar. + None of these three reach Modrinth. Preference syncing maps a fixed list of named fields in both directions, and these are not in it, so they are neither sent nor overwritten by another device. @@ -25,25 +30,26 @@ page headed "Sync features across devices" and would otherwise look like it syncs. The other two are not settings entries - a heading and a title bar button - so nothing there promises anything. --- - apps/app-frontend/src/App.vue | 67 ++++++++++++++++--- - .../ui/settings/display/FeaturesSettings.vue | 28 ++++++++ - .../src/composables/use-app-settings.ts | 3 + - packages/app-lib/src/state/settings.rs | 3 + - 4 files changed, 92 insertions(+), 9 deletions(-) + apps/app-frontend/src/App.vue | 153 ++++++++++++++++-- + .../ui/settings/display/FeaturesSettings.vue | 28 ++++ + .../src/composables/use-app-settings.ts | 3 + + packages/app-lib/src/state/settings.rs | 3 + + 4 files changed, 172 insertions(+), 15 deletions(-) diff --git a/apps/app-frontend/src/App.vue b/apps/app-frontend/src/App.vue -index e5c6fd4..a9e3945 100644 +index e5c6fd4..2f6cdce 100644 --- a/apps/app-frontend/src/App.vue +++ b/apps/app-frontend/src/App.vue -@@ -10,6 +10,7 @@ import { +@@ -10,6 +10,8 @@ import { } from '@modrinth/api-client' import { ArrowLeftRightIcon, ++ CheckIcon, + ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CompassIcon, -@@ -254,12 +255,31 @@ const credentials = ref() +@@ -254,12 +256,41 @@ const credentials = ref() const storedModrinthAccounts = ref([]) let credentialsRefreshId = 0 const sidebarToggled = ref(true) @@ -60,11 +66,16 @@ index e5c6fd4..a9e3945 100644 + sidebarToggled.value = !collapsed }, + { immediate: true }, - ) ++) +watch( + () => appSettings.toggleSidebar, + (hide) => setSidebarCollapsed(hide), -+) + ) ++ ++// Briefly shows a check on the fold button once the state is saved, so it is ++// clear the choice is remembered. ++const sidebarSaved = ref(false) ++let sidebarSavedTimeout + +function setSidebarCollapsed(collapsed) { + appSettings.featureFlags.right_sidebar_collapsed = collapsed @@ -73,12 +84,17 @@ index e5c6fd4..a9e3945 100644 + settings.feature_flags.right_sidebar_collapsed = collapsed + return setSettings(settings) + }) ++ .then(() => { ++ sidebarSaved.value = true ++ clearTimeout(sidebarSavedTimeout) ++ sidebarSavedTimeout = setTimeout(() => (sidebarSaved.value = false), 1600) ++ }) + .catch(handleError) +} const forceSidebar = computed( () => route.path.startsWith('/browse') || -@@ -358,6 +378,21 @@ useQuery({ +@@ -358,6 +389,21 @@ useQuery({ // ad and the gradient being drawn above it. const showAd = computed(() => false) const adConsentAvailable = computed(() => false) @@ -100,16 +116,24 @@ index e5c6fd4..a9e3945 100644 providePageContext({ hierarchicalSidebarAvailable: ref(true), showAds: showAd, -@@ -588,6 +623,8 @@ const messages = defineMessages({ +@@ -588,6 +634,16 @@ const messages = defineMessages({ goBack: { id: 'app.navigation.go-back', defaultMessage: 'Go back' }, goForward: { id: 'app.navigation.go-forward', defaultMessage: 'Go forward' }, nextImage: { id: 'app.navigation.next-image', defaultMessage: 'Next image' }, + hideSidebar: { id: 'app.navigation.hide-sidebar', defaultMessage: 'Hide sidebar' }, + showSidebar: { id: 'app.navigation.show-sidebar', defaultMessage: 'Show sidebar' }, ++ sidebarRemembered: { ++ id: 'app.navigation.sidebar-remembered', ++ defaultMessage: 'Remembered after restart', ++ }, ++ sidebarRequired: { ++ id: 'app.navigation.sidebar-required', ++ defaultMessage: 'This page needs the sidebar', ++ }, updateDownloadMissingVersion: { id: 'app.update.download-error.missing-version', defaultMessage: 'Failed to download update: no version available', -@@ -2252,6 +2289,7 @@ provideAppUpdateDownloadProgress(appUpdateDownload) +@@ -2252,6 +2308,7 @@ provideAppUpdateDownloadProgress(appUpdateDownload)
- ++ - - -@@ -2502,10 +2543,18 @@ provideAppUpdateDownloadProgress(appUpdateDownload) +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ +
+ + +@@ -2502,10 +2587,18 @@ provideAppUpdateDownloadProgress(appUpdateDownload) class="p-4 border-0 border-b-[1px] border-[--brand-gradient-border] border-solid" />
@@ -158,6 +217,43 @@ index e5c6fd4..a9e3945 100644 { +@@ -540,6 +540,16 @@ watch([os, isFullscreen], ([osName, fullscreen]) => { document.documentElement.classList.toggle('mac-traffic-lights', osName === 'MacOS' && !fullscreen) }) diff --git a/patches/0009-Scroll-with-the-middle-mouse-button.patch b/patches/0009-Scroll-with-the-middle-mouse-button.patch index dfc2898..d705815 100644 --- a/patches/0009-Scroll-with-the-middle-mouse-button.patch +++ b/patches/0009-Scroll-with-the-middle-mouse-button.patch @@ -11,10 +11,10 @@ Subject: [PATCH] Scroll with the middle mouse button create mode 100644 apps/app-frontend/src/helpers/autoscroll.ts diff --git a/apps/app-frontend/src/App.vue b/apps/app-frontend/src/App.vue -index 5a32c65..469ae08 100644 +index 9412821..9f7f5e0 100644 --- a/apps/app-frontend/src/App.vue +++ b/apps/app-frontend/src/App.vue -@@ -123,6 +123,7 @@ import { +@@ -124,6 +124,7 @@ import { } from '@/helpers/ads.js' import { debugAnalytics, initAnalytics, trackEvent } from '@/helpers/analytics' import { check_reachable } from '@/helpers/auth.js' @@ -22,7 +22,7 @@ index 5a32c65..469ae08 100644 import { get_user, get_user_many, get_version } from '@/helpers/cache.js' import { gameSettingsQueryOptions } from '@/helpers/game-options' import { install_create_modpack_instance, install_get_modpack_preview } from '@/helpers/install' -@@ -589,11 +590,18 @@ onMounted(async () => { +@@ -600,11 +601,18 @@ onMounted(async () => { document.querySelector('body').addEventListener('auxclick', handleAuxClick) document.querySelector('body').addEventListener('contextmenu', handleContextMenu) document.addEventListener('fullscreenchange', handleFullscreenChange)