fix: apply ESLint rule vue/no-bare-strings-in-template

This commit is contained in:
iamsivin
2024-07-26 01:43:44 +05:30
parent 602b0d19ca
commit b316b47f74
38 changed files with 192 additions and 109 deletions
@@ -153,14 +153,14 @@ export default {
v-model="action_params"
type="email"
class="answer--text-input"
placeholder="Enter email"
:placeholder="$t('AUTOMATION.ACTION.EMAIL_INPUT_PLACEHOLDER')"
/>
<input
v-else-if="inputType === 'url'"
v-model="action_params"
type="url"
class="answer--text-input"
placeholder="Enter url"
:placeholder="$t('AUTOMATION.ACTION.URL_INPUT_PLACEHOLDER')"
/>
<AutomationActionFileInput
v-if="inputType === 'attachment'"
@@ -243,7 +243,7 @@ export default {
v-model="values"
type="text"
class="mb-0"
placeholder="Enter value"
:placeholder="$t('FILTER.INPUT_PLACEHOLDER')"
/>
</div>
<woot-button
@@ -27,22 +27,22 @@ export default {
<div
v-for="keyShortcut in keyShortcuts"
:key="keyShortcut.key"
class="flex gap-2 items-center"
class="flex items-center gap-2"
>
<div class="flex gap-2 items-center">
<div class="flex items-center gap-2">
<Hotkey
custom-class="h-6 w-8 text-sm font-medium text-slate-700 dark:text-slate-100 bg-slate-100 dark:bg-slate-700 border-b-2 border-slate-300 dark:border-slate-500"
custom-class="w-8 h-6 text-sm font-medium border-b-2 text-slate-7000 dark:text-slate-100 bg-slate-100 dark:bg-slate-700 border-slate-300 dark:border-slate-500"
>
</Hotkey>
<Hotkey
custom-class="h-6 w-8 text-sm font-medium text-slate-700 dark:text-slate-100 bg-slate-100 dark:bg-slate-700 border-b-2 border-slate-300 dark:border-slate-500"
custom-class="w-8 h-6 text-sm font-medium border-b-2 text-slate-700 dark:text-slate-100 bg-slate-100 dark:bg-slate-700 border-slate-300 dark:border-slate-500"
>
{{ keyShortcut.key }}
</Hotkey>
</div>
<span
class="text-sm text-slate-700 dark:text-slate-300 font-medium text-center"
class="text-sm font-medium text-center text-slate-700 dark:text-slate-300"
>
{{ keyShortcut.description }}
</span>
@@ -148,7 +148,9 @@ export default {
>
<div class="wrap">
<div class="label-suggestion--container">
<h6 class="label-suggestion--title">Suggested labels</h6>
<h6 class="label-suggestion--title">
{{ $t('LABEL_MGMT.SUGGESTIONS.SUGGESTED_LABELS') }}
</h6>
<div class="label-suggestion--options">
<button
v-for="label in preparedLabels"
@@ -92,7 +92,7 @@ export default {
<path d="M20 12l-8-8-12 12" fill-rule="evenodd" stroke-width="1px" />
</svg>
</div>
<div class="header flex items-center justify-between">
<div class="flex items-center justify-between header">
<span>{{ $t('BULK_ACTION.AGENT_SELECT_LABEL') }}</span>
<woot-button
size="tiny"
@@ -114,14 +114,14 @@ export default {
<ul v-if="!selectedAgent">
<li class="search-container">
<div
class="agent-list-search h-8 flex justify-between items-center gap-2"
class="flex items-center justify-between h-8 gap-2 agent-list-search"
>
<fluent-icon icon="search" class="search-icon" size="16" />
<input
ref="search"
v-model="query"
type="search"
placeholder="Search"
:placeholder="$t('BULK_ACTION.SEARCH_INPUT_PLACEHOLDER')"
class="agent--search_input"
/>
</div>
@@ -37,7 +37,7 @@ export default {
<path d="M20 12l-8-8-12 12" fill-rule="evenodd" stroke-width="1px" />
</svg>
</div>
<div class="header flex items-center justify-between">
<div class="flex items-center justify-between header">
<span>{{ $t('BULK_ACTION.LABELS.ASSIGN_LABELS') }}</span>
<woot-button
size="tiny"
@@ -50,14 +50,14 @@ export default {
<div class="labels-list">
<header class="labels-list__header">
<div
class="label-list-search h-8 flex justify-between items-center gap-2"
class="flex items-center justify-between h-8 gap-2 label-list-search"
>
<fluent-icon icon="search" class="search-icon" size="16" />
<input
ref="search"
v-model="query"
type="search"
placeholder="Search"
:placeholder="$t('BULK_ACTION.SEARCH_INPUT_PLACEHOLDER')"
class="label--search_input"
/>
</div>
@@ -79,7 +79,7 @@ export default {
class="label-checkbox"
/>
<span
class="label-title overflow-hidden whitespace-nowrap text-ellipsis"
class="overflow-hidden label-title whitespace-nowrap text-ellipsis"
>
{{ label.title }}
</span>
@@ -58,7 +58,7 @@ export default {
ref="search"
v-model="query"
type="search"
placeholder="Search"
:placeholder="$t('BULK_ACTION.SEARCH_INPUT_PLACEHOLDER')"
class="agent--search_input"
/>
</div>
@@ -167,9 +167,9 @@ export default {
</script>
<template>
<div class="phone-input--wrap relative">
<div class="relative phone-input--wrap">
<div
class="flex items-center dark:bg-slate-900 justify-start rounded-md border border-solid"
class="flex items-center justify-start border border-solid rounded-md dark:bg-slate-900"
:class="
error
? 'border border-solid border-red-400 dark:border-red-400 mb-1'
@@ -188,7 +188,7 @@ export default {
</div>
<span
v-if="activeDialCode"
class="flex bg-white dark:bg-slate-900 text-slate-800 dark:text-slate-100 font-normal text-base leading-normal py-2 pl-2 pr-0"
class="flex py-2 pl-2 pr-0 text-base font-normal leading-normal bg-white dark:bg-slate-900 text-slate-800 dark:text-slate-100"
>
{{ activeDialCode }}
</span>
@@ -216,13 +216,13 @@ export default {
onSelectCountry(filteredCountriesBySearch[selectedIndex])
"
>
<div class="top-0 sticky bg-white dark:bg-slate-900 p-1">
<div class="sticky top-0 p-1 bg-white dark:bg-slate-900">
<input
ref="searchbar"
v-model="searchCountry"
type="text"
placeholder="Search"
class="!h-8 !mb-0 !text-sm !border !border-solid !border-slate-200 dark:!border-slate-600"
:placeholder="$t('GENERAL.PHONE_INPUT.PLACEHOLDER')"
class="!h-8 !mb-0 !text-sm !border !border-solid !border-slate-2000 dark:!border-slate-6000"
@input="onSearchCountry"
/>
</div>
@@ -230,29 +230,29 @@ export default {
v-for="(country, index) in filteredCountriesBySearch"
ref="dropdownItem"
:key="index"
class="flex items-center h-7 py-0 px-1 cursor-pointer hover:bg-slate-50 dark:hover:bg-slate-700"
class="flex items-center px-1 py-0 cursor-pointer h-7 hover:bg-slate-50 dark:hover:bg-slate-700"
:class="{
'bg-slate-50 dark:bg-slate-700': country.id === activeCountryCode,
'bg-slate-25 dark:bg-slate-800': index === selectedIndex,
}"
@click="onSelectCountry(country)"
>
<span class="text-base mr-1">{{ country.emoji }}</span>
<span class="mr-1 text-base">{{ country.emoji }}</span>
<span
class="max-w-[7.5rem] overflow-hidden text-ellipsis whitespace-nowrap"
>
{{ country.name }}
</span>
<span class="ml-1 text-slate-300 dark:text-slate-300 text-xs">{{
<span class="ml-1 text-xs text-slate-300 dark:text-slate-300">{{
country.dial_code
}}</span>
</div>
<div v-if="filteredCountriesBySearch.length === 0">
<span
class="flex items-center justify-center text-sm text-slate-500 dark:text-slate-300 mt-4"
class="flex items-center justify-center mt-4 text-sm text-slate-500 dark:text-slate-300"
>
No results found
{{ $t('GENERAL.PHONE_INPUT.EMPTY_STATE') }}
</span>
</div>
</div>
@@ -27,16 +27,16 @@ export default {
<template>
<woot-modal :show="show" size="medium" :on-close="() => $emit('close')">
<div class="h-auto overflow-auto flex flex-col">
<div class="flex flex-col h-auto overflow-auto">
<woot-modal-header
:header-title="$t('SIDEBAR_ITEMS.KEYBOARD_SHORTCUTS')"
/>
<div class="grid grid-cols-2 gap-x-5 gap-y-3 pt-0 px-8 pb-4 mt-6">
<div class="grid grid-cols-2 px-8 pt-0 pb-4 mt-6 gap-x-5 gap-y-3">
<div class="flex justify-between items-center min-w-[25rem]">
<h5 class="text-sm text-slate-800 dark:text-slate-100">
{{ $t('KEYBOARD_SHORTCUTS.TOGGLE_MODAL') }}
</h5>
<div class="flex items-center mb-1 ml-2 gap-2">
<div class="flex items-center gap-2 mb-1 ml-2">
<Hotkey custom-class="min-h-[28px] min-w-[60px] normal-case key">
{{ $t('KEYBOARD_SHORTCUTS.KEYS.WINDOWS_KEY_AND_COMMAND_KEY') }}
</Hotkey>
@@ -47,19 +47,19 @@ export default {
</div>
</div>
<div class="grid grid-cols-2 gap-x-5 gap-y-3 pt-0 px-8 pb-8">
<div class="grid grid-cols-2 px-8 pt-0 pb-8 gap-x-5 gap-y-3">
<div class="flex justify-between items-center min-w-[25rem]">
<h5 class="text-sm text-slate-800 dark:text-slate-100">
{{ $t('KEYBOARD_SHORTCUTS.TITLE.OPEN_CONVERSATION') }}
</h5>
<div class="flex items-center mb-1 ml-2 gap-2">
<div class="flex items-center gap-2 mb-1 ml-2">
<div class="flex gap-2">
<Hotkey custom-class="min-h-[28px] min-w-[60px] normal-case key">
{{ $t('KEYBOARD_SHORTCUTS.KEYS.ALT_OR_OPTION_KEY') }}
</Hotkey>
<Hotkey custom-class="min-h-[28px] w-9 key"> J </Hotkey>
<Hotkey custom-class="min-h-[28px] w-9 key"> {{ 'J' }} </Hotkey>
<span
class="flex items-center font-semibold text-sm text-slate-800 dark:text-slate-100"
class="flex items-center text-sm font-semibold text-slate-800 dark:text-slate-100"
>
{{ $t('KEYBOARD_SHORTCUTS.KEYS.FORWARD_SLASH_KEY') }}
</span>
@@ -67,7 +67,7 @@ export default {
<Hotkey custom-class="min-h-[28px] min-w-[60px] normal-case key">
{{ $t('KEYBOARD_SHORTCUTS.KEYS.ALT_OR_OPTION_KEY') }}
</Hotkey>
<Hotkey custom-class="w-9 key"> K </Hotkey>
<Hotkey custom-class="w-9 key"> {{ 'K' }} </Hotkey>
</div>
</div>
@@ -75,14 +75,14 @@ export default {
<h5 class="text-sm text-slate-800 dark:text-slate-100">
{{ $t('KEYBOARD_SHORTCUTS.TITLE.RESOLVE_AND_NEXT') }}
</h5>
<div class="flex items-center mb-1 ml-2 gap-2">
<div class="flex items-center gap-2 mb-1 ml-2">
<Hotkey custom-class="min-h-[28px] min-w-[60px] normal-case key">
{{ $t('KEYBOARD_SHORTCUTS.KEYS.WINDOWS_KEY_AND_COMMAND_KEY') }}
</Hotkey>
<Hotkey custom-class="min-h-[28px] min-w-[60px] normal-case key">
{{ $t('KEYBOARD_SHORTCUTS.KEYS.ALT_OR_OPTION_KEY') }}
</Hotkey>
<Hotkey custom-class="w-9 key"> E </Hotkey>
<Hotkey custom-class="w-9 key"> {{ 'E' }} </Hotkey>
</div>
</div>
<div
@@ -93,7 +93,7 @@ export default {
<h5 class="text-sm text-slate-800 min-w-[36px] dark:text-slate-100">
{{ title(shortcutKey) }}
</h5>
<div class="flex items-center mb-1 ml-2 gap-2">
<div class="flex items-center gap-2 mb-1 ml-2">
<Hotkey
:class="{ 'min-w-[60px]': shortcutKey.firstKey !== 'Up' }"
custom-class="min-h-[28px] normal-case key"
@@ -18,6 +18,7 @@
"AND": "AND",
"OR": "OR"
},
"INPUT_PLACEHOLDER": "Enter value",
"OPERATOR_LABELS": {
"equal_to": "Equal to",
"not_equal_to": "Not equal to",
@@ -39,12 +39,7 @@
}
},
"LIST": {
"TABLE_HEADER": [
"Name",
"Description",
"Active",
"Created on"
],
"TABLE_HEADER": ["Name", "Description", "Active", "Created on"],
"404": "No automation rules found"
},
"DELETE": {
@@ -93,7 +88,9 @@
"ACTION": {
"DELETE_MESSAGE": "You need to have atleast one action to save",
"TEAM_MESSAGE_INPUT_PLACEHOLDER": "Enter your message here",
"TEAM_DROPDOWN_PLACEHOLDER": "Select teams"
"TEAM_DROPDOWN_PLACEHOLDER": "Select teams",
"EMAIL_INPUT_PLACEHOLDER": "Enter email",
"URL_INPUT_PLACEHOLDER": "Enter URL"
},
"TOGGLE": {
"ACTIVATION_TITLE": "Activate Automation Rule",
@@ -7,6 +7,7 @@
"GO_BACK_LABEL": "Go back",
"ASSIGN_LABEL": "Assign",
"YES": "Yes",
"SEARCH_INPUT_PLACEHOLDER": "Search",
"ASSIGN_AGENT_TOOLTIP": "Assign agent",
"ASSIGN_TEAM_TOOLTIP": "Assign team",
"ASSIGN_SUCCESFUL": "Conversations assigned successfully.",
@@ -381,6 +381,9 @@
},
"SUCCESS_MESSAGE": "Contact merged successfully",
"ERROR_MESSAGE": "Could not merge contacts, try again!"
},
"DROPDOWN_ITEM": {
"ID": "(ID: {identifier})"
}
}
}
@@ -1,5 +1,9 @@
{
"GENERAL": {
"SHOWING_RESULTS": "Showing {firstIndex}-{lastIndex} of {totalCount} items"
"SHOWING_RESULTS": "Showing {firstIndex}-{lastIndex} of {totalCount} items",
"PHONE_INPUT": {
"PLACEHOLDER": "Search",
"EMPTY_STATE": "No results found"
}
}
}
@@ -481,6 +481,7 @@
"DESCRIPTION": "Use the portal as a headless CMS with third party front-end frameworks using our APIs."
}
}
}
},
"LOADING": "Loading..."
}
}
@@ -45,7 +45,8 @@
"DISMISS": "Dismiss",
"ADD_SELECTED_LABELS": "Add selected labels",
"ADD_SELECTED_LABEL": "Add selected label",
"ADD_ALL_LABELS": "Add all labels"
"ADD_ALL_LABELS": "Add all labels",
"SUGGESTED_LABELS": "Suggested labels"
},
"ADD": {
"TITLE": "Add label",
@@ -481,7 +481,8 @@
"HEADER": "Conversation Traffic",
"NO_CONVERSATIONS": "No conversations",
"CONVERSATION": "%{count} conversation",
"CONVERSATIONS": "%{count} conversations"
"CONVERSATIONS": "%{count} conversations",
"DOWNLOAD_REPORT": "Download report"
},
"AGENT_CONVERSATIONS": {
"HEADER": "Conversations by agents",
@@ -536,6 +537,7 @@
"LABELS": "Label",
"TEAMS": "Team"
},
"WITH": "with",
"METRICS": {
"HIT_RATE": {
"LABEL": "Hit Rate",
@@ -37,7 +37,7 @@ export default {
<h5 class="option__title">
{{ name }}
<span v-if="identifier" class="user-identifier">
(ID: {{ identifier }})
{{ $t('MERGE_CONTACTS.DROPDOWN_ITEM.ID', { identifier }) }}
</span>
</h5>
<p class="option__body">
@@ -38,7 +38,7 @@ export default {
<template>
<div
class="flex flex-col mb-2 p-4 border border-solid border-slate-75 dark:border-slate-700 overflow-hidden rounded-md flex-grow shadow-sm bg-white dark:bg-slate-900 text-slate-700 dark:text-slate-100"
class="flex flex-col flex-grow p-4 mb-2 overflow-hidden bg-white border border-solid rounded-md shadow-sm border-slate-75 dark:border-slate-700 dark:bg-slate-900 text-slate-700 dark:text-slate-100"
>
<WootMessageEditor
v-model="noteContent"
@@ -53,7 +53,7 @@ export default {
:is-disabled="buttonDisabled"
@click="onAdd"
>
{{ $t('NOTES.ADD.BUTTON') }} ()
{{ $t('NOTES.ADD.BUTTON') }} {{ '(⌘⏎)' }}
</woot-button>
</div>
</div>
@@ -1,3 +1,4 @@
<!-- Unused file deprecated -->
<script>
import { dynamicTime } from 'shared/helpers/timeHelper';
export default {
@@ -45,7 +46,7 @@ export default {
<h6 class="text-sm">
{{ eventType }}
</h6>
<span class="event-path">on {{ eventPath }}</span>
<span class="event-path">{{ 'on' }} {{ eventPath }}</span>
</div>
<div class="date-wrap">
<span>{{ readableTime }}</span>
@@ -267,14 +267,14 @@ export default {
<div class="flex items-center w-full mt-0.5 gap-2">
<woot-button
v-tooltip="$t('CONTACT_PANEL.NEW_MESSAGE')"
title="$t('CONTACT_PANEL.NEW_MESSAGE')"
:title="$t('CONTACT_PANEL.NEW_MESSAGE')"
icon="chat"
size="small"
@click="toggleConversationModal"
/>
<woot-button
v-tooltip="$t('EDIT_CONTACT.BUTTON_LABEL')"
title="$t('EDIT_CONTACT.BUTTON_LABEL')"
:title="$t('EDIT_CONTACT.BUTTON_LABEL')"
icon="edit"
variant="smooth"
size="small"
@@ -282,7 +282,7 @@ export default {
/>
<woot-button
v-tooltip="$t('CONTACT_PANEL.MERGE_CONTACT')"
title="$t('CONTACT_PANEL.MERGE_CONTACT')"
:title="$t('CONTACT_PANEL.MERGE_CONTACT')"
icon="merge"
variant="smooth"
size="small"
@@ -293,7 +293,7 @@ export default {
<woot-button
v-if="isAdmin"
v-tooltip="$t('DELETE_CONTACT.BUTTON_LABEL')"
title="$t('DELETE_CONTACT.BUTTON_LABEL')"
:title="$t('DELETE_CONTACT.BUTTON_LABEL')"
icon="delete"
variant="smooth"
size="small"
@@ -63,6 +63,6 @@ export default {
<div
class="flex items-center justify-center w-full text-slate-600 dark:text-slate-200"
>
Loading...
{{ $t('HELP_CENTER.LOADING') }}
</div>
</template>
@@ -1,3 +1,4 @@
<!-- Unused file deprecated -->
<template>
<div>Component to list articles in a category in a portal</div>
<div>{{ 'Component to list articles in a category in a portal' }}</div>
</template>
@@ -1,3 +1,4 @@
<!-- Unused file deprecated -->
<template>
<div>Component to create a category</div>
<div>{{ 'Component to create a category' }}</div>
</template>
@@ -1,3 +1,4 @@
<!-- Unused file deprecated -->
<template>
<div>Component to show details of a category</div>
<div>{{ 'Component to show details of a category' }}</div>
</template>
@@ -1,3 +1,4 @@
<!-- Unused file deprecated -->
<template>
<div>Component to view details of portal</div>
<div>{{ 'Component to view details of portal' }}</div>
</template>
@@ -128,28 +128,32 @@ export default {
<td>
<span class="agent-name">{{ item.name }}</span>
<span v-if="item.channel_type === 'Channel::FacebookPage'">
Facebook
{{ 'Facebook' }}
</span>
<span v-if="item.channel_type === 'Channel::WebWidget'">
Website
{{ 'Website' }}
</span>
<span v-if="item.channel_type === 'Channel::TwitterProfile'">
Twitter
{{ 'Twitter' }}
</span>
<span v-if="item.channel_type === 'Channel::TwilioSms'">
{{ twilioChannelName(item) }}
</span>
<span v-if="item.channel_type === 'Channel::Whatsapp'">
Whatsapp
{{ 'Whatsapp' }}
</span>
<span v-if="item.channel_type === 'Channel::Sms'">
{{ 'Sms' }}
</span>
<span v-if="item.channel_type === 'Channel::Sms'"> Sms </span>
<span v-if="item.channel_type === 'Channel::Email'">
Email
{{ 'Email' }}
</span>
<span v-if="item.channel_type === 'Channel::Telegram'">
Telegram
{{ 'Telegram' }}
</span>
<span v-if="item.channel_type === 'Channel::Line'">
{{ 'Line' }}
</span>
<span v-if="item.channel_type === 'Channel::Line'">Line</span>
<span v-if="item.channel_type === 'Channel::Api'">
{{ globalConfig.apiChannelName || 'API' }}
</span>
@@ -168,7 +168,7 @@ export default {
color-scheme="secondary"
@click="downloadHeatmapData"
>
Download Report
{{ $t('OVERVIEW_REPORTS.CONVERSATION_HEATMAP.DOWNLOAD_REPORT') }}
</woot-button>
</template>
<ReportHeatmap
@@ -24,7 +24,7 @@ defineProps({
<template>
<div
class="grid content-center items-center h-16 grid-cols-12 gap-4 px-6 py-0 w-full bg-white border-b last:border-b-0 last:rounded-b-xl border-slate-75 dark:border-slate-800/50 dark:bg-slate-900"
class="grid items-center content-center w-full h-16 grid-cols-12 gap-4 px-6 py-0 bg-white border-b last:border-b-0 last:rounded-b-xl border-slate-75 dark:border-slate-800/50 dark:bg-slate-900"
>
<div
class="flex items-center gap-2 col-span-6 px-0 py-2 text-sm tracking-[0.5] text-slate-700 dark:text-slate-100 rtl:text-right"
@@ -32,8 +32,10 @@ defineProps({
<span class="text-slate-700 dark:text-slate-200">
{{ `#${conversationId} ` }}
</span>
<span class="text-slate-600 dark:text-slate-300">with </span>
<span class="text-slate-700 dark:text-slate-200 capitalize truncate">{{
<span class="text-slate-600 dark:text-slate-300">
{{ $t('SLA_REPORTS.WITH') }}
</span>
<span class="capitalize truncate text-slate-700 dark:text-slate-200">{{
conversation.contact.name
}}</span>
<CardLabels
@@ -47,7 +49,7 @@ defineProps({
>
{{ slaName }}
</div>
<div class="flex items-center gap-2 col-span-2">
<div class="flex items-center col-span-2 gap-2">
<UserAvatarWithName
v-if="conversation.assignee"
:user="conversation.assignee"
@@ -111,17 +111,17 @@ export default {
<div class="flex flex-col w-full max-h-[12.5rem]">
<div class="flex items-center justify-center mb-1">
<h4
class="text-sm text-slate-800 dark:text-slate-100 m-0 overflow-hidden whitespace-nowrap text-ellipsis flex-grow"
class="flex-grow m-0 overflow-hidden text-sm text-slate-800 dark:text-slate-100 whitespace-nowrap text-ellipsis"
>
{{ $t('CONTACT_PANEL.LABELS.LABEL_SELECT.TITLE') }}
</h4>
<Hotkey
custom-class="text-slate-800 dark:text-slate-100 bg-slate-50 dark:bg-slate-600 text-xxs border border-solid border-slate-75 dark:border-slate-600"
custom-class="border border-solid text-slate-800 dark:text-slate-100 bg-slate-50 dark:bg-slate-600 text-xxs border-slate-75 dark:border-slate-600"
>
L
{{ 'L' }}
</Hotkey>
</div>
<div class="mb-2 flex-shrink-0 flex-grow-0 flex-auto max-h-8">
<div class="flex-auto flex-grow-0 flex-shrink-0 mb-2 max-h-8">
<input
ref="searchbar"
v-model="search"
@@ -132,7 +132,7 @@ export default {
/>
</div>
<div
class="flex justify-start items-start flex-grow flex-shrink flex-auto overflow-auto"
class="flex items-start justify-start flex-auto flex-grow flex-shrink overflow-auto"
>
<div class="w-full">
<woot-dropdown-menu>
@@ -17,7 +17,7 @@ defineProps({
role="banner"
>
<a :href="responseSourcePath" class="text-woot-500 hover:underline mr-4">
Back
{{ 'Back' }}
</a>
<div
class="border border-solid border-slate-100 text-slate-700 mr-4 p-2 rounded-full"
@@ -26,14 +26,14 @@ defineProps({
</div>
<div class="flex flex-col h-14 justify-center">
<h1 id="page-title" class="text-base font-medium text-slate-900">
Robin AI playground
{{ 'Robin AI playground' }}
</h1>
<p class="text-sm text-slate-600">
Chat with the source
{{ 'Chat with the source' }}
<span class="font-medium">
{{ responseSourceName }}
</span>
and evaluate its efficiency.
{{ 'and evaluate its efficiency.' }}
</p>
</div>
</header>
@@ -27,7 +27,7 @@ export default {
<template>
<div class="relative flex items-center">
<div
class="absolute inset-y-0 left-0 flex items-center py-2 px-2 text-slate-500"
class="absolute inset-y-0 left-0 flex items-center px-2 py-2 text-slate-500"
>
<fluent-icon icon="search" size="14" />
</div>
@@ -37,14 +37,14 @@ export default {
:placeholder="placeholder"
type="text"
name="search"
class="block w-full h-8 rounded-md focus-visible:outline-none pl-6 pr-1 px-2 text-sm text-slate-800 border border-slate-100 bg-slate-75 placeholder:text-slate-400 focus:ring focus:border-woot-500 focus:ring-woot-200 hover:border-woot-200"
class="block w-full h-8 px-2 pl-6 pr-1 text-sm border rounded-md focus-visible:outline-none text-slate-800 border-slate-100 bg-slate-75 placeholder:text-slate-400 focus:ring focus:border-woot-500 focus:ring-woot-200 hover:border-woot-200"
@input="handleInput"
/>
<div class="absolute inset-y-0 right-0 flex py-1.5 pr-1.5">
<kbd
class="inline-flex items-center rounded border border-slate-200 px-1 font-sans text-xxs text-slate-400"
class="inline-flex items-center px-1 font-sans border rounded border-slate-200 text-xxs text-slate-400"
>
K
{{ '⌘K' }}
</kbd>
</div>
</div>
@@ -154,7 +154,7 @@ export default {
<button
v-if="hasEmojiPickerEnabled"
class="flex items-center justify-center icon-button"
aria-label="Emoji picker"
:aria-label="$t('EMOJI.ARIA_LABEL')"
@click="toggleEmojiPicker"
>
<FluentIcon icon="emoji" :class="emojiIconColor" />
@@ -28,7 +28,7 @@ export default {
class="mb-2.5 rounded-[7px] dark:bg-slate-900 dark:text-slate-100 bg-slate-100 px-2 py-1.5 text-sm text-slate-700 flex items-center gap-2"
>
<div class="items-center flex-grow truncate">
<strong>Replying to:</strong>
<strong>{{ $t('FOOTER_REPLY_TO.REPLY_TO') }}</strong>
{{ inReplyTo.content || replyToAttachment }}
</div>
<button
@@ -222,17 +222,17 @@ export default {
</script>
<template>
<div class="phone-input--wrap relative mt-2">
<div class="relative mt-2 phone-input--wrap">
<div
class="phone-input rounded w-full flex items-center justify-start outline-none border border-solid"
class="flex items-center justify-start w-full border border-solid rounded outline-none phone-input"
:class="inputHasError"
>
<div
class="country-emoji--wrap h-full cursor-pointer flex items-center justify-between px-2 py-2"
class="flex items-center justify-between h-full px-2 py-2 cursor-pointer country-emoji--wrap"
:class="dropdownClass"
@click="toggleCountryDropdown"
>
<h5 v-if="activeCountry.emoji" class="text-xl mb-0">
<h5 v-if="activeCountry.emoji" class="mb-0 text-xl">
{{ activeCountry.emoji }}
</h5>
<FluentIcon v-else icon="globe" class="fluent-icon" size="20" />
@@ -240,7 +240,7 @@ export default {
</div>
<span
v-if="activeDialCode"
class="py-2 pr-0 pl-2 text-base"
class="py-2 pl-2 pr-0 text-base"
:class="$dm('text-slate-700', 'dark:text-slate-50')"
>
{{ activeDialCode }}
@@ -248,7 +248,7 @@ export default {
<input
:value="phoneNumber"
type="phoneInput"
class="border-0 w-full py-2 pl-2 pr-3 leading-tight outline-none h-full rounded-r"
class="w-full h-full py-2 pl-2 pr-3 leading-tight border-0 rounded-r outline-none"
name="phoneNumber"
:placeholder="placeholder"
:class="inputLightAndDarkModeColor"
@@ -261,7 +261,7 @@ export default {
ref="dropdown"
v-on-clickaway="closeDropdown"
:class="dropdownBackgroundClass"
class="country-dropdown h-48 overflow-y-auto z-10 absolute top-12 px-0 pt-0 pl-1 pr-1 pb-1 rounded shadow-lg"
class="absolute z-10 h-48 px-0 pt-0 pb-1 pl-1 pr-1 overflow-y-auto rounded shadow-lg country-dropdown top-12"
@keydown.up="moveSelectionUp"
@keydown.down="moveSelectionDown"
@keydown.enter="onSelect"
@@ -271,8 +271,8 @@ export default {
ref="searchbar"
v-model="searchCountry"
type="text"
placeholder="Search country"
class="dropdown-search h-8 text-sm mb-1 mt-1 w-full rounded py-2 px-3 outline-none border border-solid"
:placeholder="$t('PRE_CHAT_FORM.FIELDS.PHONE_NUMBER.DROPDOWN_SEARCH')"
class="w-full h-8 px-3 py-2 mt-1 mb-1 text-sm border border-solid rounded outline-none dropdown-search"
:class="[$dm('bg-slate-50', 'dark:bg-slate-600'), inputBorderColor]"
/>
</div>
@@ -280,7 +280,7 @@ export default {
v-for="(country, index) in items"
ref="dropdownItem"
:key="index"
class="country-dropdown--item h-8 flex items-center cursor-pointer rounded py-2 px-2"
class="flex items-center h-8 px-2 py-2 rounded cursor-pointer country-dropdown--item"
:class="[
dropdownItemClass,
country.id === activeCountryCode ? activeDropdownItemClass : '',
@@ -291,14 +291,14 @@ export default {
<span v-if="country.emoji" class="mr-2 text-xl">{{
country.emoji
}}</span>
<span class="truncate text-sm leading-5">
<span class="text-sm leading-5 truncate">
{{ country.name }}
</span>
<span class="ml-2 text-xs">{{ country.dial_code }}</span>
</div>
<div v-if="items.length === 0">
<span
class="text-sm mt-4 justify-center text-center flex"
class="flex justify-center mt-4 text-sm text-center"
:class="$dm('text-slate-700', 'dark:text-slate-50')"
>
{{ $t('PRE_CHAT_FORM.FIELDS.PHONE_NUMBER.DROPDOWN_EMPTY') }}
@@ -27,7 +27,7 @@ export default {
<template>
<div class="relative flex items-center">
<div
class="absolute inset-y-0 left-0 flex items-center px-2 h-8 text-slate-500"
class="absolute inset-y-0 left-0 flex items-center h-8 px-2 text-slate-500"
>
<fluent-icon icon="search" size="14" />
</div>
@@ -37,14 +37,14 @@ export default {
:placeholder="placeholder"
type="text"
name="search"
class="block w-full h-8 rounded-md focus-visible:outline-none m-0 pl-6 pr-1 px-2 text-sm text-slate-800 border border-slate-100 bg-slate-75 placeholder:text-slate-400 focus:ring focus:border-woot-500 focus:ring-woot-200 hover:border-woot-200"
class="block w-full h-8 px-2 pl-6 pr-1 m-0 text-sm border rounded-md focus-visible:outline-none text-slate-800 border-slate-100 bg-slate-75 placeholder:text-slate-400 focus:ring focus:border-woot-500 focus:ring-woot-200 hover:border-woot-200"
@input="handleInput"
/>
<div class="absolute inset-y-0 right-0 flex h-8 p-1">
<kbd
class="inline-flex items-center rounded border border-slate-200 px-1 font-sans text-xxs text-slate-400"
class="inline-flex items-center px-1 font-sans border rounded border-slate-200 text-xxs text-slate-400"
>
K
{{ '⌘K' }}
</kbd>
</div>
</div>
+7 -2
View File
@@ -70,7 +70,8 @@
"REQUIRED_ERROR": "Phone Number is required",
"DIAL_CODE_VALID_ERROR": "Please select a country code",
"VALID_ERROR": "Please enter a valid phone number",
"DROPDOWN_EMPTY": "No results found"
"DROPDOWN_EMPTY": "No results found",
"DROPDOWN_SEARCH": "Search country"
},
"MESSAGE": {
"LABEL": "Message",
@@ -91,7 +92,8 @@
},
"EMOJI": {
"PLACEHOLDER": "Search emojis",
"NOT_FOUND": "No emoji match your search"
"NOT_FOUND": "No emoji match your search",
"ARIA_LABEL": "Emoji picker"
},
"CSAT": {
"TITLE": "Rate your conversation",
@@ -133,5 +135,8 @@
"fallback": {
"CONTENT": "has shared a url"
}
},
"FOOTER_REPLY_TO": {
"REPLY_TO": "Replying to:"
}
}