Remove old references to community list

This commit is contained in:
Alexandre Aubin 2019-05-31 14:30:35 +02:00
parent a24e0743bb
commit 5dc91715b1
3 changed files with 2 additions and 35 deletions

View file

@ -368,23 +368,16 @@
app.get('#/tools/appslists', function (c) { app.get('#/tools/appslists', function (c) {
c.api('/appslists', function(data) { c.api('/appslists', function(data) {
list = []; list = [];
var has_community_list = false;
$.each(data, function(listname, listinfo) { $.each(data, function(listname, listinfo) {
list.push({ list.push({
'name': listname, 'name': listname,
'url': listinfo['url'], 'url': listinfo['url'],
'lastUpdate': listinfo['lastUpdate'] 'lastUpdate': listinfo['lastUpdate']
}); });
// Check for community list
if (listname == 'community' || listinfo['url'] == 'https://app.yunohost.org/community.json') {
has_community_list = true;
}
}); });
c.view('tools/tools_appslists_list', { c.view('tools/tools_appslists_list', {
appslists: list, appslists: list
has_community_list: has_community_list
}); });
}, 'GET'); }, 'GET');
}); });

View file

@ -414,10 +414,7 @@
"appslists_info_remove_desc": "Applications from this list will not be available anymore.", "appslists_info_remove_desc": "Applications from this list will not be available anymore.",
"appslists_last_update": "Last update", "appslists_last_update": "Last update",
"appslists_unknown_list": "Unknown apps list: %s", "appslists_unknown_list": "Unknown apps list: %s",
"appslists_community_list": "Community applications list",
"name": "Name", "name": "Name",
"install_community_appslists_info": "Community applications list allows you to install community maintained applications.<br />See the full list on <a href='https://yunohost.org/apps'>yunohost.org/apps</a>.",
"install_community_appslists_warning": "Note that these applications packages are <strong>not</strong> official and not maintained by the YunoHost team.<br />Installing these applications is at your own risk and could break your system.",
"purge_user_data_checkbox": "Purge %s's data? (This will remove the content of it's home and mail directories.)", "purge_user_data_checkbox": "Purge %s's data? (This will remove the content of it's home and mail directories.)",
"purge_user_data_warning": "Purging user's data is not reversible. Be sure you know what you're doing!" "purge_user_data_warning": "Purging user's data is not reversible. Be sure you know what you're doing!"
} }

View file

@ -29,29 +29,6 @@
</div> </div>
</div> </div>
{{^has_community_list}}
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title"><span class="fa-fw fa-plus"></span> {{t 'appslists_community_list'}}</h2>
</div>
<div class="panel-body">
<form action="#/apps/lists" method="POST" class="form-horizontal">
<input type="hidden" name="appslist_name" value="community" required />
<input type="hidden" name="appslist_url" value="https://app.yunohost.org/community.json" required />
<div class="form-group">
<div class="col-md-12 col-sm-12">
<p>{{t 'install_community_appslists_info'}}</p>
<p class="alert alert-warning">
<span class="fa-warning"></span> {{t 'install_community_appslists_warning'}}
</p>
<input type="submit" class="btn btn-success slide" value="{{t 'add'}}">
</div>
</div>
</form>
</div>
</div>
{{/has_community_list}}
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<h2 class="panel-title"><span class="fa-fw fa-plus"></span> {{t 'appslists_custom'}}</h2> <h2 class="panel-title"><span class="fa-fw fa-plus"></span> {{t 'appslists_custom'}}</h2>
@ -67,7 +44,7 @@
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<label for="appslist_url" class="col-md-2 col-sm-12 control-label">{{t 'url'}}</label> <label for="appslist_url" class="col-md-2 col-sm-12 control-label">{{t 'url'}}</label>
<div class="col-md-10 col-sm-12"> <div class="col-md-10 col-sm-12">
<input type="url" id="appslist_url" name="appslist_url" class="form-control" value="" placeholder="https://app.yunohost.org/community.json" required /> <input type="url" id="appslist_url" name="appslist_url" class="form-control" value="" placeholder="https://some.domain.tld/somelist.json" required />
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">