Files
habitica/website/client/src/components/bug-report-modal.stories.js
T
negue a1cddcaf17 Feature: new "report a bug" modal (#13530)
* WIP: report a bug api/ui

* fix lint

* add USER_USERNAME

* extend sendTxn tests / checks + fix bug report email

* fix lint

* add more checks to sendTxn - fix bug-report variables

* fix lint / ci

* fix test: reset email config url

* fix test stub

* fix tests

* refactor the variables checks

* lint.

* move bug-report page as a modal

* send user_email to the email

* show true/false instead 1/0

* fix issues

* fix footer report bug email if not logged in

* fix styles/margins

* prefill user's email

* show facebook email if local email not existing

* bugReportSuccessModal.vue

* add BROWSER_UA to mail properties

* extract bugReportLogic to its own lib file for unit test

* test api validators

* fix lint
2021-12-14 19:16:50 -06:00

44 lines
1.0 KiB
JavaScript

/* eslint-disable import/no-extraneous-dependencies */
import { storiesOf } from '@storybook/vue';
import { withKnobs } from '@storybook/addon-knobs';
import bugReportModal from '@/components/bugReportModal';
import bugReportSuccessModal from '@/components/bugReportSuccessModal';
const stories = storiesOf('Bug Report Modal', module);
stories.addDecorator(withKnobs);
stories
.add('bugReportModal', () => ({
components: { bugReportModal },
data () {
return {
};
},
template: `
<div>
<bug-report-modal></bug-report-modal>
</div>
`,
mounted () {
this.$root.$emit('bv::show::modal', 'bug-report-modal');
},
}))
.add('bugReportSuccessModal', () => ({
components: { bugReportSuccessModal },
data () {
return {
};
},
template: `
<div>
<bug-report-success-modal></bug-report-success-modal>
</div>
`,
mounted () {
this.$root.$emit('bv::show::modal', 'bug-report-success-modal');
},
}));