From 11e1de996299dd9b0b44d80ccb7ff9bc0d44e57a Mon Sep 17 00:00:00 2001 From: "Calum H." Date: Tue, 1 Sep 2026 00:06:16 +0100 Subject: [PATCH] fix: ux changes for sync settings/overrides (#7347) * fix: ux changes for sync settings/overrides * fix: screenshots page lag + better virtualization pass * fix: gallery issues * feat: further ux changes --- apps/app-frontend/src/App.vue | 22 +- .../components/ui/screenshots-page/card.vue | 119 ++++++-- .../components/ui/screenshots-page/group.vue | 76 ++++- .../components/ui/screenshots-page/index.vue | 174 ++++++++---- .../ui/screenshots-page/section.vue | 37 ++- .../ui/settings/display/BehaviorSettings.vue | 59 +++- .../instances/InstancesSyncedSettings.vue | 188 +++++++++++-- apps/app-frontend/src/helpers/instance.ts | 2 + apps/app-frontend/src/helpers/types.d.ts | 5 + .../app-frontend/src/locales/en-US/index.json | 118 +++++--- .../settings-modal/behavior-settings.vue | 144 ++++++++++ .../settings-modal/hooks-settings.vue | 123 ++++---- .../components/settings-modal/index.vue | 18 +- .../settings-modal/java-settings.vue | 264 ++++++++++-------- .../synced-options-settings.vue | 199 +++++++------ .../settings-modal/window-settings.vue | 112 ++++---- .../src/pages/instance/layout.vue | 41 +-- apps/app-playground/src/main.rs | 1 + apps/app/src/api/instance.rs | 45 ++- apps/labrinth/src/models/v3/preferences.rs | 2 + .../api-client/src/modules/labrinth/types.ts | 1 + ...828120000_reset-synced-option-defaults.sql | 15 + .../api/instance/screenshots/operations.rs | 9 +- .../instance/screenshots/reconciliation.rs | 173 ++++++------ .../instance/synced_options/orchestration.rs | 157 ++++++++--- .../api/instance/synced_servers/operations.rs | 43 ++- packages/app-lib/src/api/mod.rs | 13 +- .../adapters/sqlite/instance_rows.rs | 26 -- .../state/instances/commands/edit_instance.rs | 6 +- .../src/state/instances/model/launch.rs | 23 ++ .../app-lib/src/state/legacy_converter.rs | 4 +- packages/ui/src/components/base/Slider.vue | 216 ++++++++------ .../image-viewer-editor/controls.vue | 19 +- .../components/image-viewer-editor/editor.vue | 148 ++++------ .../image-viewer-editor-censor-object.ts | 129 +-------- .../image-viewer-editor-messages.ts | 3 - .../image-viewer-editor-types.ts | 3 - .../components/image-viewer-editor/index.vue | 48 +--- .../image-viewer-editor/use-image-editor.ts | 88 ++---- packages/ui/src/locales/en-US/index.json | 9 - 40 files changed, 1761 insertions(+), 1121 deletions(-) create mode 100644 apps/app-frontend/src/pages/instance/components/settings-modal/behavior-settings.vue create mode 100644 packages/app-lib/migrations/20260828120000_reset-synced-option-defaults.sql diff --git a/apps/app-frontend/src/App.vue b/apps/app-frontend/src/App.vue index 668c557a86..93b805ad8d 100644 --- a/apps/app-frontend/src/App.vue +++ b/apps/app-frontend/src/App.vue @@ -125,6 +125,7 @@ import { get as getInstance, get_global_synced_options, run, + set_global_synced_option, } from '@/helpers/instance' import { get as getCreds, @@ -151,7 +152,7 @@ import { } from '@/helpers/utils.js' import { start_join_server, start_join_singleplayer_world } from '@/helpers/worlds.ts' import i18n from '@/i18n.config' -import { instanceKeys } from '@/pages/instance/query-options' +import { instanceKeys, screenshotKeys } from '@/pages/instance/query-options' import { appUpdateState, downloadAvailableAppUpdate, @@ -1116,6 +1117,25 @@ watch( settings.hide_nametag_skins_page = behavior.hide_nametag settingsChanged = true } + + const showAllScreenshots = behavior.show_all_screenshots + if (typeof showAllScreenshots === 'boolean') { + const globalSyncedOptions = + globalSyncedOptionsQuery.data.value ?? + (await queryClient.fetchQuery({ + queryKey: ['global-synced-options'], + queryFn: get_global_synced_options, + })) + if (globalSyncedOptions.screenshots !== showAllScreenshots) { + const updatedGlobalSyncedOptions = await set_global_synced_option( + 'screenshots', + showAllScreenshots, + ) + queryClient.setQueryData(['global-synced-options'], updatedGlobalSyncedOptions) + await queryClient.invalidateQueries({ queryKey: screenshotKeys.all }) + } + } + for (const [flag, value] of Object.entries(behaviorFeatureFlags)) { if (settings.feature_flags[flag] !== value) { settings.feature_flags[flag] = value diff --git a/apps/app-frontend/src/components/ui/screenshots-page/card.vue b/apps/app-frontend/src/components/ui/screenshots-page/card.vue index adf1222ef8..f1de4c6532 100644 --- a/apps/app-frontend/src/components/ui/screenshots-page/card.vue +++ b/apps/app-frontend/src/components/ui/screenshots-page/card.vue @@ -3,11 +3,16 @@ @@ -91,7 +166,7 @@ watch( ref="card" role="button" tabindex="0" - class="group relative aspect-video min-w-0 cursor-pointer overflow-hidden rounded-xl border border-solid border-surface-5 bg-surface-2 p-0 text-left shadow-sm transition-[filter] hover:brightness-110 focus-visible:outline focus-visible:outline-2 focus-visible:outline-brand" + class="group relative isolate aspect-video min-w-0 cursor-pointer overflow-hidden rounded-xl border border-solid border-surface-5 bg-surface-2 p-0 text-left shadow-sm transition-[filter] hover:brightness-110 focus-visible:outline focus-visible:outline-2 focus-visible:outline-brand" :class="{ '!border-contrast brightness-110': selected, '!border-brand ring-2 ring-brand animate-pulse': highlighted, @@ -115,7 +190,7 @@ watch( > -