diff --git a/android/src/workspace/tiles/DesktopTile.tsx b/android/src/workspace/tiles/DesktopTile.tsx index 3ed2959..fce9d4b 100644 --- a/android/src/workspace/tiles/DesktopTile.tsx +++ b/android/src/workspace/tiles/DesktopTile.tsx @@ -26,6 +26,7 @@ const DesktopTile: React.FC = ({ projectId, focused }) => { const [shot, setShot] = useState<{ name: string; b64: string } | null>(null); const load = useCallback(() => { + if (!projectId) { setVms([]); setErr(''); setLoading(false); return; } setLoading(true); setErr(''); brainApi.listProjectVms(projectId) .then(r => setVms(r.vms || [])) @@ -82,6 +83,8 @@ const DesktopTile: React.FC = ({ projectId, focused }) => { ) : err ? ( {err} + ) : !projectId ? ( + Kein aktives Projekt — wechsle in ein Projekt für dessen VMs. ) : vms.length === 0 ? ( Noch keine VM in diesem Projekt.{'\n'} diff --git a/android/src/workspace/tiles/FilesTile.tsx b/android/src/workspace/tiles/FilesTile.tsx index 76354e8..52f41f8 100644 --- a/android/src/workspace/tiles/FilesTile.tsx +++ b/android/src/workspace/tiles/FilesTile.tsx @@ -43,6 +43,7 @@ const FilesTile: React.FC = ({ projectId, focused }) => { const [previewBusy, setPreviewBusy] = useState(''); const load = useCallback(() => { + if (!projectId) { setFiles([]); setErr(''); setLoading(false); return; } setLoading(true); setErr(''); brainApi.listProjectFiles(projectId) .then(r => setFiles((r.files || []).slice().sort((a, b) => a.path.localeCompare(b.path)))) @@ -88,7 +89,7 @@ const FilesTile: React.FC = ({ projectId, focused }) => { ) : err ? ( {err} ) : files.length === 0 ? ( - Noch keine Dateien in diesem Projekt. + {!projectId ? 'Kein aktives Projekt — wechsle in ein Projekt für dessen Dateien.' : 'Noch keine Dateien in diesem Projekt.'} ) : ( files.map(f => ( open(f)} style={styles.row} disabled={previewBusy === f.path}>