Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef826d1ed1 | ||
|
|
933836f0a6 | ||
|
|
e04d8f360b | ||
|
|
4685632294 |
@@ -79,8 +79,8 @@ android {
|
|||||||
applicationId "com.ariacockpit"
|
applicationId "com.ariacockpit"
|
||||||
minSdkVersion rootProject.ext.minSdkVersion
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode 20205
|
versionCode 20207
|
||||||
versionName "0.2.2.5"
|
versionName "0.2.2.7"
|
||||||
// Fallback fuer Libraries mit Product Flavors
|
// Fallback fuer Libraries mit Product Flavors
|
||||||
missingDimensionStrategy 'react-native-camera', 'general'
|
missingDimensionStrategy 'react-native-camera', 'general'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "aria-cockpit",
|
"name": "aria-cockpit",
|
||||||
"version": "0.2.2.5",
|
"version": "0.2.2.7",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"android": "react-native run-android",
|
"android": "react-native run-android",
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ const DesktopTile: React.FC<Props> = ({ projectId, focused }) => {
|
|||||||
const [shot, setShot] = useState<{ name: string; b64: string } | null>(null);
|
const [shot, setShot] = useState<{ name: string; b64: string } | null>(null);
|
||||||
|
|
||||||
const load = useCallback(() => {
|
const load = useCallback(() => {
|
||||||
|
if (!projectId) { setVms([]); setErr(''); setLoading(false); return; }
|
||||||
setLoading(true); setErr('');
|
setLoading(true); setErr('');
|
||||||
brainApi.listProjectVms(projectId)
|
brainApi.listProjectVms(projectId)
|
||||||
.then(r => setVms(r.vms || []))
|
.then(r => setVms(r.vms || []))
|
||||||
@@ -71,21 +72,6 @@ const DesktopTile: React.FC<Props> = ({ projectId, focused }) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verbunden → noVNC-Ansicht der VM + Zurück-Leiste.
|
|
||||||
if (connected) {
|
|
||||||
return (
|
|
||||||
<View style={styles.container}>
|
|
||||||
<View style={styles.bar}>
|
|
||||||
<TouchableOpacity onPress={() => setConnected(null)} style={styles.barBtn}>
|
|
||||||
<Text style={styles.barBtnText}>‹ VMs</Text>
|
|
||||||
</TouchableOpacity>
|
|
||||||
<Text style={styles.barTitle} numberOfLines={1}>{connected.name} · :{connected.vnc_display}</Text>
|
|
||||||
</View>
|
|
||||||
<VncTile projectId={projectId} focused port={connected.vnc_port || (5900 + (connected.vnc_display || 1))} />
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<View style={styles.bar}>
|
<View style={styles.bar}>
|
||||||
@@ -97,6 +83,8 @@ const DesktopTile: React.FC<Props> = ({ projectId, focused }) => {
|
|||||||
<ActivityIndicator color="#0096FF" style={{ marginTop: 20 }} />
|
<ActivityIndicator color="#0096FF" style={{ marginTop: 20 }} />
|
||||||
) : err ? (
|
) : err ? (
|
||||||
<Text style={styles.err}>{err}</Text>
|
<Text style={styles.err}>{err}</Text>
|
||||||
|
) : !projectId ? (
|
||||||
|
<Text style={styles.empty}>Kein aktives Projekt — wechsle in ein Projekt für dessen VMs.</Text>
|
||||||
) : vms.length === 0 ? (
|
) : vms.length === 0 ? (
|
||||||
<Text style={styles.empty}>
|
<Text style={styles.empty}>
|
||||||
Noch keine VM in diesem Projekt.{'\n'}
|
Noch keine VM in diesem Projekt.{'\n'}
|
||||||
@@ -157,6 +145,18 @@ const DesktopTile: React.FC<Props> = ({ projectId, focused }) => {
|
|||||||
<Text style={styles.shotHint}>Tippen zum Schließen</Text>
|
<Text style={styles.shotHint}>Tippen zum Schließen</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
|
{/* Vollbild-VNC — randlos ueber das ganze Display (Header + Dock weg). */}
|
||||||
|
{connected && (
|
||||||
|
<Modal visible animationType="slide" onRequestClose={() => setConnected(null)} supportedOrientations={['portrait', 'landscape']}>
|
||||||
|
<View style={styles.fs}>
|
||||||
|
<VncTile projectId={projectId} focused port={connected.vnc_port || (5900 + (connected.vnc_display || 1))} />
|
||||||
|
<TouchableOpacity style={styles.fsBack} onPress={() => setConnected(null)} activeOpacity={0.8}>
|
||||||
|
<Text style={styles.fsBackText}>‹ VMs</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
</View>
|
||||||
|
</Modal>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -180,6 +180,9 @@ const styles = StyleSheet.create({
|
|||||||
vmBtns: { flexDirection: 'row', gap: 6, alignItems: 'center' },
|
vmBtns: { flexDirection: 'row', gap: 6, alignItems: 'center' },
|
||||||
vmBtn: { borderWidth: 1, borderRadius: 8, paddingHorizontal: 10, paddingVertical: 6, minWidth: 34, alignItems: 'center' },
|
vmBtn: { borderWidth: 1, borderRadius: 8, paddingHorizontal: 10, paddingVertical: 6, minWidth: 34, alignItems: 'center' },
|
||||||
vmBtnText: { fontSize: 12, fontWeight: '700' },
|
vmBtnText: { fontSize: 12, fontWeight: '700' },
|
||||||
|
fs: { flex: 1, backgroundColor: '#000000' },
|
||||||
|
fsBack: { position: 'absolute', top: 34, left: 10, backgroundColor: 'rgba(18,18,42,0.9)', borderColor: '#2A2A3E', borderWidth: 1, borderRadius: 10, paddingHorizontal: 12, paddingVertical: 7 },
|
||||||
|
fsBackText: { color: '#0096FF', fontSize: 14, fontWeight: '700' },
|
||||||
shotOverlay: { flex: 1, backgroundColor: 'rgba(0,0,0,0.92)', alignItems: 'center', justifyContent: 'center', padding: 12 },
|
shotOverlay: { flex: 1, backgroundColor: 'rgba(0,0,0,0.92)', alignItems: 'center', justifyContent: 'center', padding: 12 },
|
||||||
shotTitle: { color: '#E0E0F0', fontSize: 14, fontWeight: '700', marginBottom: 10 },
|
shotTitle: { color: '#E0E0F0', fontSize: 14, fontWeight: '700', marginBottom: 10 },
|
||||||
shotImg: { width: '100%', height: '78%', backgroundColor: '#000' },
|
shotImg: { width: '100%', height: '78%', backgroundColor: '#000' },
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ const FilesTile: React.FC<Props> = ({ projectId, focused }) => {
|
|||||||
const [previewBusy, setPreviewBusy] = useState('');
|
const [previewBusy, setPreviewBusy] = useState('');
|
||||||
|
|
||||||
const load = useCallback(() => {
|
const load = useCallback(() => {
|
||||||
|
if (!projectId) { setFiles([]); setErr(''); setLoading(false); return; }
|
||||||
setLoading(true); setErr('');
|
setLoading(true); setErr('');
|
||||||
brainApi.listProjectFiles(projectId)
|
brainApi.listProjectFiles(projectId)
|
||||||
.then(r => setFiles((r.files || []).slice().sort((a, b) => a.path.localeCompare(b.path))))
|
.then(r => setFiles((r.files || []).slice().sort((a, b) => a.path.localeCompare(b.path))))
|
||||||
@@ -88,7 +89,7 @@ const FilesTile: React.FC<Props> = ({ projectId, focused }) => {
|
|||||||
) : err ? (
|
) : err ? (
|
||||||
<Text style={styles.err}>{err}</Text>
|
<Text style={styles.err}>{err}</Text>
|
||||||
) : files.length === 0 ? (
|
) : files.length === 0 ? (
|
||||||
<Text style={styles.empty}>Noch keine Dateien in diesem Projekt.</Text>
|
<Text style={styles.empty}>{!projectId ? 'Kein aktives Projekt — wechsle in ein Projekt für dessen Dateien.' : 'Noch keine Dateien in diesem Projekt.'}</Text>
|
||||||
) : (
|
) : (
|
||||||
files.map(f => (
|
files.map(f => (
|
||||||
<TouchableOpacity key={f.path} onPress={() => open(f)} style={styles.row} disabled={previewBusy === f.path}>
|
<TouchableOpacity key={f.path} onPress={() => open(f)} style={styles.row} disabled={previewBusy === f.path}>
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ const styles = StyleSheet.create({
|
|||||||
sub: { color: '#9090B0', fontSize: 14, marginTop: 8 },
|
sub: { color: '#9090B0', fontSize: 14, marginTop: 8 },
|
||||||
ctlBar: {
|
ctlBar: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
top: 8,
|
top: 34,
|
||||||
right: 8,
|
right: 8,
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
gap: 6,
|
gap: 6,
|
||||||
|
|||||||
Reference in New Issue
Block a user