From 602fcb2fe825fcd6575afcfc994bbd26012b47ef Mon Sep 17 00:00:00 2001 From: Deepansh Mathur Date: Fri, 10 May 2024 02:55:40 +0530 Subject: [PATCH] build errors --- src/components/App/ConfigureWebhookWindow.vue | 9 ++------- src/components/Editor/CodeHighlighter.vue | 10 ++++++++-- src/services/Config/GlobalDefaultSettings.js | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/components/App/ConfigureWebhookWindow.vue b/src/components/App/ConfigureWebhookWindow.vue index 41ba6e6a..3850b7bb 100644 --- a/src/components/App/ConfigureWebhookWindow.vue +++ b/src/components/App/ConfigureWebhookWindow.vue @@ -396,7 +396,7 @@ export default { * Get style classes for how a tab looks on the sidebar region * @param {String} tabName - The name of the tab for which the style classes are required */ - getTabStyleClasses(tabCodeName) { + getTabStyleClasses() { return "text-primary leading-relaxed pl-2 font-medium w-full capitalize whitespace-nowrap lg:text-base md:text-sm bp-500:text-xs text-xl text-left py-1" }, clickTab(tabCodeName) { @@ -419,11 +419,6 @@ export default { }, computed: { ...mapGetters("generic", ["isMobileScreen"]), - saveButtonTooltip() { - return this.areThereUnsavedChanges - ? this.$t("tooltip.settings.buttons.save.hasUnsavedChanges") - : this.$t("tooltip.settings.buttons.save.noUnsavedChanges"); - }, areThereUnsavedChanges() { // check if url is valid and the new url is different from the old url if (!this.isUrlValid) return false; @@ -443,7 +438,7 @@ export default { saveButtonTooltip() { return this.areThereUnsavedChanges ? this.$t("tooltip.settings.buttons.apply_webhook_configuration") - : this.$t("tooltip.settings.buttons.discard_webhook_configuration"); + : this.$t("tooltip.settings.buttons.save.noUnsavedChanges"); }, isUrlValidationEnabled() { return this.url.trim() == "" ? false : true; diff --git a/src/components/Editor/CodeHighlighter.vue b/src/components/Editor/CodeHighlighter.vue index b315435f..397f0443 100644 --- a/src/components/Editor/CodeHighlighter.vue +++ b/src/components/Editor/CodeHighlighter.vue @@ -25,11 +25,17 @@ export default { }, beforeUpdate() { - if (typeof this.$slots.default[0] === "string") { - const newText = this.$slots.default[0].replace(/^[\r\n\s]*|[\r\n\s]*$/g, ""); + const defaultSlot = this.$scopedSlots.default && this.$scopedSlots.default(); + if (defaultSlot && typeof defaultSlot[0] === "string") { + const newText = defaultSlot[0].replace(/^[\r\n\s]*|[\r\n\s]*$/g, ""); this.$el.querySelector("code").textContent = newText; Prism.highlightAllUnder(this.$refs.codeBlock); } + // if (typeof this.$slots.default[0] === "string") { + // const newText = this.$slots.default[0].replace(/^[\r\n\s]*|[\r\n\s]*$/g, ""); + // this.$el.querySelector("code").textContent = newText; + // Prism.highlightAllUnder(this.$refs.codeBlock); + // } }, }; diff --git a/src/services/Config/GlobalDefaultSettings.js b/src/services/Config/GlobalDefaultSettings.js index db9f4266..56ec99cc 100644 --- a/src/services/Config/GlobalDefaultSettings.js +++ b/src/services/Config/GlobalDefaultSettings.js @@ -1,7 +1,7 @@ /** default settings */ let skipEnabled = true; let firstTimeLanguagePickerPopup = true; -let customWebhookEnabled = false; +// let customWebhookEnabled = false; /** * This object contains a mapping of a setting and its metadata.