lemmon / kirby-panel-buttons

kirby面板按钮字段,用于打开或触发URL或webhook

安装: 16

依赖项: 0

建议者: 0

安全: 0

星标: 1

关注者: 2

分支: 0

开放问题: 0

语言:Vue

类型:kirby插件

1.0.0 2024-06-21 00:00 UTC

This package is auto-updated.

Last update: 2024-08-27 17:36:10 UTC


README

Kirby CMS buttons field to open URLs in a new tab or trigger webhooks

一个自定义的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)

开发

  1. 安装新的Kirby StarterKit
  2. cd site/plugins
  3. git clone此仓库
  4. cd进入此插件文件夹
npm run dev

路线图

  • 添加多语言支持
  • 添加一个按钮部分,允许添加一些文本和多个按钮

致谢

此插件基于Moritz Ebeling的Kirby Panel Button Plugin构建。

许可

MIT