fix(frontend): stop gallery upload crashing in settings #5207
+229
−202
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Fixes gallery image uploads from project settings by removing the
this.*access that crashed before the request was sent, and by using the injected project context + notification manager directly. Also solved #5202.Why
On
settings/gallery, clicking “Add gallery image” could throwTypeError: this.project is undefined(no POST fired) and thenTypeError: this.addNotification is not a function, leaving users with a stuck progress bar and no error.How
apps/frontend/src/pages/[type]/[id]/settings/gallery.vueto a single<script setup lang="ts">implementationinjectProjectPageContext()/injectNotificationManager()in-module (no Options APIthis)useTemplateReffor modals instead of$refsfinallyTesting
pnpm prepr:frontend:webNotes
This aligns the settings page behavior with the already-migrated
apps/frontend/src/pages/[type]/[id]/gallery.vue.