New client misc with some more misc (#8929)

* Added markdown

* Added styles and option for debug menu

* Added sm icons

* Began styling autocomplete

* Added autocomplete styles

* Added more challenge categories

* Updated challenge participants modal

* Fixed challenge list updating without reload

* Added close and delete challenge

* Fixed form placeholder, adjusted desc style and fixed create button style

* Fixed faq collapsing and style

* Fixed repeating ending

* Fixed delete account

* Fixed party fetch issue

* Fixed scope issue

* Added member count filters

* Fixed create button style

* Fixed badge color display

* Updated tavern styles

* Fixed some party styles

* Updated login styles

* Fixed login redirect

* Fixed initial login process

* Added done local
This commit is contained in:
Keith Holliday
2017-08-07 14:26:17 -06:00
committed by GitHub
parent 1896984777
commit 0b076311df
46 changed files with 671 additions and 206 deletions
+7 -4
View File
@@ -3,8 +3,11 @@ import omit from 'lodash/omit';
export async function createChallenge (store, payload) {
let response = await axios.post('/api/v3/challenges', payload.challenge);
let newChallenge = response.data.data;
return response.data.data;
store.state.user.data.challenges.push(newChallenge._id);
return newChallenge;
}
export async function joinChallenge (store, payload) {
@@ -42,7 +45,7 @@ export async function getChallenge (store, payload) {
}
export async function exportChallengeCsv (store, payload) {
let response = await axios.get(`/api/v3/challenges/challenges/${payload.challengeId}/export/csv`);
let response = await axios.get(`/api/v3/challenges/${payload.challengeId}/export/csv`);
return response.data.data;
}
@@ -59,13 +62,13 @@ export async function updateChallenge (store, payload) {
}
export async function deleteChallenge (store, payload) {
let response = await axios.delete(`/api/v3/challenges/challenges/${payload.challengeId}`);
let response = await axios.delete(`/api/v3/challenges/${payload.challengeId}`);
return response.data.data;
}
export async function selectChallengeWinner (store, payload) {
let response = await axios.post(`/api/v3/challenges/challenges/${payload.challengeId}/selectWinner/${payload.winnerId}`);
let response = await axios.post(`/api/v3/challenges/${payload.challengeId}/selectWinner/${payload.winnerId}`);
return response.data.data;
}
+1
View File
@@ -14,6 +14,7 @@ const IS_TEST = process.env.NODE_ENV === 'test'; // eslint-disable-line no-proce
// Load user auth parameters and determine if it's logged in
// before trying to load data
let isUserLoggedIn = false;
axios.defaults.headers.common['x-client'] = 'habitica-web';
let AUTH_SETTINGS = localStorage.getItem('habit-mobile-settings');