From b0112a28693c4b27701f717fe3b8bd0787c55762 Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Tue, 2 Sep 2025 14:11:38 +0530 Subject: [PATCH] feat: Update Inbox/Team creation UI (#12305) --- .../components-next/icon/provider.js | 26 +-- .../icon/specs/provider.spec.js | 30 ++-- .../components-next/sidebar/ChannelLeaf.vue | 2 +- .../dashboard/components/ChannelSelector.vue | 77 ++++---- .../dashboard/components/ui/Wizard.vue | 144 +++++++-------- .../components/widgets/ChannelItem.vue | 152 ++++++++-------- .../components/widgets/InboxName.vue | 2 +- .../widgets/conversation/ConversationCard.vue | 1 - .../dashboard/i18n/locale/en/inboxMgmt.json | 61 ++++++- .../dashboard/settings/inbox/AddAgents.vue | 4 +- .../dashboard/settings/inbox/ChannelList.vue | 165 ++++++++++-------- .../dashboard/settings/inbox/FinishSetup.vue | 4 +- .../settings/inbox/InboxChannels.vue | 137 ++++++++++----- .../routes/dashboard/settings/inbox/Index.vue | 2 +- .../dashboard/settings/inbox/channels/Api.vue | 4 +- .../settings/inbox/channels/Email.vue | 27 +-- .../settings/inbox/channels/Facebook.vue | 6 +- .../settings/inbox/channels/Line.vue | 4 +- .../dashboard/settings/inbox/channels/Sms.vue | 4 +- .../settings/inbox/channels/Telegram.vue | 4 +- .../settings/inbox/channels/Twitter.vue | 4 +- .../settings/inbox/channels/Voice.vue | 4 +- .../settings/inbox/channels/Website.vue | 4 +- .../settings/inbox/channels/Whatsapp.vue | 76 +++----- .../emailChannels/ForwardToOption.vue | 4 +- .../channels/emailChannels/OAuthChannel.vue | 4 +- .../settings/teams/Create/AddAgents.vue | 4 +- .../settings/teams/Create/CreateTeam.vue | 4 +- .../dashboard/settings/teams/Create/Index.vue | 13 +- .../settings/teams/Edit/EditAgents.vue | 4 +- .../settings/teams/Edit/EditTeam.vue | 4 +- .../dashboard/settings/teams/Edit/Index.vue | 13 +- .../dashboard/settings/teams/FinishSetup.vue | 4 +- theme/icons.js | 67 +++++++ 34 files changed, 600 insertions(+), 465 deletions(-) diff --git a/app/javascript/dashboard/components-next/icon/provider.js b/app/javascript/dashboard/components-next/icon/provider.js index 887368438..a356ae2fd 100644 --- a/app/javascript/dashboard/components-next/icon/provider.js +++ b/app/javascript/dashboard/components-next/icon/provider.js @@ -2,23 +2,23 @@ import { computed } from 'vue'; export function useChannelIcon(inbox) { const channelTypeIconMap = { - 'Channel::Api': 'i-ri-cloudy-fill', - 'Channel::Email': 'i-ri-mail-fill', - 'Channel::FacebookPage': 'i-ri-messenger-fill', - 'Channel::Line': 'i-ri-line-fill', - 'Channel::Sms': 'i-ri-chat-1-fill', - 'Channel::Telegram': 'i-ri-telegram-fill', - 'Channel::TwilioSms': 'i-ri-chat-1-fill', + 'Channel::Api': 'i-woot-api', + 'Channel::Email': 'i-woot-mail', + 'Channel::FacebookPage': 'i-woot-messenger', + 'Channel::Line': 'i-woot-line', + 'Channel::Sms': 'i-woot-sms', + 'Channel::Telegram': 'i-woot-telegram', + 'Channel::TwilioSms': 'i-woot-sms', 'Channel::TwitterProfile': 'i-ri-twitter-x-fill', - 'Channel::WebWidget': 'i-ri-global-fill', - 'Channel::Whatsapp': 'i-ri-whatsapp-fill', - 'Channel::Instagram': 'i-ri-instagram-fill', + 'Channel::WebWidget': 'i-woot-website', + 'Channel::Whatsapp': 'i-woot-whatsapp', + 'Channel::Instagram': 'i-woot-instagram', 'Channel::Voice': 'i-ri-phone-fill', }; const providerIconMap = { - microsoft: 'i-ri-microsoft-fill', - google: 'i-ri-google-fill', + microsoft: 'i-woot-outlook', + google: 'i-woot-gmail', }; const channelIcon = computed(() => { @@ -34,7 +34,7 @@ export function useChannelIcon(inbox) { // Special case for Twilio whatsapp if (type === 'Channel::TwilioSms' && inboxDetails.medium === 'whatsapp') { - icon = 'i-ri-whatsapp-fill'; + icon = 'i-woot-whatsapp'; } return icon ?? 'i-ri-global-fill'; diff --git a/app/javascript/dashboard/components-next/icon/specs/provider.spec.js b/app/javascript/dashboard/components-next/icon/specs/provider.spec.js index b0b820f25..e32df567d 100644 --- a/app/javascript/dashboard/components-next/icon/specs/provider.spec.js +++ b/app/javascript/dashboard/components-next/icon/specs/provider.spec.js @@ -4,19 +4,19 @@ describe('useChannelIcon', () => { it('returns correct icon for API channel', () => { const inbox = { channel_type: 'Channel::Api' }; const { value: icon } = useChannelIcon(inbox); - expect(icon).toBe('i-ri-cloudy-fill'); + expect(icon).toBe('i-woot-api'); }); it('returns correct icon for Facebook channel', () => { const inbox = { channel_type: 'Channel::FacebookPage' }; const { value: icon } = useChannelIcon(inbox); - expect(icon).toBe('i-ri-messenger-fill'); + expect(icon).toBe('i-woot-messenger'); }); it('returns correct icon for WhatsApp channel', () => { const inbox = { channel_type: 'Channel::Whatsapp' }; const { value: icon } = useChannelIcon(inbox); - expect(icon).toBe('i-ri-whatsapp-fill'); + expect(icon).toBe('i-woot-whatsapp'); }); it('returns correct icon for Voice channel', () => { @@ -28,19 +28,19 @@ describe('useChannelIcon', () => { it('returns correct icon for Line channel', () => { const inbox = { channel_type: 'Channel::Line' }; const { value: icon } = useChannelIcon(inbox); - expect(icon).toBe('i-ri-line-fill'); + expect(icon).toBe('i-woot-line'); }); it('returns correct icon for SMS channel', () => { const inbox = { channel_type: 'Channel::Sms' }; const { value: icon } = useChannelIcon(inbox); - expect(icon).toBe('i-ri-chat-1-fill'); + expect(icon).toBe('i-woot-sms'); }); it('returns correct icon for Telegram channel', () => { const inbox = { channel_type: 'Channel::Telegram' }; const { value: icon } = useChannelIcon(inbox); - expect(icon).toBe('i-ri-telegram-fill'); + expect(icon).toBe('i-woot-telegram'); }); it('returns correct icon for Twitter channel', () => { @@ -52,20 +52,20 @@ describe('useChannelIcon', () => { it('returns correct icon for WebWidget channel', () => { const inbox = { channel_type: 'Channel::WebWidget' }; const { value: icon } = useChannelIcon(inbox); - expect(icon).toBe('i-ri-global-fill'); + expect(icon).toBe('i-woot-website'); }); it('returns correct icon for Instagram channel', () => { const inbox = { channel_type: 'Channel::Instagram' }; const { value: icon } = useChannelIcon(inbox); - expect(icon).toBe('i-ri-instagram-fill'); + expect(icon).toBe('i-woot-instagram'); }); describe('TwilioSms channel', () => { it('returns chat icon for regular Twilio SMS channel', () => { const inbox = { channel_type: 'Channel::TwilioSms' }; const { value: icon } = useChannelIcon(inbox); - expect(icon).toBe('i-ri-chat-1-fill'); + expect(icon).toBe('i-woot-sms'); }); it('returns WhatsApp icon for Twilio SMS with WhatsApp medium', () => { @@ -74,7 +74,7 @@ describe('useChannelIcon', () => { medium: 'whatsapp', }; const { value: icon } = useChannelIcon(inbox); - expect(icon).toBe('i-ri-whatsapp-fill'); + expect(icon).toBe('i-woot-whatsapp'); }); it('returns chat icon for Twilio SMS with non-WhatsApp medium', () => { @@ -83,7 +83,7 @@ describe('useChannelIcon', () => { medium: 'sms', }; const { value: icon } = useChannelIcon(inbox); - expect(icon).toBe('i-ri-chat-1-fill'); + expect(icon).toBe('i-woot-sms'); }); it('returns chat icon for Twilio SMS with undefined medium', () => { @@ -92,7 +92,7 @@ describe('useChannelIcon', () => { medium: undefined, }; const { value: icon } = useChannelIcon(inbox); - expect(icon).toBe('i-ri-chat-1-fill'); + expect(icon).toBe('i-woot-sms'); }); }); @@ -100,7 +100,7 @@ describe('useChannelIcon', () => { it('returns mail icon for generic email channel', () => { const inbox = { channel_type: 'Channel::Email' }; const { value: icon } = useChannelIcon(inbox); - expect(icon).toBe('i-ri-mail-fill'); + expect(icon).toBe('i-woot-mail'); }); it('returns Microsoft icon for Microsoft email provider', () => { @@ -109,7 +109,7 @@ describe('useChannelIcon', () => { provider: 'microsoft', }; const { value: icon } = useChannelIcon(inbox); - expect(icon).toBe('i-ri-microsoft-fill'); + expect(icon).toBe('i-woot-outlook'); }); it('returns Google icon for Google email provider', () => { @@ -118,7 +118,7 @@ describe('useChannelIcon', () => { provider: 'google', }; const { value: icon } = useChannelIcon(inbox); - expect(icon).toBe('i-ri-google-fill'); + expect(icon).toBe('i-woot-gmail'); }); }); diff --git a/app/javascript/dashboard/components-next/sidebar/ChannelLeaf.vue b/app/javascript/dashboard/components-next/sidebar/ChannelLeaf.vue index 2a93089a9..db0e08d04 100644 --- a/app/javascript/dashboard/components-next/sidebar/ChannelLeaf.vue +++ b/app/javascript/dashboard/components-next/sidebar/ChannelLeaf.vue @@ -25,7 +25,7 @@ const reauthorizationRequired = computed(() => {