Files
gochat/frontend/app/views/mailers/conversation_reply_mailer/conversation_transcript.html.erb
T
rogee 321c61aaae Vendor Chatwoot Vue 3 frontend into frontend/
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/
2026-07-07 14:56:01 +08:00

51 lines
2.1 KiB
ERB

<% @messages.each do |message| %>
<tr>
<td>
<b><%= message.sender&.try(:available_name) || message.sender&.name || '' %></b>
<% if message.conversation.inbox&.inbox_type == 'Email' %>
<div style="font-size: 90%; color: #899096; line-height: 16px">
<% if message.content_attributes.dig(:email, :from).present? %>
<div>From: <%= message.content_attributes.dig(:email, :from).join(", ") %></div>
<% else %>
<div>From: <%= message.sender&.try(:email) %></div>
<% end %>
<% if message.content_attributes.dig(:email, :subject).present? %>
<div>Subject: <%= message.content_attributes.dig(:email, :subject) %></div>
<% end %>
<% if message.content_attributes[:to_emails].present? %>
<div>To: <%= message.content_attributes[:to_emails].join(", ") %></div>
<% end %>
<% if message.content_attributes[:cc_emails].present? %>
<div>CC: <%= message.content_attributes[:cc_emails].join(", ") %></div>
<% end %>
<% if message.content_attributes[:bcc_emails].present? %>
<div>BCC: <%= message.content_attributes[:bcc_emails].join(", ") %></div>
<% end %>
</div>
<% end %>
</td>
</tr>
<tr>
<td style="padding-bottom: 32px;">
<% if message.content %>
<%= ChatwootMarkdownRenderer.new(message.content).render_message %>
<% end %>
<% if message.attachments.present? %>
<p>Attachments:</p>
<% message.attachments.each do |attachment| %>
<p><a href="<%= attachment.file_url %>" target="_blank"><%= attachment.file.filename.to_s %></a></p>
<% end %>
<% end %>
<p style="font-size: 90%; font-size: 90%;color: #899096;margin-top: -8px; margin-bottom: 0px;">
<% if @inbox.timezone.present? %>
<%= message.created_at.in_time_zone(@inbox.timezone).strftime('%b %d, %I:%M %p %Z') %>
<% else %>
<%= message.created_at.strftime('%b %d, %I:%M %p %Z') %>
<% end %>
</p>
</td>
</tr>
<% end %>