mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-07 22:43:19 +00:00
- Simplify message builder content_attributes handling - Remove AI captain integration from incoming call service - Clean up FloatingCallWidget by removing non-essential features: - Remove Gravatar/MD5 dependency - Remove keypad/DTMF functionality - Remove fullscreen toggle - Simplify avatar handling - Apply consistent code formatting across voice components - Remove debug logging and unused code 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
97 lines
1.8 KiB
Vue
97 lines
1.8 KiB
Vue
<script>
|
|
export default {
|
|
props: {
|
|
icon: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
icons: {
|
|
type: Object,
|
|
required: true,
|
|
},
|
|
size: {
|
|
type: [String, Number],
|
|
default: '20',
|
|
},
|
|
type: {
|
|
type: String,
|
|
default: 'outline',
|
|
},
|
|
viewBox: {
|
|
type: String,
|
|
default: '0 0 24 24',
|
|
},
|
|
iconLib: {
|
|
type: String,
|
|
default: 'fluent',
|
|
},
|
|
},
|
|
|
|
computed: {
|
|
pathSource() {
|
|
// To support icons with multiple paths
|
|
const key = `${this.icon}-${this.type}`;
|
|
const path = this.icons[key];
|
|
|
|
// If not found, try default icon
|
|
if (path === undefined) {
|
|
const defaultKey = `call-${this.type}`;
|
|
const defaultPath = this.icons[defaultKey];
|
|
|
|
// If default icon also not found, return empty array to prevent errors
|
|
if (defaultPath === undefined) {
|
|
return [];
|
|
}
|
|
|
|
if (Array.isArray(defaultPath)) {
|
|
return defaultPath;
|
|
}
|
|
|
|
return [defaultPath];
|
|
}
|
|
|
|
if (Array.isArray(path)) {
|
|
return path;
|
|
}
|
|
|
|
return [path];
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<template>
|
|
<svg
|
|
v-if="iconLib === 'fluent'"
|
|
:width="size"
|
|
:height="size"
|
|
fill="none"
|
|
:viewBox="viewBox"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
>
|
|
<path
|
|
v-for="source in pathSource"
|
|
:key="source"
|
|
:d="source"
|
|
fill="currentColor"
|
|
/>
|
|
</svg>
|
|
<svg
|
|
v-else
|
|
:width="size"
|
|
:height="size"
|
|
fill="none"
|
|
:viewBox="viewBox"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
>
|
|
<g v-for="(pathData, index) in pathSource" :key="index">
|
|
<path
|
|
:key="pathData"
|
|
:d="pathData"
|
|
stroke="currentColor"
|
|
stroke-width="1.66667"
|
|
/>
|
|
</g>
|
|
</svg>
|
|
</template>
|