9 Commits

Author SHA1 Message Date
7befe6e7da refactor: 重构前端代码 (#988)
* refactor: 重构前端代码

几乎完全重构前端js代码
小幅度重构后端代码(主要为了适配前端)

* fix: 修复主题色无法自适应的bug

还原了主题色修改函数的write参数,去除该参数会导致自适应修改主题时也会写入localStorage

* feat: 自动修改标签的for属性

自动修改”获取 IP 方式“标签的for属性,保证其始终指向当前可编辑的元素

* refactor: 去除JQuery

* refactor: 按业务划分代码

* fix: 对空值兼容

* fix: 统一html命名

* feat: 默认选择最后一个配置

* fix: 删除冗余代码

* fix: Update writing.html
2024-01-22 04:34:46 -08:00
7c69aa1bf7 feat: gomod v5 to v6 & upgrade golang to 1.21 (#969) 2024-01-11 16:25:14 +08:00
eec98404fe feat: support english (#967)
* feat: init the i18n

* fix: porkbun

* refactor: http_util GetHTTPResponse

* fix: save

* fix: add more i18n

* feat: i18n at writing.html

* feat: README EN

* fix: default api

* fix: pic
2024-01-11 15:52:53 +08:00
73ea376ce7 feat: webhook supports headers (#626)
* feat: webhook supports headers

* change rows to 1

* WebhookRequestHeaders改成WebhookHeaders

* 简化parts[0]

* 默认\r\n

* RequestHeaders -> WebhookHeaders

* fix test

* change new line break

* RequestHeaders -> Headers
2023-05-10 14:00:18 +08:00
39330ca62c Revert #656 (#697) 2023-05-08 17:40:01 +08:00
ee8162760b feat: checkbox to disable Webhook (#656)
* feat: checkbox to enable Webhook

* fix: true when `webhookenable` key missing

* feat: `WebhookStatus` button

* chore: better comment for `getWebhookStatus`

* feat: reuse checkbox

The button is no longer used.

* chore: move `WebhookStatus` above `WebhookURL` [skip ci]

* refactor(`getWebhookStatus`): use conditional operator

https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Conditional_Operator

* refactor(`WebhookStatus`): moves the part that changes the value to `addEventListener`

Add a new function `isWebhookStatusDisable`.

* feat: checkbox to disable Webhook

* chore(html): re-add blank line [skip ci]
2023-04-04 20:49:43 +08:00
34f0fa30b5 feat: github.com/jeessy2/ddns-go/v5 (#607) 2023-03-11 23:07:17 +08:00
d982b050ed build: correct the module path (#371)
* build: correct the module path

Now we are in v4.x, the `/v4` suffix should be added.

* docs: specify the module version
2022-08-31 20:12:48 +08:00
1054376d8b webhook test (#74) 2021-06-14 21:18:13 +08:00