aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/Main.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/Main.tsx')
-rw-r--r--src/client/views/Main.tsx10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx
index 0f06f1278..376876ebb 100644
--- a/src/client/views/Main.tsx
+++ b/src/client/views/Main.tsx
@@ -95,6 +95,10 @@ Utils.EmitCallback(Server.Socket, MessageStore.GetField, "dash", (res: any) => {
}));
})
+ let clearDatabase = action(() => {
+ Utils.Emit(Server.Socket, MessageStore.DeleteAll, {});
+ })
+
ReactDOM.render((
<div style={{ position: "absolute", width: "100%", height: "100%" }}>
<DocumentView Document={mainContainer} ContainingCollectionView={undefined} DocumentView={undefined} />
@@ -118,6 +122,12 @@ Utils.EmitCallback(Server.Socket, MessageStore.GetField, "dash", (res: any) => {
left: '0px',
width: '150px'
}} onClick={addColNode}>Add Collection</button>
+ <button style={{
+ position: 'absolute',
+ bottom: '75px',
+ left: '0px',
+ width: '150px'
+ }} onClick={clearDatabase}>Clear Database</button>
</div>),
document.getElementById('root'));
})