Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: checkbox to disable Webhook #656

Merged
merged 10 commits into from
Apr 4, 2023
Merged

feat: checkbox to disable Webhook #656

merged 10 commits into from
Apr 4, 2023

Conversation

WaterLemons2k
Copy link
Contributor

@WaterLemons2k WaterLemons2k commented Apr 1, 2023

What does this PR do?

Add a checkbox for disabling Webhook.

Closes #655.

Motivation

#655

Additional Notes

formData.append() only accepts string. If a boolean is required, it needs to be parsed as JSON on the backend.

@jeessy2
Copy link
Owner

jeessy2 commented Apr 1, 2023

得考虑以前用户升级上来,默认配置为false

@WaterLemons2k
Copy link
Contributor Author

WaterLemons2k commented Apr 1, 2023

现在,当 webhookenable key 不存在时会返回 true,不会勾选 Webhook -> 是否启用 复选框。

@jeessy2
Copy link
Owner

jeessy2 commented Apr 1, 2023

是不是搞复杂了。disabled不是更简单一点?

@jeessy2
Copy link
Owner

jeessy2 commented Apr 1, 2023

也可以不考虑增加开关,没有URL就是disable,拷贝到下面也没什么影响,这个功能用的也不多

@threerog
Copy link

threerog commented Apr 1, 2023

也可以不考虑增加开关,没有URL就是disable,拷贝到下面也没什么影响,这个功能用的也不多

既然都写好了,肯定支持了更好吧 不影响什么

@WaterLemons2k 建议直接通过url是否为空来判断是否勾选,避免个别webhookkey字段名不同

@WaterLemons2k WaterLemons2k changed the title feat: checkbox to enable Webhook feat: button to toggle Webhook status Apr 2, 2023
@WaterLemons2k
Copy link
Contributor Author

WaterLemons2k commented Apr 2, 2023

感觉复选框怎么写都有破坏性,换成按钮。

@jeessy2
Copy link
Owner

jeessy2 commented Apr 3, 2023

换成按钮,都不能一眼就看清到底是启用状态还是禁用状态。

The button is no longer used.
@WaterLemons2k WaterLemons2k changed the title feat: button to toggle Webhook status feat: checkbox to enable Webhook Apr 4, 2023
@WaterLemons2k
Copy link
Contributor Author

WaterLemons2k commented Apr 4, 2023

由于 bool 的零值 在 Go 中 默认为 false,所以用 string。

@jeessy2
Copy link
Owner

jeessy2 commented Apr 4, 2023

disable: false 这个是不是更简单点?页面上在取!disable,讨论那个合适点

@WaterLemons2k WaterLemons2k changed the title feat: checkbox to enable Webhook feat: checkbox to disable Webhook Apr 4, 2023
@WaterLemons2k
Copy link
Contributor Author

disable: false 这个是不是更简单点?页面上在取!disable,讨论那个合适点

怎么简单怎么来。

@jeessy2 jeessy2 merged commit ee81627 into jeessy2:master Apr 4, 2023
@WaterLemons2k WaterLemons2k deleted the webhook branch April 4, 2023 12:59
@WaterLemons2k WaterLemons2k mentioned this pull request May 8, 2023
jeessy2 pushed a commit that referenced this pull request May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[功能]:webhook增加一个是否启用的开关
3 participants