Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
32954c37
Z
zentaoatf
项目概览
易企天创
/
zentaoatf
9 个月 前同步成功
通知
11
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
3
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zentaoatf
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
3
Issue
3
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
32954c37
编写于
9月 16, 2022
作者:
雨
雨爱无痕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix issue
上级
b831982e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
12 addition
and
8 deletion
+12
-8
internal/server/modules/v1/repo/proxy.go
internal/server/modules/v1/repo/proxy.go
+1
-1
ui/src/locales/zh-CN.ts
ui/src/locales/zh-CN.ts
+5
-5
ui/src/views/proxy/ProxyNav.vue
ui/src/views/proxy/ProxyNav.vue
+4
-1
ui/src/views/settings/SettingsModal.vue
ui/src/views/settings/SettingsModal.vue
+2
-1
未找到文件。
internal/server/modules/v1/repo/proxy.go
浏览文件 @
32954c37
...
...
@@ -61,7 +61,7 @@ func (r *ProxyRepo) Create(proxy model.Proxy) (id uint, err error) {
func
(
r
*
ProxyRepo
)
Update
(
proxy
model
.
Proxy
)
error
{
po
,
err
:=
r
.
FindDuplicate
(
proxy
.
Path
,
proxy
.
ID
)
if
po
.
ID
!=
0
{
return
errors
.
New
(
fmt
.
Sprintf
(
"%s
远程代理
已存在"
,
proxy
.
Path
))
return
errors
.
New
(
fmt
.
Sprintf
(
"%s
执行节点
已存在"
,
proxy
.
Path
))
}
err
=
r
.
DB
.
Model
(
&
model
.
Proxy
{})
.
Where
(
"id = ?"
,
proxy
.
ID
)
.
Updates
(
&
proxy
)
.
Error
...
...
ui/src/locales/zh-CN.ts
浏览文件 @
32954c37
...
...
@@ -86,14 +86,14 @@ export default {
'
interpreter_path
'
:
'
可执行文件路径
'
,
'
script_lang
'
:
'
脚本语言
'
,
'
remote_proxy
'
:
'
远程代理
'
,
'
remote_proxy
'
:
'
执行节点
'
,
'
proxy_desc
'
:
'
执行脚本会上传到代理服务器(用户根目录/ztf/proxyExecDir),请提前将脚本依赖部署于代理服务器
'
,
'
create_remote_proxy
'
:
'
新建
远程代理
'
,
'
edit_remote_proxy
'
:
'
编辑
远程代理
'
,
'
proxy_link
'
:
'
远程代理
地址
'
,
'
create_remote_proxy
'
:
'
新建
执行节点
'
,
'
edit_remote_proxy
'
:
'
编辑
执行节点
'
,
'
proxy_link
'
:
'
执行节点
地址
'
,
'
proxy_lang
'
:
'
代理语言
'
,
'
copy_from
'
:
'
复制自
'
,
'
pls_input_proxy_link
'
:
'
请输入
远程代理
地址
'
,
'
pls_input_proxy_link
'
:
'
请输入
执行节点
地址
'
,
'
git_auth_type
'
:
'
git 登录方式
'
,
'
rsa_path
'
:
'
密钥路径
'
,
...
...
ui/src/views/proxy/ProxyNav.vue
浏览文件 @
32954c37
...
...
@@ -5,6 +5,7 @@
suffix-icon=
"caret-down"
/>
<DropdownMenu
v-if=
"proxies.length>0"
toggle=
"#proxyMenuToggle"
class=
"padding-0-bottom"
:items=
"proxies"
...
...
@@ -30,7 +31,9 @@ const store = useStore<{ proxy: ProxyData }>();
store
.
dispatch
(
"
proxy/fetchProxies
"
);
const
proxies
=
computed
<
any
[]
>
(()
=>
{
const
proxiesList
=
[...
store
.
state
.
proxy
.
proxies
]
proxiesList
.
push
({
id
:
0
,
name
:
t
(
'
local
'
),
path
:
'
local
'
})
if
(
proxiesList
.
length
>
0
){
proxiesList
.
push
({
id
:
0
,
name
:
t
(
'
local_proxy
'
),
path
:
'
local
'
})
}
return
proxiesList
});
const
currProxy
=
computed
<
any
>
(()
=>
store
.
state
.
proxy
.
currProxy
);
...
...
ui/src/views/settings/SettingsModal.vue
浏览文件 @
32954c37
...
...
@@ -206,7 +206,7 @@ const store = useStore<{ global: GlobalData, proxy: ProxyData }>();
store
.
dispatch
(
"
proxy/fetchProxies
"
);
const
remoteProxies
=
computed
<
any
[]
>
(()
=>
{
const
proxiesList
=
[...
store
.
state
.
proxy
.
proxies
]
proxiesList
.
push
({
id
:
0
,
name
:
t
(
'
local
'
),
path
:
'
local
'
})
proxiesList
.
push
({
id
:
0
,
name
:
t
(
'
local
_proxy
'
),
path
:
'
local
'
})
return
proxiesList
});
const
serverUrl
=
computed
<
any
>
(()
=>
store
.
state
.
global
.
serverUrl
);
...
...
@@ -427,6 +427,7 @@ const handleRemoveProxy = (item) => {
cancelText
:
t
(
"
cancel
"
),
onOk
:
async
()
=>
{
await
removeProxy
(
item
.
value
.
id
);
store
.
dispatch
(
"
proxy/fetchProxies
"
);
list
();
},
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录