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/
67 lines
1.3 KiB
Vue
67 lines
1.3 KiB
Vue
<script>
|
|
export default {
|
|
props: {
|
|
label: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
placeholder: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
modelValue: {
|
|
type: [String, Number],
|
|
required: true,
|
|
},
|
|
error: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
},
|
|
emits: ['update:modelValue'],
|
|
computed: {
|
|
computedModel: {
|
|
get() {
|
|
return this.modelValue;
|
|
},
|
|
set(value) {
|
|
this.$emit('update:modelValue', value);
|
|
},
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<template>
|
|
<label class="block">
|
|
<div
|
|
v-if="label"
|
|
class="mb-2 text-xs font-medium"
|
|
:class="{
|
|
'text-n-gray-12': !error,
|
|
'text-n-ruby-9': error,
|
|
}"
|
|
>
|
|
{{ label }}
|
|
</div>
|
|
<textarea
|
|
v-model="computedModel"
|
|
class="w-full px-3 py-2 leading-tight border rounded outline-none resize-none text-n-gray-12"
|
|
:class="{
|
|
'border-n-weak hover:border-n-weak focus:border-n-weak': !error,
|
|
'border-n-ruby-9 hover:border-n-ruby-9 focus:border-n-ruby-9': error,
|
|
}"
|
|
:placeholder="placeholder"
|
|
/>
|
|
<div v-if="error" class="mt-2 text-xs font-medium text-n-ruby-9">
|
|
{{ error }}
|
|
</div>
|
|
</label>
|
|
</template>
|
|
|
|
<style lang="scss" scoped>
|
|
textarea {
|
|
min-height: 8rem;
|
|
}
|
|
</style>
|