Merge pull request #207 from frju365/patch-2

[fix] Try something to be independent from github
This commit is contained in:
Alexandre Aubin 2019-11-16 16:06:30 +01:00 committed by GitHub
commit 3e886cdb6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View file

@ -578,7 +578,6 @@
} }
}); });
// Install custom app from github
app.post('#/apps/install/custom', function(c) { app.post('#/apps/install/custom', function(c) {
var params = { var params = {
@ -595,10 +594,9 @@
// Force trailing slash // Force trailing slash
params.app = params.app.replace(/\/?$/, '/'); params.app = params.app.replace(/\/?$/, '/');
var giturl = params.app + "raw/master/manifest.json";
// Get manifest.json to get additional parameters
jQuery.ajax({ jQuery.ajax({
url: params.app.replace('github.com', 'raw.githubusercontent.com') + 'master/manifest.json', url: giturl,
type: 'GET', type: 'GET',
}) })
.done(function(manifest) { .done(function(manifest) {

View file

@ -73,7 +73,7 @@
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<label for="url" class="col-sm-12">{{t 'url'}}</label> <label for="url" 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-zA-Z0-9-_.]+/[a-zA-Z0-9-_.]+[/]?$"> <input type="url" id="url" name="url" class="form-control" value="" placeholder="https://GITHOST.TLD/USER/(...)/REPOSITORY" required>
<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>