feat: update colors for v4 (#10660)
Porting changes from https://github.com/chatwoot/chatwoot/pull/10552 --------- Co-authored-by: Pranav <pranav@chatwoot.com> Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Co-authored-by: Vishnu Narayanan <vishnu@chatwoot.com> Co-authored-by: Sojan <sojan@pepalo.com> Co-authored-by: iamsivin <iamsivin@gmail.com> Co-authored-by: Pranav <pranavrajs@gmail.com>
This commit is contained in:
@@ -1,69 +1,65 @@
|
||||
<script>
|
||||
<script setup>
|
||||
import { frontendURL } from 'dashboard/helper/URLHelper';
|
||||
export default {
|
||||
props: {
|
||||
id: {
|
||||
type: [String, Number],
|
||||
default: 0,
|
||||
},
|
||||
email: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
phone: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
thumbnail: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
accountId: {
|
||||
type: [String, Number],
|
||||
default: 0,
|
||||
},
|
||||
import { computed } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
id: {
|
||||
type: [String, Number],
|
||||
default: 0,
|
||||
},
|
||||
computed: {
|
||||
navigateTo() {
|
||||
return frontendURL(`accounts/${this.accountId}/contacts/${this.id}`);
|
||||
},
|
||||
email: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
};
|
||||
phone: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
thumbnail: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
accountId: {
|
||||
type: [String, Number],
|
||||
default: 0,
|
||||
},
|
||||
});
|
||||
|
||||
const navigateTo = computed(() => {
|
||||
return frontendURL(`accounts/${props.accountId}/contacts/${props.id}`);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<router-link :to="navigateTo" class="contact-item">
|
||||
<router-link
|
||||
:to="navigateTo"
|
||||
class="flex items-center p-2 rounded-md cursor-pointer hover:bg-n-slate-3 dark:hover:bg-n-solid-3"
|
||||
>
|
||||
<woot-thumbnail :src="thumbnail" :username="name" size="24px" />
|
||||
<div class="ml-2 rtl:mr-2 rtl:ml-0">
|
||||
<h5 class="text-sm name text-slate-800 dark:text-slate-200">
|
||||
<h5 class="text-sm name text-n-slate-12 dark:text-n-slate-12">
|
||||
{{ name }}
|
||||
</h5>
|
||||
<p
|
||||
class="m-0 text-slate-600 dark:text-slate-200 gap-1 text-sm flex items-center"
|
||||
class="flex items-center gap-1 m-0 text-sm text-slate-600 dark:text-slate-200"
|
||||
>
|
||||
<span v-if="email" class="email text-slate-800 dark:text-slate-200">{{
|
||||
<span v-if="email" class="email text-n-slate-12 dark:text-n-slate-12">{{
|
||||
email
|
||||
}}</span>
|
||||
<span v-if="phone" class="separator text-slate-700 dark:text-slate-200">
|
||||
<span
|
||||
v-if="phone"
|
||||
class="separator text-n-slate-10 dark:text-n-slate-10"
|
||||
>
|
||||
•
|
||||
</span>
|
||||
<span v-if="phone" class="phone text-slate-800 dark:text-slate-200">
|
||||
<span v-if="phone" class="phone text-n-slate-12 dark:text-n-slate-12">
|
||||
{{ phone }}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</router-link>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.contact-item {
|
||||
@apply cursor-pointer flex items-center p-2 rounded-sm hover:bg-slate-25 dark:hover:bg-slate-800;
|
||||
}
|
||||
.contact-details {
|
||||
@apply ml-2 rtl:mr-2 rtl:ml-0;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user