css button space fix + remove 0 level apps from only working view

This commit is contained in:
e-lie 2018-09-02 13:02:45 +00:00 committed by elie
parent 440f18dea3
commit 806c44a012
3 changed files with 11 additions and 13 deletions

View file

@ -561,6 +561,12 @@ input[type='radio'].nice-radio {
.app-card {
margin: 2%;
width: 96%;
.btn-group {
width: 100%;
.btn{
margin-left: 0;
}
}
}
#app-filter-input{
@ -599,14 +605,6 @@ input[type='radio'].nice-radio {
margin-top: -5px;
}
.btn-group {
width: 100%;
.btn:first-child{
}
.btn:last-child{
margin-left: 0;
}
}
.panel-body {
padding: 1.5rem;

View file

@ -78,13 +78,13 @@
var apps = []
$.each(data['apps'], function(k, v) {
var state = dataraw[v['id']]['state'];
var isWorking = (state === 'working' || state === 'validated');
var levelFormatted = parseInt(dataraw[v['id']]['level']);
var isWorking = (state === 'working' || state === 'validated') && levelFormatted > 0;
// Keep only the first instance of each app and remove community not working apps
if (!v['id'].match(/__[0-9]{1,5}$/) && (dataraw[v['id']]['repository'] === 'yunohost' || state !== 'notworking')) {
dataraw[v['id']]['installable'] = (!v['installed'] || dataraw[v['id']].manifest.multi_instance)
dataraw[v['id']]['status'] = (dataraw[v['id']]['repository'] === 'yunohost') ? 'official' : 'community';
levelFormatted = parseInt(dataraw[v['id']]['level']);
dataraw[v['id']]['levelFormatted'] = isNaN(levelFormatted) ? '?' : levelFormatted;
dataraw[v['id']]['levelColor'] = levelToColor(levelFormatted);
dataraw[v['id']]['stateColor'] = stateToColor(state);

View file

@ -51,14 +51,14 @@
{{^maintained}}<i class="fas fa-warning"></i> {{t 'unmaintained'}}{{/maintained}}
</div>
<div class="btn-group" role="group">
<a href="{{git.url}}" target="_BLANK" type="button" role="button" class="btn btn-default col-sm-4">
<a href="{{git.url}}" target="_BLANK" type="button" role="button" class="btn btn-default col-xs-4">
<i class="fa-globe"></i> Code
</a>
<a href="{{git.url}}/blob/master/README.md" target="_BLANK" type="button" role="button" class="btn btn-default col-sm-4">
<a href="{{git.url}}/blob/master/README.md" target="_BLANK" type="button" role="button" class="btn btn-default col-xs-4">
<i class="fa-book"></i> Readme
</a>
{{#installable}}
<a href="#/apps/install/{{id}}" type="button" role="button" class="btn btn-{{installColor}} col-sm-4 active">
<a href="#/apps/install/{{id}}" type="button" role="button" class="btn btn-{{installColor}} col-xs-4 active">
<i class="fa-plus"></i> {{t 'install'}}{{^isSafe}} <i class="fa-warning"></i>{{/isSafe}}
</a>
{{/installable}}