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/
59 lines
1.3 KiB
Vue
59 lines
1.3 KiB
Vue
<script setup>
|
|
import { computed } from 'vue';
|
|
|
|
import Icon from 'dashboard/components-next/icon/Icon.vue';
|
|
|
|
const props = defineProps({
|
|
title: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
empty: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
query: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
showTitle: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
isFetching: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
});
|
|
|
|
const titleCase = computed(() => props.title.toLowerCase());
|
|
</script>
|
|
|
|
<template>
|
|
<section class="mx-0 mb-3">
|
|
<div
|
|
v-if="showTitle"
|
|
class="sticky top-0 pt-2 py-3 z-20 bg-gradient-to-b from-n-surface-1 from-80% to-transparent mb-3 -mx-1.5 px-1.5"
|
|
>
|
|
<h3 class="text-sm text-n-slate-11">{{ title }}</h3>
|
|
</div>
|
|
<slot />
|
|
<woot-loading-state
|
|
v-if="isFetching"
|
|
:message="empty ? $t('SEARCH.SEARCHING_DATA') : $t('SEARCH.LOADING_DATA')"
|
|
/>
|
|
<div
|
|
v-if="empty && !isFetching"
|
|
class="flex items-start justify-center px-4 py-6 rounded-xl bg-n-slate-2 dark:bg-n-solid-1"
|
|
>
|
|
<Icon
|
|
icon="i-lucide-info"
|
|
class="text-n-slate-11 size-4 flex-shrink-0 mt-[3px]"
|
|
/>
|
|
<p class="mx-2 my-0 text-center text-n-slate-11">
|
|
{{ $t('SEARCH.EMPTY_STATE', { item: titleCase, query }) }}
|
|
</p>
|
|
</div>
|
|
</section>
|
|
</template>
|