lemmon / kirby-panel-buttons
kirby面板按钮字段,用于打开或触发URL或webhook
1.0.0
2024-06-21 00:00 UTC
Requires
- php: ~8.1.0 || ~8.2.0 || ~8.3.0
- getkirby/composer-installer: ^1.1
Replaces
README
一个自定义的Kirby面板字段,具有按钮功能。此按钮可用于在新标签页中打开URL或触发URL或webhook,并在成功或错误时提供反馈。
安装
需要PHP 8.1和Kirby 4.0.0或更高版本。推荐的安装方式是通过Composer
composer require lemmon/kirby-panel-buttons
或者将此仓库下载/克隆到您的Kirby项目中的site/plugins
目录。
使用方法
webhook_button: type: buttons label: Button text: Button Text # Button text url: /button-test # url to call theme: positive # (default: null) fullwidth: true # (default: null) size: lg # (default: "lg") icon: lab # (default: null) help: Help text # (default: null) reload: true # trigger a page refresh on success to display updated data (default: false) link_button: type: buttons label: Refresh data text: Refresh url: https://example.com/ # url to open (default: false) open: true # disabled: true # (default: false)
开发
- 安装新的Kirby StarterKit
cd site/plugins
git clone
此仓库cd
进入此插件文件夹
npm run dev
路线图
- 添加多语言支持
- 添加一个按钮部分,允许添加一些文本和多个按钮
致谢
此插件基于Moritz Ebeling的Kirby Panel Button Plugin构建。
许可
MIT