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

@@ -1,8 +1,5 @@
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { useRouter } from 'vue-router'
const router = useRouter()
const notification = ref<{ type: 'success' | 'error'; message: string } | null>(null)
onMounted(() => {

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import { ref, onMounted, computed } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { useRoute } from 'vue-router'
import AdminLoading from '../components/AdminLoading.vue'
import { useEvents } from '../composables/useEvents'
import { api } from '../services/api'
@@ -8,7 +8,6 @@ import type { Event } from '../types/event'
import type { Upload } from '../types/upload'
const route = useRoute()
const router = useRouter()
const eventId = computed(() => Number(route.params.id))
const { fetchEvent } = useEvents()
@@ -37,6 +36,10 @@ function copyUploadUrl() {
alert('Upload URL copied to clipboard')
}
function openInNewTab(url: string) {
window.open(url, '_blank')
}
async function getDownloadUrl(upload: Upload) {
const { data } = await api.get<{ url: string }>(`/admin/uploads/${upload.id}/download-url`)
if (data.url) window.open(data.url, '_blank')
@@ -108,7 +111,7 @@ function statusBadge(status: string) {
<button
v-if="u.google_drive_web_link"
class="btn btn-outline-primary"
@click="window.open(u.google_drive_web_link!, '_blank')"
@click="openInNewTab(u.google_drive_web_link!)"
>
Open in Drive
</button>

View File

@@ -1,10 +1,8 @@
<script setup lang="ts">
import { onMounted } from 'vue'
import { useRouter } from 'vue-router'
import AdminLoading from '../components/AdminLoading.vue'
import { useEvents } from '../composables/useEvents'
const router = useRouter()
const { events, loading, pagination, fetchEvents, deleteEvent } = useEvents()
onMounted(() => fetchEvents())

View File

@@ -17,8 +17,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
})

View File

@@ -12,6 +12,7 @@ export interface Event {
allowed_extensions: string[]
require_password: boolean
has_password: boolean
upload_password?: string | null
created_at: string
updated_at: string
uploads_count?: number