add Slack API webhook support
This commit is contained in:
parent
5e6091a30a
commit
2bce24068d
15 changed files with 485 additions and 79 deletions
|
@ -1403,14 +1403,16 @@ The register and sign-in page style
|
|||
#auth-setting-form,
|
||||
#org-setting-form,
|
||||
#repo-setting-form,
|
||||
#user-profile-form {
|
||||
#user-profile-form,
|
||||
.repo-setting-form {
|
||||
background-color: #FFF;
|
||||
padding: 30px 0;
|
||||
}
|
||||
#auth-setting-form textarea,
|
||||
#org-setting-form textarea,
|
||||
#repo-setting-form textarea,
|
||||
#user-profile-form textarea {
|
||||
#user-profile-form textarea,
|
||||
.repo-setting-form textarea {
|
||||
margin-left: 4px;
|
||||
height: 100px;
|
||||
}
|
||||
|
@ -1418,24 +1420,38 @@ The register and sign-in page style
|
|||
#org-setting-form label,
|
||||
#repo-setting-form label,
|
||||
#user-profile-form label,
|
||||
.repo-setting-form label,
|
||||
#auth-setting-form .form-label,
|
||||
#org-setting-form .form-label,
|
||||
#repo-setting-form .form-label,
|
||||
#user-profile-form .form-label {
|
||||
#user-profile-form .form-label,
|
||||
.repo-setting-form .form-label {
|
||||
width: 240px;
|
||||
}
|
||||
#auth-setting-form .ipt,
|
||||
#org-setting-form .ipt,
|
||||
#repo-setting-form .ipt,
|
||||
#user-profile-form .ipt {
|
||||
#user-profile-form .ipt,
|
||||
.repo-setting-form .ipt {
|
||||
width: 360px;
|
||||
}
|
||||
#auth-setting-form .field,
|
||||
#org-setting-form .field,
|
||||
#repo-setting-form .field,
|
||||
#user-profile-form .field {
|
||||
#user-profile-form .field,
|
||||
.repo-setting-form .field {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
#hook-type {
|
||||
padding: 10px 0 0 0;
|
||||
background-color: #fff;
|
||||
}
|
||||
#hook-type .field {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
#hook-type label {
|
||||
width: 240px;
|
||||
}
|
||||
#repo-hooks-panel,
|
||||
#repo-hooks-history-panel,
|
||||
#user-social-panel,
|
||||
|
|
|
@ -359,6 +359,22 @@ function initRepoSetting() {
|
|||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
// web hook type change
|
||||
$('select#hook-type').on("change", function () {
|
||||
hookTypes = ['Gogs','Slack'];
|
||||
|
||||
var curHook = $(this).val();
|
||||
hookTypes.forEach(function(hookType) {
|
||||
if (curHook === hookType) {
|
||||
$('div#'+hookType.toLowerCase()).toggleShow();
|
||||
}
|
||||
else {
|
||||
$('div#'+hookType.toLowerCase()).toggleHide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#transfer-button').click(function () {
|
||||
$('#transfer-form').show();
|
||||
});
|
||||
|
@ -594,4 +610,4 @@ function homepage() {
|
|||
}
|
||||
$('#promo-form').attr('action', '/user/sign_up');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,8 @@
|
|||
#auth-setting-form,
|
||||
#org-setting-form,
|
||||
#repo-setting-form,
|
||||
#user-profile-form {
|
||||
#user-profile-form,
|
||||
.repo-setting-form {
|
||||
background-color: #FFF;
|
||||
padding: 30px 0;
|
||||
textarea {
|
||||
|
@ -53,6 +54,17 @@
|
|||
}
|
||||
}
|
||||
|
||||
#hook-type {
|
||||
padding: 10px 0 0 0;
|
||||
background-color: #fff;
|
||||
.field {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
label {
|
||||
width: 240px;
|
||||
}
|
||||
}
|
||||
|
||||
#repo-hooks-panel,
|
||||
#repo-hooks-history-panel,
|
||||
#user-social-panel,
|
||||
|
@ -109,4 +121,4 @@
|
|||
.field {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue