fix: Update the suspended page to show the chat bubble (#9604)
- This PR updates the implementation of chat bubble on suspended account.
This commit is contained in:
@@ -1,24 +1,30 @@
|
|||||||
|
<script setup>
|
||||||
|
import EmptyState from 'dashboard/components/widgets/EmptyState.vue';
|
||||||
|
import { onMounted } from 'vue';
|
||||||
|
|
||||||
|
const toggleSupportWidgetVisibility = () => {
|
||||||
|
if (window.$chatwoot) {
|
||||||
|
window.$chatwoot.toggleBubbleVisibility('show');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const setupListenerForWidgetEvent = () => {
|
||||||
|
window.addEventListener('chatwoot:on-message', () => {
|
||||||
|
toggleSupportWidgetVisibility();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
toggleSupportWidgetVisibility();
|
||||||
|
setupListenerForWidgetEvent();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="suspended-page">
|
<div class="items-center bg-slate-50 flex justify-center h-full w-full">
|
||||||
<empty-state
|
<empty-state
|
||||||
:title="$t('APP_GLOBAL.ACCOUNT_SUSPENDED.TITLE')"
|
:title="$t('APP_GLOBAL.ACCOUNT_SUSPENDED.TITLE')"
|
||||||
:message="$t('APP_GLOBAL.ACCOUNT_SUSPENDED.MESSAGE')"
|
:message="$t('APP_GLOBAL.ACCOUNT_SUSPENDED.MESSAGE')"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
|
||||||
import EmptyState from 'dashboard/components/widgets/EmptyState.vue';
|
|
||||||
export default {
|
|
||||||
components: { EmptyState },
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
.suspended-page {
|
|
||||||
align-items: center;
|
|
||||||
background: var(--s-50);
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
height: 100%;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user