mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-21 08:11:24 +02:00
Build plugins
This commit is contained in:
@@ -29,6 +29,7 @@ var plugin = {
|
|||||||
description: "Prompt the user for input when sending a request",
|
description: "Prompt the user for input when sending a request",
|
||||||
args: [
|
args: [
|
||||||
{ type: "text", name: "title", label: "Title" },
|
{ type: "text", name: "title", label: "Title" },
|
||||||
|
{ type: "text", name: "label", label: "Label", optional: true },
|
||||||
{ type: "text", name: "defaultValue", label: "Default Value", optional: true },
|
{ type: "text", name: "defaultValue", label: "Default Value", optional: true },
|
||||||
{ type: "text", name: "placeholder", label: "Placeholder", optional: true }
|
{ type: "text", name: "placeholder", label: "Placeholder", optional: true }
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "template-function-response",
|
"name": "@yaakapp/template-function-response",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ export function useSubscribeTemplateFunctions() {
|
|||||||
// NOTE: visibilitychange (refetchOnWindowFocus) does not work on Windows, so we'll rely on this logic
|
// NOTE: visibilitychange (refetchOnWindowFocus) does not work on Windows, so we'll rely on this logic
|
||||||
// to refetch things until that's working again
|
// to refetch things until that's working again
|
||||||
// TODO: Update plugin system to wait for plugins to initialize before sending the first event to them
|
// TODO: Update plugin system to wait for plugins to initialize before sending the first event to them
|
||||||
refetchInterval: numFns > 0 ? Infinity : 500,
|
refetchInterval: numFns > 0 ? Infinity : 1000,
|
||||||
refetchOnMount: true,
|
refetchOnMount: true,
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const result = await invokeCmd<GetTemplateFunctionsResponse[]>('cmd_template_functions');
|
const result = await invokeCmd<GetTemplateFunctionsResponse[]>('cmd_template_functions');
|
||||||
|
|||||||
Reference in New Issue
Block a user