From 03483498a8032ad5d1980d21c6e2a067a33529d3 Mon Sep 17 00:00:00 2001 From: Kload Date: Tue, 24 Sep 2013 17:38:38 +0200 Subject: [PATCH] Change font + bugfixes & disconnect route --- css/style.css | 15 +++++++++------ index.html | 3 ++- js/app.js | 17 ++++++++++++++--- views/user_edit.ms | 2 +- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/css/style.css b/css/style.css index 59b34f38..61fb80e5 100644 --- a/css/style.css +++ b/css/style.css @@ -1,5 +1,14 @@ html, body { height: 100%; + font-family: 'Source Sans Pro'; +} + +body h1, +body h2, +body h3, +body h4, +body h5 { + font-family: 'Source Sans Pro'; } #slider { @@ -35,12 +44,6 @@ html, body { padding: 5px; } -/*.panel-title {*/ - /*font-size: 18px;*/ - /*font-weight: bold;*/ - /*line-height: 25px;*/ -/*}*/ - body .form-control { padding: 6px; } diff --git a/index.html b/index.html index c383add1..7e822d8b 100644 --- a/index.html +++ b/index.html @@ -6,12 +6,13 @@ YunoHost admin +

diff --git a/js/app.js b/js/app.js index 3d87e95b..98d4ab28 100644 --- a/js/app.js +++ b/js/app.js @@ -166,7 +166,7 @@ app = Sammy('#main', function (sam) { }); sam.get('#/login', function (c) { - $('#disconnect-button').hide(); + $('#logout-button').hide(); store.set('path-1', '#/login'); c.view('login'); }); @@ -177,7 +177,8 @@ app = Sammy('#main', function (sam) { store.set('password', btoa(c.params['password'])); c.api('/users', function(data) { store.set('connected', true); - $('#disconnect-button').fadeIn(); + $('#logout-button').fadeIn(); + c.flash('success', 'Logged in'); if (store.get('path')) { c.redirect(store.get('path')); } else { @@ -186,6 +187,16 @@ app = Sammy('#main', function (sam) { }); }); + sam.get('#/logout', function (c) { + store.clear('url'); + store.clear('user'); + store.clear('password'); + store.clear('connected'); + store.set('path', '#/'); + c.flash('success', 'Logged out'); + c.redirect('#/login'); + }); + /** * Users * @@ -205,7 +216,7 @@ app = Sammy('#main', function (sam) { sam.post('#/users', function (c) { if (c.params['password'] == c.params['confirmation']) { - c.params['mail'] = c.params['email'] + '@' + c.params['domain']; + c.params['mail'] = c.params['email'] + c.params['domain']; c.api('/users', function(data) { // http://api.yunohost.org/#!/user/user_create_post_2 c.redirect('#/users'); }, 'POST', c.params.toHash()); diff --git a/views/user_edit.ms b/views/user_edit.ms index dc0f92f8..49945959 100644 --- a/views/user_edit.ms +++ b/views/user_edit.ms @@ -1,5 +1,5 @@
Edit {{Username}}