diff --git a/package.json b/package.json
index 630d3cc6e..f4c8068ec 100644
--- a/package.json
+++ b/package.json
@@ -30,6 +30,7 @@
"mixpanel-browser": "^2.41.0",
"offline-js": "^0.7.19",
"plyr": "^3.6.3",
+ "prism-es6": "^1.2.0",
"secure-ls": "^1.2.3",
"tailwindcss-interaction-variants": "^5.0.0",
"vue": "^3.2.23",
diff --git a/src/App.vue b/src/App.vue
index b7be5acff..deb58496c 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -608,7 +608,8 @@ export default {
clonedeep(this.activeWorkspaceSettings)
);
- SettingsUtilities.prepareSettingsToRender(this.settingsToRender);
+ // preparing settings to render but only for the App.vue component
+ SettingsUtilities.prepareSettingsToRender(this.settingsToRender, true, "App.vue");
},
closeSettingsMenu() {
if (this.isMobileScreen) this.resetMenuState();
diff --git a/src/assets/locales/en.js b/src/assets/locales/en.js
index 8db7cf6c0..ac2a69337 100644
--- a/src/assets/locales/en.js
+++ b/src/assets/locales/en.js
@@ -181,6 +181,11 @@ export default {
},
},
},
+ settings: {
+ webhook: {
+ url_input_placeholder: "https://your-webhook-url.com/your/path",
+ }
+ }
},
home: {
create_button: "Create",
@@ -537,7 +542,9 @@ export default {
hasUnsavedChanges: "Save your changes",
noUnsavedChanges: "Nothing to save",
},
+ apply_webhook_configuration: "Save the webhook configuration and go back to settings",
cancel: "",
+ discard_webhook_configuration: "Discard the configuration and go back to settings",
},
},
},
@@ -580,11 +587,14 @@ export default {
skipEnabled: "Viewers can skip questions while attempting plios",
firstTimeLanguagePickerPopup:
"Viewers will see the language picker on first login",
+ customWebhook: "Configure a webhook for recieving events from plio",
},
description: {
skipEnabled: "Provide viewers the option to skip a question",
firstTimeLanguagePickerPopup:
"Your users will see the language picker on their first login. This sets what language they will see the platform in. Currently only two values, English and Hindi, are supported.",
+ customWebhook:
+ "Configure to recieve realtime events from plio. This can be used to integrate plio with other services",
},
info:
"The new settings will only apply to plios created in the future and not the existing plios",
@@ -596,6 +606,7 @@ export default {
tab: {
configuration: "Configuration",
ui: "UI",
+ advanced: "Advanced",
},
},
badge: {
diff --git a/src/assets/locales/hi.js b/src/assets/locales/hi.js
index 0af5917b6..d5157e2a5 100644
--- a/src/assets/locales/hi.js
+++ b/src/assets/locales/hi.js
@@ -182,6 +182,11 @@ export default {
"यह तस्वीर 10 MB से ज़्यादा बड़ी ह। कृपया कोई छोटी तस्वीर अपलोड करें",
},
},
+ settings: {
+ webhook: {
+ url_input_placeholder: "https://your-webhook-url.com/your/path"
+ }
+ }
},
},
home: {
@@ -580,14 +585,17 @@ export default {
title: {
skipEnabled:
"प्लायो का प्रयास करते समय दर्शक प्रश्नों को छोड़ सकते हैं",
- // firstTimeLanguagePickerPopup: "Viewers will see the language picker on first login",
firstTimeLanguagePickerPopup:
"दर्शकों को पहली बार लॉगिन करते समय भाषा चुनने का विकल्प प्रदान करें",
+ // customWebhook: "Configure a webhook for recieving events from plio",
+ customWebhook: "प्लायो से घटनाओं प्राप्त करने के लिए एक वेबहुक कॉन्फ़िगर करें",
},
description: {
skipEnabled: "दर्शकों को प्रश्न छोड़ने का विकल्प प्रदान करें",
firstTimeLanguagePickerPopup:
"आपके दर्शक अपनी पहली लॉगिन पर भाषा चुनने का विकल्प देखेंगे। यह निर्धारित करता है कि वे प्लेटफ़ॉर्म को किस भाषा में देखेंगे। वर्तमान में केवल दो, अंग्रेजी और हिंदी, का समर्थन किया जाता है।",
+ customWebhook:
+ "प्लायो घटनाओं को अपने वेबहुक के माध्यम से प्राप्त करने के लिए एक वेबहुक कॉन्फ़िगर करें। यह अन्य सेवाओं के साथ प्लायो को एकीकृत करने के लिए उपयोग किया जा सकता है।",
},
info:
"नई सेटिंग्स केवल भविष्य में बनाए जाने वाले प्लायो पर लागू होंगी, न कि पहले से बनाए गए प्लायो पर",
@@ -599,6 +607,7 @@ export default {
tab: {
configuration: "विन्यास",
ui: "यूआई",
+ advanced: "एडवांस्ड"
},
},
badge: {
diff --git a/src/components/App/ConfigureWebhookWindow.vue b/src/components/App/ConfigureWebhookWindow.vue
new file mode 100644
index 000000000..f39ba09e4
--- /dev/null
+++ b/src/components/App/ConfigureWebhookWindow.vue
@@ -0,0 +1,502 @@
+
+
+
+
+ Webhook Configuration
+
+
+
+
+
+
+
+
+
+ Configure Events to Track
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ event.isSelected = !event.isSelected;
+ // if all events are unselected, then close the testing panel
+ if (!localWebhookEvents.some((event) => event.isSelected)) {
+ isTestingPanelOpen = false;
+ currentlyTestingEventTab = null;
+ }
+ }"
+ :checked="event.isSelected"
+ data-test="input"
+ />
+
+
+
+
+
+
+
+ Description:
+
+ {{ event.description }}
+
+
+
+
+
+ Event Code:
+
+ {{ event.code }}
+
+
+
+
+
+ Extra Data:
+
+
+
+ {{ data.code }}
+
+
+ {{ data.type }}
+
+
+ {{ data.description }}
+
+
+
+
+
+
+ Example Payload:
+
+
+ {{ event.payloadExample ?? "" }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Payload Preview
+
+
{{ testingPanelPayloadPreview }}
+
+
+
+
+
+
+
+
+
+
+
Testing Response
+
+
Status Code: {{ testingPanelTestingResponseStatusCode }}