mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 19:48:08 +00:00
chore: Update chat list header UI (#10573)
This commit is contained in:
@@ -6,6 +6,14 @@
|
|||||||
@apply border-b border-slate-50 dark:border-slate-800/50;
|
@apply border-b border-slate-50 dark:border-slate-800/50;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tabs--container--compact.tab--chat-type {
|
||||||
|
.tabs-title {
|
||||||
|
a {
|
||||||
|
@apply py-2 text-sm;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.tabs {
|
.tabs {
|
||||||
@apply border-r-0 border-l-0 border-t-0 flex min-w-[6.25rem] py-0 px-4 list-none mb-0;
|
@apply border-r-0 border-l-0 border-t-0 flex min-w-[6.25rem] py-0 px-4 list-none mb-0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -794,6 +794,7 @@ watch(conversationFilters, (newVal, oldVal) => {
|
|||||||
:has-applied-filters="hasAppliedFilters"
|
:has-applied-filters="hasAppliedFilters"
|
||||||
:has-active-folders="hasActiveFolders"
|
:has-active-folders="hasActiveFolders"
|
||||||
:active-status="activeStatus"
|
:active-status="activeStatus"
|
||||||
|
:is-on-expanded-layout="isOnExpandedLayout"
|
||||||
@add-folders="onClickOpenAddFoldersModal"
|
@add-folders="onClickOpenAddFoldersModal"
|
||||||
@delete-folders="onClickOpenDeleteFoldersModal"
|
@delete-folders="onClickOpenDeleteFoldersModal"
|
||||||
@filters-modal="onToggleAdvanceFiltersModal"
|
@filters-modal="onToggleAdvanceFiltersModal"
|
||||||
@@ -823,6 +824,7 @@ watch(conversationFilters, (newVal, oldVal) => {
|
|||||||
v-if="!hasAppliedFiltersOrActiveFolders"
|
v-if="!hasAppliedFiltersOrActiveFolders"
|
||||||
:items="assigneeTabItems"
|
:items="assigneeTabItems"
|
||||||
:active-tab="activeAssigneeTab"
|
:active-tab="activeAssigneeTab"
|
||||||
|
is-compact
|
||||||
@chat-tab-change="updateAssigneeTab"
|
@chat-tab-change="updateAssigneeTab"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,13 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
import { useUISettings } from 'dashboard/composables/useUISettings';
|
||||||
|
import { useMapGetter } from 'dashboard/composables/store.js';
|
||||||
|
import wootConstants from 'dashboard/constants/globals';
|
||||||
|
import { FEATURE_FLAGS } from 'dashboard/featureFlags';
|
||||||
|
|
||||||
import ConversationBasicFilter from './widgets/conversation/ConversationBasicFilter.vue';
|
import ConversationBasicFilter from './widgets/conversation/ConversationBasicFilter.vue';
|
||||||
|
import SwitchLayout from 'dashboard/routes/dashboard/conversation/search/SwitchLayout.vue';
|
||||||
|
import NextButton from 'dashboard/components-next/button/Button.vue';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
pageTitle: {
|
pageTitle: {
|
||||||
@@ -19,6 +26,10 @@ const props = defineProps({
|
|||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
isOnExpandedLayout: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
@@ -29,6 +40,13 @@ const emit = defineEmits([
|
|||||||
'filtersModal',
|
'filtersModal',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const { uiSettings, updateUISettings } = useUISettings();
|
||||||
|
|
||||||
|
const currentAccountId = useMapGetter('getCurrentAccountId');
|
||||||
|
const isFeatureEnabledonAccount = useMapGetter(
|
||||||
|
'accounts/isFeatureEnabledonAccount'
|
||||||
|
);
|
||||||
|
|
||||||
const onBasicFilterChange = (value, type) => {
|
const onBasicFilterChange = (value, type) => {
|
||||||
emit('basicFilterChange', value, type);
|
emit('basicFilterChange', value, type);
|
||||||
};
|
};
|
||||||
@@ -36,26 +54,48 @@ const onBasicFilterChange = (value, type) => {
|
|||||||
const hasAppliedFiltersOrActiveFolders = computed(() => {
|
const hasAppliedFiltersOrActiveFolders = computed(() => {
|
||||||
return props.hasAppliedFilters || props.hasActiveFolders;
|
return props.hasAppliedFilters || props.hasActiveFolders;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const showV4View = computed(() => {
|
||||||
|
return isFeatureEnabledonAccount.value(
|
||||||
|
currentAccountId.value,
|
||||||
|
FEATURE_FLAGS.CHATWOOT_V4
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
const toggleConversationLayout = () => {
|
||||||
|
const { LAYOUT_TYPES } = wootConstants;
|
||||||
|
const {
|
||||||
|
conversation_display_type: conversationDisplayType = LAYOUT_TYPES.CONDENSED,
|
||||||
|
} = uiSettings.value;
|
||||||
|
const newViewType =
|
||||||
|
conversationDisplayType === LAYOUT_TYPES.CONDENSED
|
||||||
|
? LAYOUT_TYPES.EXPANDED
|
||||||
|
: LAYOUT_TYPES.CONDENSED;
|
||||||
|
updateUISettings({
|
||||||
|
conversation_display_type: newViewType,
|
||||||
|
previously_used_conversation_display_type: newViewType,
|
||||||
|
});
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="flex items-center justify-between px-4 py-0"
|
class="flex items-center justify-between px-4 pb-0"
|
||||||
:class="{
|
:class="{
|
||||||
'pb-3 border-b border-slate-75 dark:border-slate-700':
|
'pb-3 border-b border-n-strong': hasAppliedFiltersOrActiveFolders,
|
||||||
hasAppliedFiltersOrActiveFolders,
|
'pt-2.5': showV4View,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="flex max-w-[85%] justify-center items-center">
|
<div class="flex max-w-[85%] justify-center items-center">
|
||||||
<h1
|
<h1
|
||||||
class="text-xl font-medium break-words truncate text-black-900 dark:text-slate-100"
|
class="text-lg font-medium break-words truncate text-n-slate-12"
|
||||||
:title="pageTitle"
|
:title="pageTitle"
|
||||||
>
|
>
|
||||||
{{ pageTitle }}
|
{{ pageTitle }}
|
||||||
</h1>
|
</h1>
|
||||||
<span
|
<span
|
||||||
v-if="!hasAppliedFiltersOrActiveFolders"
|
v-if="!hasAppliedFiltersOrActiveFolders"
|
||||||
class="p-1 my-0.5 mx-1 rounded-md capitalize bg-slate-50 dark:bg-slate-800 text-xxs text-slate-600 dark:text-slate-300"
|
class="px-2 py-1 my-0.5 mx-1 rounded-md capitalize bg-n-slate-3 text-xxs text-n-slate-12"
|
||||||
>
|
>
|
||||||
{{ $t(`CHAT_LIST.CHAT_STATUS_FILTER_ITEMS.${activeStatus}.TEXT`) }}
|
{{ $t(`CHAT_LIST.CHAT_STATUS_FILTER_ITEMS.${activeStatus}.TEXT`) }}
|
||||||
</span>
|
</span>
|
||||||
@@ -63,67 +103,82 @@ const hasAppliedFiltersOrActiveFolders = computed(() => {
|
|||||||
<div class="flex items-center gap-1">
|
<div class="flex items-center gap-1">
|
||||||
<template v-if="hasAppliedFilters && !hasActiveFolders">
|
<template v-if="hasAppliedFilters && !hasActiveFolders">
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<woot-button
|
<NextButton
|
||||||
v-tooltip.top-end="$t('FILTER.CUSTOM_VIEWS.ADD.SAVE_BUTTON')"
|
v-tooltip.top-end="$t('FILTER.CUSTOM_VIEWS.ADD.SAVE_BUTTON')"
|
||||||
size="tiny"
|
icon="i-lucide-save"
|
||||||
variant="smooth"
|
slate
|
||||||
color-scheme="secondary"
|
xs
|
||||||
icon="save"
|
faded
|
||||||
@click="emit('addFolders')"
|
@click="emit('addFolders')"
|
||||||
/>
|
/>
|
||||||
<div id="saveFilterTeleportTarget" class="absolute mt-2 z-40" />
|
<div
|
||||||
|
id="saveFilterTeleportTarget"
|
||||||
|
class="absolute z-40 mt-2"
|
||||||
|
:class="{ 'ltr:right-0 rtl:left-0': isOnExpandedLayout }"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<NextButton
|
||||||
<woot-button
|
|
||||||
v-tooltip.top-end="$t('FILTER.CLEAR_BUTTON_LABEL')"
|
v-tooltip.top-end="$t('FILTER.CLEAR_BUTTON_LABEL')"
|
||||||
size="tiny"
|
icon="i-lucide-circle-x"
|
||||||
variant="smooth"
|
ruby
|
||||||
color-scheme="alert"
|
faded
|
||||||
icon="dismiss-circle"
|
xs
|
||||||
@click="emit('resetFilters')"
|
@click="emit('resetFilters')"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="hasActiveFolders">
|
<template v-if="hasActiveFolders">
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<woot-button
|
<NextButton
|
||||||
id="toggleConversationFilterButton"
|
id="toggleConversationFilterButton"
|
||||||
v-tooltip.top-end="$t('FILTER.CUSTOM_VIEWS.EDIT.EDIT_BUTTON')"
|
v-tooltip.top-end="$t('FILTER.CUSTOM_VIEWS.EDIT.EDIT_BUTTON')"
|
||||||
size="tiny"
|
icon="i-lucide-pen-line"
|
||||||
variant="smooth"
|
slate
|
||||||
color-scheme="secondary"
|
xs
|
||||||
icon="edit"
|
faded
|
||||||
@click="emit('filtersModal')"
|
@click="emit('filtersModal')"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
id="conversationFilterTeleportTarget"
|
id="conversationFilterTeleportTarget"
|
||||||
class="absolute mt-2 z-40"
|
class="absolute z-40 mt-2"
|
||||||
|
:class="{ 'ltr:right-0 rtl:left-0': isOnExpandedLayout }"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<woot-button
|
<NextButton
|
||||||
|
id="toggleConversationFilterButton"
|
||||||
v-tooltip.top-end="$t('FILTER.CUSTOM_VIEWS.DELETE.DELETE_BUTTON')"
|
v-tooltip.top-end="$t('FILTER.CUSTOM_VIEWS.DELETE.DELETE_BUTTON')"
|
||||||
size="tiny"
|
icon="i-lucide-trash-2"
|
||||||
variant="smooth"
|
ruby
|
||||||
color-scheme="alert"
|
xs
|
||||||
icon="delete"
|
faded
|
||||||
@click="emit('deleteFolders')"
|
@click="emit('deleteFolders')"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<div v-else class="relative">
|
<div v-else class="relative">
|
||||||
<woot-button
|
<NextButton
|
||||||
id="toggleConversationFilterButton"
|
id="toggleConversationFilterButton"
|
||||||
v-tooltip.right="$t('FILTER.TOOLTIP_LABEL')"
|
v-tooltip.right="$t('FILTER.TOOLTIP_LABEL')"
|
||||||
variant="smooth"
|
icon="i-lucide-list-filter"
|
||||||
color-scheme="secondary"
|
slate
|
||||||
icon="filter"
|
xs
|
||||||
size="tiny"
|
faded
|
||||||
@click="emit('filtersModal')"
|
@click="emit('filtersModal')"
|
||||||
/>
|
/>
|
||||||
<div id="conversationFilterTeleportTarget" class="absolute mt-2 z-40" />
|
<div
|
||||||
|
id="conversationFilterTeleportTarget"
|
||||||
|
class="absolute z-40 mt-2"
|
||||||
|
:class="{ 'ltr:right-0 rtl:left-0': isOnExpandedLayout }"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<ConversationBasicFilter
|
<ConversationBasicFilter
|
||||||
v-if="!hasAppliedFiltersOrActiveFolders"
|
v-if="!hasAppliedFiltersOrActiveFolders"
|
||||||
|
:is-on-expanded-layout="isOnExpandedLayout"
|
||||||
@change-filter="onBasicFilterChange"
|
@change-filter="onBasicFilterChange"
|
||||||
/>
|
/>
|
||||||
|
<SwitchLayout
|
||||||
|
v-if="showV4View"
|
||||||
|
:is-on-expanded-layout="isOnExpandedLayout"
|
||||||
|
@toggle="toggleConversationLayout"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ const props = defineProps({
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
|
isCompact: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(['change']);
|
const emit = defineEmits(['change']);
|
||||||
@@ -59,7 +63,10 @@ onMounted(() => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
:class="{ 'tabs--container--with-border': border }"
|
:class="{
|
||||||
|
'tabs--container--with-border': border,
|
||||||
|
'tabs--container--compact': isCompact,
|
||||||
|
}"
|
||||||
class="tabs--container"
|
class="tabs--container"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import wootConstants from 'dashboard/constants/globals';
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import FilterItem from './FilterItem.vue';
|
import FilterItem from './FilterItem.vue';
|
||||||
import { useUISettings } from 'dashboard/composables/useUISettings';
|
import { useUISettings } from 'dashboard/composables/useUISettings';
|
||||||
|
import NextButton from 'dashboard/components-next/button/Button.vue';
|
||||||
|
|
||||||
const CHAT_STATUS_FILTER_ITEMS = Object.freeze([
|
const CHAT_STATUS_FILTER_ITEMS = Object.freeze([
|
||||||
'open',
|
'open',
|
||||||
@@ -26,6 +27,13 @@ const SORT_ORDER_ITEMS = Object.freeze([
|
|||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
FilterItem,
|
FilterItem,
|
||||||
|
NextButton,
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
isOnExpandedLayout: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
emits: ['changeFilter'],
|
emits: ['changeFilter'],
|
||||||
setup() {
|
setup() {
|
||||||
@@ -85,22 +93,25 @@ export default {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="relative flex">
|
<div class="relative flex">
|
||||||
<woot-button
|
<NextButton
|
||||||
v-tooltip.right="$t('CHAT_LIST.SORT_TOOLTIP_LABEL')"
|
v-tooltip.right="$t('CHAT_LIST.SORT_TOOLTIP_LABEL')"
|
||||||
variant="smooth"
|
icon="i-lucide-arrow-up-down"
|
||||||
size="tiny"
|
slate
|
||||||
color-scheme="secondary"
|
faded
|
||||||
class="selector-button"
|
xs
|
||||||
icon="sort-icon"
|
|
||||||
@click="toggleDropdown"
|
@click="toggleDropdown"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
v-if="showActionsDropdown"
|
v-if="showActionsDropdown"
|
||||||
v-on-clickaway="closeDropdown"
|
v-on-clickaway="closeDropdown"
|
||||||
class="right-0 mt-1 dropdown-pane dropdown-pane--open basic-filter"
|
class="mt-1 dropdown-pane dropdown-pane--open !w-52 !p-4 top-6 border !border-n-weak dark:!border-n-weak !bg-n-alpha-3 dark:!bg-n-alpha-3 backdrop-blur-[100px]"
|
||||||
|
:class="{
|
||||||
|
'ltr:left-0 rtl:right-0': !isOnExpandedLayout,
|
||||||
|
'ltr:right-0 rtl:left-0': isOnExpandedLayout,
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
<div class="flex items-center justify-between last:mt-4">
|
<div class="flex items-center justify-between last:mt-4">
|
||||||
<span class="text-xs font-medium text-slate-800 dark:text-slate-100">{{
|
<span class="text-xs font-medium text-n-slate-12">{{
|
||||||
$t('CHAT_LIST.CHAT_SORT.STATUS')
|
$t('CHAT_LIST.CHAT_SORT.STATUS')
|
||||||
}}</span>
|
}}</span>
|
||||||
<FilterItem
|
<FilterItem
|
||||||
@@ -112,7 +123,7 @@ export default {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center justify-between last:mt-4">
|
<div class="flex items-center justify-between last:mt-4">
|
||||||
<span class="text-xs font-medium text-slate-800 dark:text-slate-100">{{
|
<span class="text-xs font-medium text-n-slate-12">{{
|
||||||
$t('CHAT_LIST.CHAT_SORT.ORDER_BY')
|
$t('CHAT_LIST.CHAT_SORT.ORDER_BY')
|
||||||
}}</span>
|
}}</span>
|
||||||
<FilterItem
|
<FilterItem
|
||||||
@@ -126,9 +137,3 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.basic-filter {
|
|
||||||
@apply w-52 p-4 top-6;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export default {
|
|||||||
<template>
|
<template>
|
||||||
<select
|
<select
|
||||||
v-model="activeValue"
|
v-model="activeValue"
|
||||||
class="bg-slate-25 dark:bg-slate-700 text-xs h-6 my-0 mx-1 py-0 pr-6 pl-2 w-32 border border-solid border-slate-75 dark:border-slate-600 text-slate-800 dark:text-slate-100"
|
class="w-32 h-6 py-0 pl-2 pr-6 mx-1 my-0 text-xs border border-solid bg-n-slate-3 dark:bg-n-solid-3 border-n-weak dark:border-n-weak text-n-slate-12"
|
||||||
@change="onTabChange()"
|
@change="onTabChange()"
|
||||||
>
|
>
|
||||||
<option v-for="value in items" :key="value" :value="value">
|
<option v-for="value in items" :key="value" :value="value">
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { useUISettings } from 'dashboard/composables/useUISettings';
|
import { useUISettings } from 'dashboard/composables/useUISettings';
|
||||||
|
import { useAccount } from 'dashboard/composables/useAccount';
|
||||||
import ChatList from '../../../components/ChatList.vue';
|
import ChatList from '../../../components/ChatList.vue';
|
||||||
import ConversationBox from '../../../components/widgets/conversation/ConversationBox.vue';
|
import ConversationBox from '../../../components/widgets/conversation/ConversationBox.vue';
|
||||||
import PopOverSearch from './search/PopOverSearch.vue';
|
import PopOverSearch from './search/PopOverSearch.vue';
|
||||||
@@ -8,6 +9,7 @@ import wootConstants from 'dashboard/constants/globals';
|
|||||||
import { BUS_EVENTS } from 'shared/constants/busEvents';
|
import { BUS_EVENTS } from 'shared/constants/busEvents';
|
||||||
import CmdBarConversationSnooze from 'dashboard/routes/dashboard/commands/CmdBarConversationSnooze.vue';
|
import CmdBarConversationSnooze from 'dashboard/routes/dashboard/commands/CmdBarConversationSnooze.vue';
|
||||||
import { emitter } from 'shared/helpers/mitt';
|
import { emitter } from 'shared/helpers/mitt';
|
||||||
|
import { FEATURE_FLAGS } from 'dashboard/featureFlags';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -52,10 +54,12 @@ export default {
|
|||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const { uiSettings, updateUISettings } = useUISettings();
|
const { uiSettings, updateUISettings } = useUISettings();
|
||||||
|
const { accountId } = useAccount();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
uiSettings,
|
uiSettings,
|
||||||
updateUISettings,
|
updateUISettings,
|
||||||
|
accountId,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -67,6 +71,7 @@ export default {
|
|||||||
...mapGetters({
|
...mapGetters({
|
||||||
chatList: 'getAllConversations',
|
chatList: 'getAllConversations',
|
||||||
currentChat: 'getSelectedChat',
|
currentChat: 'getSelectedChat',
|
||||||
|
isFeatureEnabledonAccount: 'accounts/isFeatureEnabledonAccount',
|
||||||
}),
|
}),
|
||||||
showConversationList() {
|
showConversationList() {
|
||||||
return this.isOnExpandedLayout ? !this.conversationId : true;
|
return this.isOnExpandedLayout ? !this.conversationId : true;
|
||||||
@@ -90,6 +95,12 @@ export default {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
showPopOverSearch() {
|
||||||
|
return !this.isFeatureEnabledonAccount(
|
||||||
|
this.accountId,
|
||||||
|
FEATURE_FLAGS.CHATWOOT_V4
|
||||||
|
);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
conversationId() {
|
conversationId() {
|
||||||
@@ -205,6 +216,7 @@ export default {
|
|||||||
@conversation-load="onConversationLoad"
|
@conversation-load="onConversationLoad"
|
||||||
>
|
>
|
||||||
<PopOverSearch
|
<PopOverSearch
|
||||||
|
v-if="showPopOverSearch"
|
||||||
:is-on-expanded-layout="isOnExpandedLayout"
|
:is-on-expanded-layout="isOnExpandedLayout"
|
||||||
@toggle-conversation-layout="toggleConversationLayout"
|
@toggle-conversation-layout="toggleConversationLayout"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -34,25 +34,25 @@ export default {
|
|||||||
<template>
|
<template>
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<div
|
<div
|
||||||
class="flex px-4 pb-1 flex-row gap-1 pt-2.5 border-b border-transparent"
|
class="flex px-4 pb-1 justify-between items-center flex-row gap-1 pt-2.5 border-b border-transparent"
|
||||||
>
|
>
|
||||||
<woot-sidemenu-icon
|
<woot-sidemenu-icon
|
||||||
size="tiny"
|
size="tiny"
|
||||||
class="relative top-0 ltr:-ml-1.5 rtl:-mr-1.5"
|
class="relative top-0 ltr:-ml-1.5 rtl:-mr-1.5 flex-shrink-0 focus:!bg-n-solid-3 dark:!hover:bg-n-solid-2 hover:!bg-n-alpha-2"
|
||||||
/>
|
/>
|
||||||
<router-link
|
<router-link
|
||||||
:to="searchUrl"
|
:to="searchUrl"
|
||||||
class="inline-flex items-center flex-1 h-6 gap-1 px-2 py-0 text-left rounded-md search-link rtl:mr-3 rtl:text-right bg-slate-25 dark:bg-slate-800"
|
class="inline-flex items-center flex-1 h-6 min-w-0 gap-1 px-2 py-0 text-left rounded-md rtl:mr-2.5 search-link rtl:text-right bg-n-slate-9/10 hover:bg-n-slate-3"
|
||||||
>
|
>
|
||||||
<div class="flex">
|
<div class="flex flex-shrink-0">
|
||||||
<fluent-icon
|
<fluent-icon
|
||||||
icon="search"
|
icon="search"
|
||||||
class="search--icon text-slate-800 dark:text-slate-200"
|
class="search--icon text-n-slate-11"
|
||||||
size="16"
|
size="16"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<p
|
<p
|
||||||
class="mb-0 overflow-hidden text-sm search--label whitespace-nowrap text-ellipsis text-slate-800 dark:text-slate-200"
|
class="mb-0 overflow-hidden text-sm search--label whitespace-nowrap text-ellipsis text-n-slate-11"
|
||||||
>
|
>
|
||||||
{{ $t('CONVERSATION.SEARCH_MESSAGES') }}
|
{{ $t('CONVERSATION.SEARCH_MESSAGES') }}
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
<script>
|
<script>
|
||||||
|
import NextButton from 'dashboard/components-next/button/Button.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
NextButton,
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
isOnExpandedLayout: {
|
isOnExpandedLayout: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@@ -16,22 +21,17 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<woot-button
|
<NextButton
|
||||||
v-tooltip.left="$t('CONVERSATION.SWITCH_VIEW_LAYOUT')"
|
v-tooltip.left="$t('CONVERSATION.SWITCH_VIEW_LAYOUT')"
|
||||||
icon="arrow-right-import"
|
:icon="
|
||||||
size="tiny"
|
isOnExpandedLayout
|
||||||
variant="smooth"
|
? 'i-lucide-arrow-left-to-line'
|
||||||
color-scheme="secondary"
|
: 'i-lucide-arrow-right-to-line'
|
||||||
class="layout-switch__container"
|
"
|
||||||
:class="{ expanded: isOnExpandedLayout }"
|
slate
|
||||||
|
xs
|
||||||
|
faded
|
||||||
|
class="flex-shrink-0 rtl:rotate-180 ltr:rotate-0"
|
||||||
@click="toggle"
|
@click="toggle"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" soped>
|
|
||||||
.layout-switch__container {
|
|
||||||
&.expanded .icon {
|
|
||||||
transform: rotate(180deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user