mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[enh] Allow trailing slash in custom app pattern.
This commit is contained in:
parent
7fb9a1f1ac
commit
92b6cd0c0f
2 changed files with 5 additions and 2 deletions
|
@ -892,9 +892,12 @@ app = Sammy('#main', function (sam) {
|
||||||
delete c.params['label'];
|
delete c.params['label'];
|
||||||
delete c.params['url'];
|
delete c.params['url'];
|
||||||
|
|
||||||
|
// Force trailing slash
|
||||||
|
params.app = params.app.replace(/\/?$/, '/');
|
||||||
|
|
||||||
// Get manifest.json to get additional parameters
|
// Get manifest.json to get additional parameters
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
url: params.app.replace('github.com', 'rawgit.com') + '/master/manifest.json',
|
url: params.app.replace('github.com', 'rawgit.com') + 'master/manifest.json',
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
crossdomain: true,
|
crossdomain: true,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
<div class="form-group has-feedback">
|
<div class="form-group has-feedback">
|
||||||
<label for="label" class="col-sm-12">{{t 'url'}}</label>
|
<label for="label" class="col-sm-12">{{t 'url'}}</label>
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<input type="url" id="url" name="url" class="form-control" value="" placeholder="https://github.com/USER/REPOSITORY" required pattern="^https://github.com/[a-z-_]*/[a-z-_]*">
|
<input type="url" id="url" name="url" class="form-control" value="" placeholder="https://github.com/USER/REPOSITORY" required pattern="^https://github.com/[a-z-_]+/[a-z-_]+[/]?$">
|
||||||
<p class="text-warning">
|
<p class="text-warning">
|
||||||
<span class="fa-github"></span> {{t 'custom_app_url_only_github'}}
|
<span class="fa-github"></span> {{t 'custom_app_url_only_github'}}
|
||||||
</p>
|
</p>
|
||||||
|
|
Loading…
Add table
Reference in a new issue