mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Change font + bugfixes & disconnect route
This commit is contained in:
parent
b3ad4383f4
commit
03483498a8
4 changed files with 26 additions and 11 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -6,12 +6,13 @@
|
|||
<title>YunoHost admin</title>
|
||||
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
|
||||
<link href="css/style.css" rel="stylesheet" media="screen">
|
||||
<link href="css/fonts.css" rel="stylesheet" media="screen">
|
||||
</head>
|
||||
<body>
|
||||
<div id="slider">
|
||||
<div class="page-header">
|
||||
<h1 class="pull-left">YunoHost <small>Administration</small></h1>
|
||||
<a id="disconnect-button" href="#/disconnect" class="pull-right" style="padding-top: 29px; padding-right: 5px; font-size: 24px;"><span class="glyphicon glyphicon-log-out"></span></a>
|
||||
<a id="logout-button" href="#/logout" class="pull-right" style="padding-top: 29px; padding-right: 5px; font-size: 24px;"><span class="glyphicon glyphicon-log-out"></span></a>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<br />
|
||||
|
|
17
js/app.js
17
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());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="pull-left">
|
||||
<a class="btn btn-lg btn-default slide back" href="#/users/{{Username}}"><span class="glyphicon glyphicon-chevron-left"></span> {{Username}} info</a>
|
||||
<a class="btn btn-lg btn-default slide back" href="#/users/{{Username}}"><span class="glyphicon glyphicon-chevron-left"></span> Info</a>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="view-title">Edit {{Username}}</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue