diff --git a/.editorconfig b/.editorconfig index 7203adb09..2a5fe28cf 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,8 +7,8 @@ end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true -indent_style = spaces +indent_style = space tab_width = 2 -[{*.{rb,erb,js,coffee,json,yml,css,scss,sh,markdown,md,html}] +[*.{rb,erb,js,coffee,json,yml,css,scss,sh,markdown,md,html}] indent_size = 2 diff --git a/.gitignore b/.gitignore index e4b14d2f5..11a8c50e3 100644 --- a/.gitignore +++ b/.gitignore @@ -39,9 +39,6 @@ public/packs* *.un~ .jest-cache -#VS Code files -.vscode - # ignore jetbrains IDE files .idea @@ -62,4 +59,4 @@ package-lock.json test/cypress/videos/* /config/master.key -/config/*.enc \ No newline at end of file +/config/*.enc diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000..254e696a4 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,32 @@ +{ + "recommendations": [ + // Spell check + "streetsidesoftware.code-spell-checker", + // Better Comments + "aaron-bond.better-comments", + // Rails Test Runner + "davidpallinder.rails-test-runner", + // Eslint + "dbaeumer.vscode-eslint", + // Auto Close Tag + "formulahendry.auto-close-tag", + // Auto Rename Tag + "formulahendry.auto-rename-tag", + // Hight light colors + "naumovs.color-highlight", + // GitLens + "eamodio.gitlens", + // Ruby + "rebornix.ruby", + // Vue + "octref.vetur", + // Prettier + "esbenp.prettier-vscode", + // Dot Env + "mikestead.dotenv", + // HTML CSS Support + "ecmel.vscode-html-css", + // Tailwind CSS Intellisense + "bradlc.vscode-tailwindcss", + ] +} diff --git a/app/javascript/dashboard/components/layout/config/sidebarItems/primaryMenu.js b/app/javascript/dashboard/components/layout/config/sidebarItems/primaryMenu.js index cc4287503..fa4633ec1 100644 --- a/app/javascript/dashboard/components/layout/config/sidebarItems/primaryMenu.js +++ b/app/javascript/dashboard/components/layout/config/sidebarItems/primaryMenu.js @@ -39,7 +39,7 @@ const primaryMenuItems = accountId => [ label: 'HELP_CENTER.TITLE', featureFlag: 'help_center', toState: frontendURL(`accounts/${accountId}/portals`), - toStateName: 'list_all_portals', + toStateName: 'default_portal_articles', roles: ['administrator'], }, { diff --git a/app/javascript/dashboard/components/widgets/Avatar.vue b/app/javascript/dashboard/components/widgets/Avatar.vue index daf044288..df654ee7e 100644 --- a/app/javascript/dashboard/components/widgets/Avatar.vue +++ b/app/javascript/dashboard/components/widgets/Avatar.vue @@ -78,7 +78,7 @@ export default { if (initials.length > 2 && initials.search(/[A-Z]/) !== -1) { initials = initials.replace(/[a-z]+/g, ''); } - initials = initials.substr(0, 2).toUpperCase(); + initials = initials.substring(0, 2).toUpperCase(); return initials; }, }, diff --git a/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue b/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue index 1b0b9ca36..bbc2f017e 100644 --- a/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue +++ b/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue @@ -477,7 +477,7 @@ export default { const hasNextWord = updatedMessage.includes(' '); const isShortCodeActive = this.hasSlashCommand && !hasNextWord; if (isShortCodeActive) { - this.mentionSearchKey = updatedMessage.substr(1, updatedMessage.length); + this.mentionSearchKey = updatedMessage.substring(1); this.showMentions = true; } else { this.mentionSearchKey = ''; diff --git a/app/javascript/dashboard/routes/dashboard/conversation/contact/ConversationForm.vue b/app/javascript/dashboard/routes/dashboard/conversation/contact/ConversationForm.vue index 9dda5c02c..c9294aa2a 100644 --- a/app/javascript/dashboard/routes/dashboard/conversation/contact/ConversationForm.vue +++ b/app/javascript/dashboard/routes/dashboard/conversation/contact/ConversationForm.vue @@ -239,7 +239,7 @@ export default { const hasNextWord = value.includes(' '); const isShortCodeActive = this.hasSlashCommand && !hasNextWord; if (isShortCodeActive) { - this.cannedResponseSearchKey = value.substr(1, value.length); + this.cannedResponseSearchKey = value.substring(1); this.showCannedResponseMenu = true; } else { this.cannedResponseSearchKey = ''; diff --git a/app/javascript/dashboard/routes/dashboard/helpcenter/components/HelpCenterLayout.vue b/app/javascript/dashboard/routes/dashboard/helpcenter/components/HelpCenterLayout.vue index 528b55575..562d6bd07 100644 --- a/app/javascript/dashboard/routes/dashboard/helpcenter/components/HelpCenterLayout.vue +++ b/app/javascript/dashboard/routes/dashboard/helpcenter/components/HelpCenterLayout.vue @@ -59,6 +59,7 @@ import HelpCenterSidebar from '../components/Sidebar/Sidebar.vue'; import CommandBar from 'dashboard/routes/dashboard/commands/commandbar.vue'; import WootKeyShortcutModal from 'dashboard/components/widgets/modal/WootKeyShortcutModal'; import NotificationPanel from 'dashboard/routes/dashboard/notifications/components/NotificationPanel'; +import uiSettingsMixin from 'dashboard/mixins/uiSettings'; import portalMixin from '../mixins/portalMixin'; import AddCategory from '../pages/categories/AddCategory'; @@ -72,7 +73,7 @@ export default { PortalPopover, AddCategory, }, - mixins: [portalMixin], + mixins: [portalMixin, uiSettingsMixin], data() { return { isSidebarOpen: false, @@ -231,7 +232,13 @@ export default { }, updated() { const slug = this.$route.params.portalSlug; - if (slug) this.lastActivePortalSlug = slug; + if (slug) { + this.lastActivePortalSlug = slug; + this.updateUISettings({ + last_active_portal_slug: slug, + last_active_locale_code: this.selectedLocaleInPortal, + }); + } }, methods: { handleResize() { diff --git a/app/javascript/dashboard/routes/dashboard/helpcenter/components/PortalListItem.vue b/app/javascript/dashboard/routes/dashboard/helpcenter/components/PortalListItem.vue index e0e002002..0354ad22b 100644 --- a/app/javascript/dashboard/routes/dashboard/helpcenter/components/PortalListItem.vue +++ b/app/javascript/dashboard/routes/dashboard/helpcenter/components/PortalListItem.vue @@ -188,13 +188,15 @@ diff --git a/app/javascript/dashboard/routes/dashboard/settings/inbox/FinishSetup.vue b/app/javascript/dashboard/routes/dashboard/settings/inbox/FinishSetup.vue index 01c46f5dc..7931016e4 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/inbox/FinishSetup.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/inbox/FinishSetup.vue @@ -19,15 +19,11 @@ :script="currentInbox.callback_webhook_url" /> -
{{ $t('INBOX_MGMT.ADD.WHATSAPP.API_CALLBACK.WEBHOOK_URL') }}
-{{ $t( @@ -36,7 +32,6 @@ }}