Added storage view, and updated the UI in general

This commit is contained in:
2018-08-21 07:10:22 +02:00
parent 41570fb15e
commit 5a10498da7
29 changed files with 472 additions and 24 deletions

View File

@@ -2,11 +2,15 @@ import React from 'react';
import {
StyleSheet,
View,
Clipboard,
Alert,
Text,
TouchableOpacity,
} from 'react-native';
import network from '../../../network';
import State from '../../data/State';
import Network from '../../data/Network';
import Toolbar from '../../base/Toolbar';
import Details from './Details';
import List from './List';
@@ -34,6 +38,22 @@ const Console = () => (
const selected = active >= 0 ? requests[active] : undefined;
return (
<View style={styles.container}>
<Toolbar
items={[{
name: 'Download',
icon: 'download',
onPress: () => {
Clipboard.setString(JSON.stringify(requests, null, ' '));
Alert.alert(
'Copied to clipboard',
);
},
}, {
name: 'Clear',
icon: 'trash',
onPress: () => network.clear(),
}]}
/>
<List
selected={selected ? selected.id : undefined}
requests={requests}