Preview: Bereitschaft aus echtem Zustand statt hasPreview (Standardwert false sperrte Previews)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
04b45e4207
commit
c37dd49b05
4 files changed
+87
-14
No files matched your search
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* 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)
|
||||
}
|
||||
Reference in new issue
Block a user