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/
66 lines
1.4 KiB
Vue
66 lines
1.4 KiB
Vue
<script>
|
|
import Modal from '../../Modal.vue';
|
|
import NextButton from 'dashboard/components-next/button/Button.vue';
|
|
|
|
export default {
|
|
components: {
|
|
Modal,
|
|
NextButton,
|
|
},
|
|
props: {
|
|
title: {
|
|
type: String,
|
|
default: 'This is a title',
|
|
},
|
|
description: {
|
|
type: String,
|
|
default: 'This is your description',
|
|
},
|
|
confirmLabel: {
|
|
type: String,
|
|
default: 'Yes',
|
|
},
|
|
cancelLabel: {
|
|
type: String,
|
|
default: 'No',
|
|
},
|
|
},
|
|
data: () => ({
|
|
show: false,
|
|
resolvePromise: undefined,
|
|
rejectPromise: undefined,
|
|
}),
|
|
|
|
methods: {
|
|
showConfirmation() {
|
|
this.show = true;
|
|
return new Promise((resolve, reject) => {
|
|
this.resolvePromise = resolve;
|
|
this.rejectPromise = reject;
|
|
});
|
|
},
|
|
confirm() {
|
|
this.resolvePromise(true);
|
|
this.show = false;
|
|
},
|
|
|
|
cancel() {
|
|
this.resolvePromise(false);
|
|
this.show = false;
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<template>
|
|
<Modal v-model:show="show" :on-close="cancel">
|
|
<div class="h-auto overflow-auto flex flex-col">
|
|
<woot-modal-header :header-title="title" :header-content="description" />
|
|
<div class="flex flex-row justify-end gap-2 py-4 px-6 w-full">
|
|
<NextButton faded type="reset" :label="cancelLabel" @click="cancel" />
|
|
<NextButton type="submit" :label="confirmLabel" @click="confirm" />
|
|
</div>
|
|
</div>
|
|
</Modal>
|
|
</template>
|