46 lines
1.3 KiB
Text
46 lines
1.3 KiB
Text
|
extends base
|
||
|
|
||
|
block append head
|
||
|
title #{Repo.Name}
|
||
|
|
||
|
block header
|
||
|
ol
|
||
|
li #{Repo.Owner} / #{Repo.Name}
|
||
|
|
||
|
ul.nav.nav-tabs
|
||
|
li.nav-item
|
||
|
a.nav-link[href="/"+Repo.FullName] Builds
|
||
|
li.nav-item
|
||
|
a.nav-link[href="/"+Repo.FullName+"/settings/badges"] Badges
|
||
|
li.nav-item
|
||
|
a.nav-link.active[href="/"+Repo.FullName+"/settings/encrypt"] Secrets
|
||
|
li.nav-item
|
||
|
a.nav-link[href="/"+Repo.FullName+"/settings"] Settings
|
||
|
|
||
|
block content
|
||
|
div.container.repo_secrets
|
||
|
div
|
||
|
textarea.secrets[spellcheck="false"]
|
||
|
div.alert.alert-danger.hidden
|
||
|
button.btn.btn-info#encryptButton Generate
|
||
|
div
|
||
|
pre.result
|
||
|
|
||
|
block append scripts
|
||
|
script
|
||
|
$("#encryptButton").click(function(){
|
||
|
$( ".alert-danger" ).hide();
|
||
|
$.ajax({
|
||
|
url: "/api/repos/#{Repo.FullName}/encrypt",
|
||
|
type: "POST",
|
||
|
contentType: "text/plain",
|
||
|
data: $(".secrets").val(),
|
||
|
success: function( data ) {
|
||
|
$( ".result" ).text( data );
|
||
|
},
|
||
|
error: function( data ) {
|
||
|
$( ".alert-danger" ).text(data.responseText).show();
|
||
|
}
|
||
|
});
|
||
|
});
|