Fix Docker builds, TS errors, and deploy config

- API: PHP 8.4, composer install --no-scripts + dump-autoload after COPY
- Admin: fix TS (Event.upload_password, unused router, api XSRF, window.open)
- Upload: Uppy v5 (hideProgressDetails, headers, destroy), unused watch, api XSRF
- Build script: loop over api/admin/upload, push :latest as well as VERSION
- Deploy: MySQL from docker.io, platform linux/amd64; README troubleshooting

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-03 14:00:09 +01:00
parent b492df3b1a
commit 65b41ba266
12 changed files with 53 additions and 32 deletions

View File

@@ -35,7 +35,7 @@ onMounted(() => {
target: uppyContainer.value,
inline: true,
proudlyDisplayPoweredByUppy: false,
showProgressDetails: true,
hideProgressDetails: false,
height: 360,
theme: 'light',
})
@@ -49,7 +49,7 @@ onMounted(() => {
getResponseData() {
return {}
},
getRequestHeaders() {
headers: () => {
const headers: Record<string, string> = {}
const password = getPassword()
if (password) {
@@ -58,8 +58,9 @@ onMounted(() => {
const token = document.cookie
.split('; ')
.find((row) => row.startsWith('XSRF-TOKEN='))
if (token) {
headers['X-XSRF-TOKEN'] = decodeURIComponent(token.split('=')[1])
const value = token?.split('=')[1]
if (value) {
headers['X-XSRF-TOKEN'] = decodeURIComponent(value)
}
return headers
},
@@ -77,14 +78,14 @@ onMounted(() => {
onBeforeUnmount(() => {
if (successTimeout) clearTimeout(successTimeout)
uppy?.close()
uppy?.destroy()
uppy = null
})
watch(
() => props.slug,
() => {
uppy?.close()
uppy?.destroy()
uppy = null
}
)

View File

@@ -1,4 +1,4 @@
import { ref, watch, type Ref } from 'vue'
import { ref, type Ref } from 'vue'
import { api } from '../services/api'
import type { PublicEvent } from '../types/event'

View File

@@ -14,8 +14,9 @@ api.interceptors.request.use((config) => {
const token = document.cookie
.split('; ')
.find((row) => row.startsWith('XSRF-TOKEN='))
if (token) {
config.headers['X-XSRF-TOKEN'] = decodeURIComponent(token.split('=')[1])
const value = token?.split('=')[1]
if (value) {
config.headers['X-XSRF-TOKEN'] = decodeURIComponent(value)
}
return config
})