From 31e3e0313ab3b4d6d23e9ab2945e29a4b3ba7239 Mon Sep 17 00:00:00 2001 From: Enrico Fasoli Date: Tue, 17 Nov 2015 22:18:30 +0100 Subject: [PATCH] WIP settings page --- webapp/app.jsx | 38 +++++++++++++++++++++++++++++++++++++- webapp/style.css | 20 ++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) diff --git a/webapp/app.jsx b/webapp/app.jsx index 96d7df5..680f149 100644 --- a/webapp/app.jsx +++ b/webapp/app.jsx @@ -234,8 +234,44 @@ var Users = React.createClass({ }) var Settings = React.createClass({ + getInitialState: function(){ + // get from localstorage + return { addr: 'localhost', port: '5001' } + }, + save: function(){ + // write to localstorage + + }, + setDefaults: function(){ + this.setState({ addr: 'localhost', port: '5001' }) + }, + onChange: function(event){ + console.log(event.target.id) + //this.setState({}) + }, render: function(){ - return + return ( +
+

Settings

+

Note that this page doesn't work yet.

+

Use this page to customize the application's behavior. For now, you can change how it connects to IPFS.

+

All settings are saved in your browser.

+
+
+ + +
+
+ + +
+
+
+ + +
+
+ ) } }) diff --git a/webapp/style.css b/webapp/style.css index 2b00fae..5174210 100644 --- a/webapp/style.css +++ b/webapp/style.css @@ -58,3 +58,23 @@ a:hover { .navbar .iconbar .fa { margin-left: .5rem; } + +.settings .buttons .button { + display: block; + margin: 1rem auto; + width: 80% +} + +@media (min-width: 400px) { + /* larger than mobile */ + .settings .buttons { + text-align: inherit; + } + .settings .buttons .not-first { + margin: 0 1rem; + } + .settings .buttons .button { + display: inline-block; + width: auto; + } +}