mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
* 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
66 lines
1.3 KiB
JavaScript
66 lines
1.3 KiB
JavaScript
/* eslint-disable import/no-extraneous-dependencies */
|
|
import { configure } from '@storybook/vue';
|
|
import './margin.css';
|
|
import '../../src/assets/scss/index.scss';
|
|
|
|
import '../../src/assets/scss/sprites.scss';
|
|
|
|
import Vue from 'vue';
|
|
import BootstrapVue from 'bootstrap-vue';
|
|
import StoreModule from '@/libs/store';
|
|
import getStore from '@/store';
|
|
import '../../src/filters/registerGlobals';
|
|
|
|
import i18n from '../../../common/script/i18n';
|
|
|
|
// couldn't inject the languages easily,
|
|
// so just a "$t()" string to show that this will be translated
|
|
i18n.t = function translateString (...args) {
|
|
return `$t(${JSON.stringify(args)})`;
|
|
};
|
|
Vue.prototype.$t = i18n.t;
|
|
|
|
Vue.use(BootstrapVue);
|
|
Vue.use(StoreModule);
|
|
|
|
const store = getStore();
|
|
store.state.user.data = {
|
|
stats: {},
|
|
tags: [],
|
|
items: {
|
|
quests: {
|
|
moon1: 3,
|
|
},
|
|
},
|
|
party: {
|
|
quest: {
|
|
|
|
},
|
|
},
|
|
preferences: {
|
|
|
|
},
|
|
auth: {
|
|
local: {
|
|
// email: 'example@example.com',
|
|
},
|
|
facebook: {
|
|
emails: [
|
|
{
|
|
value: 'test@test.de',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
};
|
|
|
|
Vue.prototype.$store = store;
|
|
|
|
const req = require.context('../../src', true, /.stories.js$/);
|
|
|
|
function loadStories () {
|
|
req.keys().forEach(filename => req(filename));
|
|
}
|
|
|
|
configure(loadStories, module);
|