fix: Client-Upload akzeptiert SECRET_KEY oder JWT_SECRET_KEY + Download in Settings
Upload-Auth: - Akzeptiert jetzt sowohl SECRET_KEY als auch JWT_SECRET_KEY (BUILD_UPLOAD_TOKEN in Entwicklungs-.env kann einer von beiden sein) Settings-View: - Zeigt verfuegbare Desktop/Mobile Clients zum Download an (nur wenn mindestens ein Client vorhanden) - Pro Client: Name, Dateiname, Download-Button .env.example: - Klarere Kommentare: "SECRET_KEY oder JWT_SECRET_KEY des Zielservers" Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -45,6 +45,24 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Client Downloads -->
|
||||
<div v-if="availableClients.length" class="settings-section">
|
||||
<h3>Desktop & Mobile Clients</h3>
|
||||
<div class="client-list">
|
||||
<div v-for="client in availableClients" :key="client.platform" class="client-item">
|
||||
<div class="client-info">
|
||||
<i :class="'pi ' + (client.platform === 'linux' || client.platform === 'windows' || client.platform === 'mac' ? 'pi-desktop' : 'pi-mobile')"></i>
|
||||
<div>
|
||||
<strong>{{ client.name }}</strong>
|
||||
<span class="client-meta">{{ client.filename }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<Button icon="pi pi-download" :label="'Download'" size="small" outlined
|
||||
@click="downloadClient(client)" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Email Accounts -->
|
||||
<div class="settings-section">
|
||||
<div class="section-header">
|
||||
@@ -167,6 +185,13 @@ import InputSwitch from 'primevue/inputswitch'
|
||||
const auth = useAuthStore()
|
||||
const toast = useToast()
|
||||
|
||||
// Client downloads
|
||||
const availableClients = ref([])
|
||||
|
||||
function downloadClient(client) {
|
||||
window.location.href = `/api/clients/${client.platform}/download`
|
||||
}
|
||||
|
||||
// --- Password change ---
|
||||
const currentPassword = ref('')
|
||||
const newPassword = ref('')
|
||||
@@ -307,7 +332,13 @@ async function doDeleteAccount() {
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(loadAccounts)
|
||||
onMounted(async () => {
|
||||
loadAccounts()
|
||||
try {
|
||||
const res = await apiClient.get('/clients')
|
||||
availableClients.value = res.data.clients
|
||||
} catch { availableClients.value = [] }
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@@ -346,4 +377,12 @@ onMounted(loadAccounts)
|
||||
.field label { display: block; margin-bottom: 0.5rem; font-weight: 500; font-size: 0.875rem; }
|
||||
.field-row { display: flex; gap: 0.75rem; align-items: flex-end; }
|
||||
.flex-grow { flex: 1; }
|
||||
.client-list { display: flex; flex-direction: column; gap: 0.5rem; }
|
||||
.client-item {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
padding: 0.75rem; border: 1px solid var(--p-surface-200); border-radius: 8px;
|
||||
}
|
||||
.client-info { display: flex; align-items: center; gap: 0.75rem; }
|
||||
.client-info i { font-size: 1.25rem; color: var(--p-primary-color); }
|
||||
.client-meta { display: block; font-size: 0.8rem; color: var(--p-text-muted-color); }
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user