mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 03:27:52 +00:00
To test this, set the `useNextBubble` value to `true` in the
localstorage. Here's a quick command to run in the console
```js
localStorage.setItem('useNextBubble', true)
```
```js
localStorage.setItem('useNextBubble', false)
```
---------
Co-authored-by: Pranav <pranavrajs@gmail.com>
42 lines
1016 B
Vue
42 lines
1016 B
Vue
<script setup>
|
|
import { computed } from 'vue';
|
|
import BaseAttachmentBubble from './BaseAttachment.vue';
|
|
import { useI18n } from 'vue-i18n';
|
|
import { useMessageContext } from '../provider.js';
|
|
|
|
const { attachments } = useMessageContext();
|
|
const { t } = useI18n();
|
|
|
|
const attachment = computed(() => {
|
|
return attachments.value[0];
|
|
});
|
|
|
|
const lat = computed(() => {
|
|
return attachment.value.coordinatesLat;
|
|
});
|
|
const long = computed(() => {
|
|
return attachment.value.coordinatesLong;
|
|
});
|
|
|
|
const title = computed(() => {
|
|
return attachment.value.fallbackTitle ?? attachment.value.fallback_title;
|
|
});
|
|
|
|
const mapUrl = computed(
|
|
() => `https://maps.google.com/?q=${lat.value},${long.value}`
|
|
);
|
|
</script>
|
|
|
|
<template>
|
|
<BaseAttachmentBubble
|
|
icon="i-ph-navigation-arrow-fill"
|
|
icon-bg-color="bg-[#0D9B8A]"
|
|
sender-translation-key="CONVERSATION.SHARED_ATTACHMENT.LOCATION"
|
|
:content="title"
|
|
:action="{
|
|
label: t('COMPONENTS.LOCATION_BUBBLE.SEE_ON_MAP'),
|
|
href: mapUrl,
|
|
}"
|
|
/>
|
|
</template>
|