Copy the Chatwoot (v4.14.0) frontend runnable subset into frontend/ for customization: - app/javascript/ (Vue SPA: dashboard, widget, sdk, portal, superadmin) - app/views/ (ERB templates for vite-plugin-ruby entrypoint resolution) - app/helpers/, app/assets/ (Rails view helpers, static assets) - enterprise/ (Enterprise edition frontend overlay) - config/vite.json, vite.config.ts, bin/vite (Vite-Rails toolchain) - package.json, pnpm-lock.yaml, tailwind/postcss/eslint configs - Gemfile, Gemfile.lock (vite_rails gem for bin/vite binstub) Excluded Rails backend: controllers, models, services, jobs, mailers, policies, db, lib, spec, public, node_modules. Update references to the new frontend location: - .gitignore: exclude frontend build artifacts (node_modules, tmp, packs), keep frontend/bin/ and frontend/vendor/ via negation - backend/scripts/parity_frontend_smoke.sh: CHATWOOT_DIR default reference/chatwoot -> ../frontend - backend/scripts/parity_frontend_browser_smoke.mjs: same default update - AGENTS.md: add frontend section with Rails/Vite coupling notes - README: architecture tree includes frontend/
46 lines
1.1 KiB
Vue
46 lines
1.1 KiB
Vue
<script setup>
|
|
import { computed } from 'vue';
|
|
import Icon from 'next/icon/Icon.vue';
|
|
import ChannelIcon from 'next/icon/ChannelIcon.vue';
|
|
import SidebarUnreadBadge from './SidebarUnreadBadge.vue';
|
|
|
|
const props = defineProps({
|
|
label: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
// eslint-disable-next-line vue/no-unused-properties
|
|
active: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
inbox: {
|
|
type: Object,
|
|
required: true,
|
|
},
|
|
badgeCount: {
|
|
type: [Number, String],
|
|
default: 0,
|
|
},
|
|
});
|
|
|
|
const reauthorizationRequired = computed(() => {
|
|
return props.inbox.reauthorization_required;
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<span class="size-4 grid place-content-center rounded-full">
|
|
<ChannelIcon :inbox="inbox" class="size-4" />
|
|
</span>
|
|
<div class="flex-1 truncate min-w-0">{{ label }}</div>
|
|
<SidebarUnreadBadge :count="badgeCount" />
|
|
<div
|
|
v-if="reauthorizationRequired"
|
|
v-tooltip.top-end="$t('SIDEBAR.REAUTHORIZE')"
|
|
class="grid place-content-center size-5 bg-n-ruby-5/60 rounded-full"
|
|
>
|
|
<Icon icon="i-woot-alert" class="size-3 text-n-ruby-9" />
|
|
</div>
|
|
</template>
|