17 lines
824 B
JavaScript
17 lines
824 B
JavaScript
/**
|
|
* Ist die Vorschau eines Projekts freigabebereit? Wird von /api/auth/preview-access und
|
|
* dem Staff-Preview-Open genutzt.
|
|
*
|
|
* `hasPreview` wird bewusst NICHT mehr ausgewertet: Das Appwrite-Attribut wurde am 22.07.2026
|
|
* mit Standardwert false angelegt und wird seit Commit 617d463 nicht mehr gepflegt, daher
|
|
* waere jedes neuere Projekt faelschlich gesperrt. Massgeblich ist der echte Zustand.
|
|
*/
|
|
export function isPreviewProjectReady(project) {
|
|
if (!project) return false
|
|
if (!String(project.subdomain || '').trim()) return false
|
|
if (project.previewMode === 'off') return false
|
|
if (project.projectType === 'repo' || project.projectType === 'project') return false
|
|
const status = String(project.provisioningStatus || project.status || '').toLowerCase()
|
|
return ['ready', 'deployed'].includes(status)
|
|
}
|