From 85e57b92533fd30be9508d069819e84efdedf62b Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 16 Feb 2019 01:20:56 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=94=A8=E7=9A=84=E6=89=8B=E5=8A=A8?= =?UTF-8?q?=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/gogs/index.html | 3 ++- plugins/gogs/index.py | 9 +++++++++ plugins/gogs/js/gogs.js | 14 ++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/plugins/gogs/index.html b/plugins/gogs/index.html index 27135ae46..f09dfde13 100755 --- a/plugins/gogs/index.html +++ b/plugins/gogs/index.html @@ -3,7 +3,8 @@

服务

自启动

-

自启动配置

+

启动配置

+

手动编辑

配置文件

配置修改

用户列表

diff --git a/plugins/gogs/index.py b/plugins/gogs/index.py index d55fae695..c46db4ec2 100755 --- a/plugins/gogs/index.py +++ b/plugins/gogs/index.py @@ -566,6 +566,13 @@ def projectScriptDebug(): return public.getJson(data) + +def gogsEdit(): + data = {} + data['post_receive'] = getPluginDir() + '/hook/post-receive.tpl' + data['commit'] = getPluginDir() + '/hook/commit.tpl' + return public.getJson(data) + if __name__ == "__main__": func = sys.argv[1] if func == 'status': @@ -608,5 +615,7 @@ if __name__ == "__main__": print projectScriptUnload() elif func == 'project_script_debug': print projectScriptDebug() + elif func == 'gogs_edit': + print gogsEdit() else: print 'fail' diff --git a/plugins/gogs/js/gogs.js b/plugins/gogs/js/gogs.js index 57a424080..5358de57e 100755 --- a/plugins/gogs/js/gogs.js +++ b/plugins/gogs/js/gogs.js @@ -111,6 +111,20 @@ function submitGogsConf() { }); } +function gogsEdit(){ + + gogsPost('gogs_edit',{} , function(data){ + // console.log(data); + var rdata = $.parseJSON(data.data); + var edit = '

通用的手动编辑:

'; + edit +='
\ + \ + \ +
'; + $(".soft-man-con").html(edit); + }); + +} function gogsUserList(page, search) {