moritzebeling / kirby-panel-button
Kirby 面板按钮字段,用于打开或触发某些 URL 或 webhook
v1.0.0
2023-01-23 17:32 UTC
Requires
- php: >=7.4.0
- getkirby/composer-installer: ^1.1
README
自定义 Kirby 面板字段,显示一个按钮,可以用于在新标签页中打开 URL 或触发某些 URL 或 webhook 并等待成功或错误。当您有可以在某些外部服务或域中查看或编辑的内容时,这非常有用。
安装
composer require moritzebeling/kirby-panel-button composer update moritzebeling/kirby-panel-button
或将此存储库下载/克隆到您的 Kirby 项目的 site/plugins
。
如果您正在开发需要此插件的插件
cd site/plugins/your-plugin
composer require moritzebeling/kirby-panel-button
使用
myLinkButton: type: button label: Open URL in new tab text: Open # Button text url: "https://example.com/{{ page.slug }}" icon: edit open: true # open URL in new tab myWebhookButton: type: button label: Refresh data text: Refresh url: /fetch-data theme: positive reload: true # trigger a page refresh on success to display updated data
开发
- 安装全新的 Kirby StarterKit
cd site/plugins
git clone
此存储库cd
进入此插件文件夹
npm run dev
路线图
- 添加多语言支持
- 重构和简化 yml 字段配置
- 添加按钮部分,允许添加文本和多个按钮
- 显示结果的选项对话框
☕️ 支持
如果您喜欢此插件,我会很高兴如果通过 PayPal 邀请我喝咖啡。如果您有任何关于进一步开发的想法或遇到任何问题,请打开一个 issue 或 PR。谢谢!
保修
此插件仍在开发中,不提供任何保修。自行承担风险。