moritzebeling/kirby-panel-button

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

资助包维护!
Paypal

安装: 191

依赖项: 0

建议者: 0

安全: 0

星星: 21

观察者: 5

分支: 3

开放问题: 4

语言:Vue

类型:kirby-plugin

v1.0.0 2023-01-23 17:32 UTC

This package is auto-updated.

Last update: 2024-09-17 23:53:09 UTC


README

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

自定义 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

开发

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

路线图

  • 添加多语言支持
  • 重构和简化 yml 字段配置
  • 添加按钮部分,允许添加文本和多个按钮
  • 显示结果的选项对话框

☕️ 支持

如果您喜欢此插件,我会很高兴如果通过 PayPal 邀请我喝咖啡。如果您有任何关于进一步开发的想法或遇到任何问题,请打开一个 issue 或 PR。谢谢!

保修

此插件仍在开发中,不提供任何保修。自行承担风险。