diff --git a/frontend/public/locales/en/translation.json b/frontend/public/locales/en/translation.json index 26366b6..96af5d5 100644 --- a/frontend/public/locales/en/translation.json +++ b/frontend/public/locales/en/translation.json @@ -300,6 +300,7 @@ "from_channels": "Target channels", "simple_text": "Simple Text", "quick_replies": "Quick Replies", + "button": "Button", "buttons": "Buttons", "web_url": "Web URL", "payload": "Payload", diff --git a/frontend/public/locales/fr/translation.json b/frontend/public/locales/fr/translation.json index cffef81..ab90512 100644 --- a/frontend/public/locales/fr/translation.json +++ b/frontend/public/locales/fr/translation.json @@ -300,6 +300,7 @@ "from_channels": "Cibler les canaux", "simple_text": "Texte simple", "quick_replies": "RĂ©ponses rapides", + "button": "Boutton", "buttons": "Boutons", "web_url": "URL Web", "payload": "Payload", diff --git a/frontend/src/components/visual-editor/form/inputs/triggers/PostbackInput.tsx b/frontend/src/components/visual-editor/form/inputs/triggers/PostbackInput.tsx index fd65fe1..9b8154d 100644 --- a/frontend/src/components/visual-editor/form/inputs/triggers/PostbackInput.tsx +++ b/frontend/src/components/visual-editor/form/inputs/triggers/PostbackInput.tsx @@ -71,12 +71,14 @@ export const PostbackInput = ({ { label: t("label.get_started"), value: "GET_STARTED", + type: PayloadType.button, group: "general", }, { label: t("label.view_more"), value: "VIEW_MORE", + type: PayloadType.button, group: "general", }, { @@ -107,7 +109,8 @@ export const PostbackInput = ({ .map((btn) => ({ label: btn.title, value: btn.payload, - group: "buttons", + type: PayloadType.button, + group: "button", })), [block?.previousBlocks, getBlockFromCache], ); @@ -134,8 +137,8 @@ export const PostbackInput = ({ id: btn.payload as string, label: btn.title as string, value: btn.payload as string, - type: PayloadType.menu, - group: "quick_replies", + type: PayloadType.quick_reply, + group: "quick_reply", })), [block?.previousBlocks], ); @@ -199,7 +202,7 @@ export const PostbackInput = ({ const isOptionsReady = !defaultValue || options.find((o) => isSamePostback(o, defaultValue)); - if (!isOptionsReady) { + if (!isOptionsReady || isLoadingContent || isLoadingMenu) { return ( ); @@ -212,6 +215,7 @@ export const PostbackInput = ({ { @@ -244,18 +248,19 @@ export const PostbackInput = ({