mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
App lists + mobile improvments
This commit is contained in:
parent
0ebaee1164
commit
eadf1ea4ca
4 changed files with 51 additions and 6 deletions
10
index.html
10
index.html
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="cache-control" content="no-cache" />
|
||||
<meta name="viewport" content="width=device-width, user-scalable=false;">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||
<title>YunoHost admin</title>
|
||||
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
|
||||
<link href="css/style.css" rel="stylesheet" media="screen">
|
||||
|
@ -11,18 +11,18 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="slider">
|
||||
<div class="page-header">
|
||||
<div class="page-header hidden-xs">
|
||||
<h1 class="pull-left">YunoHost <small>Administration</small></h1>
|
||||
<a id="logout-button" href="#/logout" class="hidden-xs 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>
|
||||
<br />
|
||||
</div>
|
||||
<br />
|
||||
<div id="flash" class="alert" style="display: none">
|
||||
</div>
|
||||
<div id="slider-container">
|
||||
<div id="slideBack" class="block"></div>
|
||||
<div id="main" class="block">
|
||||
<a class="slide" href="#/login">Login</a>
|
||||
<div class="text-center"><a class="slide" href="#/login"><img src="img/ajax-loader.gif"></a></div>
|
||||
</div>
|
||||
<div id="slideTo" class="block"></div>
|
||||
</div>
|
||||
|
|
35
js/app.js
35
js/app.js
|
@ -71,8 +71,8 @@ app = Sammy('#main', function (sam) {
|
|||
} else {
|
||||
c.flash('fail', 'Server error');
|
||||
}
|
||||
c.redirect(store.get('path-1'));
|
||||
store.clear('slide');
|
||||
c.redirect(store.get('path-1'));
|
||||
})
|
||||
.done(function(data) {
|
||||
console.log(data);
|
||||
|
@ -297,6 +297,39 @@ app = Sammy('#main', function (sam) {
|
|||
c.redirect('#/domains');
|
||||
}, 'POST', params);
|
||||
});
|
||||
|
||||
/**
|
||||
* Apps
|
||||
*
|
||||
*/
|
||||
|
||||
sam.get('#/apps', function (c) {
|
||||
c.api('/app/list', function(data) { // http://api.yunohost.org/#!/app/app_list_get_8
|
||||
// Keep only installed apps
|
||||
data2 = { 'Apps': [], 'Installed': true }
|
||||
$.each(data['Apps'], function(k, v) {
|
||||
if (v['Installed'] !== 'No') data2['Apps'].push(v);
|
||||
});
|
||||
c.view('app_list', data2);
|
||||
});
|
||||
});
|
||||
|
||||
sam.get('#/apps/install', function (c) {
|
||||
c.api('/app/list', function(data) { // http://api.yunohost.org/#!/app/app_list_get_8
|
||||
// Keep only uninstalled apps
|
||||
data2 = { 'Apps': [] }
|
||||
$.each(data['Apps'], function(k, v) {
|
||||
if (v['Installed'] !== 'Yes') data2['Apps'].push(v);
|
||||
});
|
||||
c.view('app_list', data2);
|
||||
});
|
||||
});
|
||||
|
||||
sam.get('#/apps/refresh', function (c) {
|
||||
c.api('/app/lists', function(data) { // http://api.yunohost.org/#!/app/app_fetchlist_put_5
|
||||
c.redirect(store.get('path'));
|
||||
}, 'PUT');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
<div class="page-header visible-xs">
|
||||
<h1 class="pull-left">YunoHost <small>Administration</small></h1>
|
||||
<div class="clearfix"></div>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div class="list-group">
|
||||
<a href="#/users" class="list-group-item slide">
|
||||
<h4 class="pull-left list-group-item-heading">Users</h4>
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
<div class="page-header visible-xs">
|
||||
<h1 class="pull-left">YunoHost <small>Administration</small></h1>
|
||||
<div class="clearfix"></div>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<form action="#/login" id="form" method="post">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">http://</span>
|
||||
|
|
Loading…
Add table
Reference in a new issue