New client edit avatar (#8955)

* Fixed some purchasing issues with backgrounds

* Added more background styles

* Fixed some menu styles

* Initial old client removal

* Added cross-env

* removed bower and fixed lint

* Made interceptor errors use notify

* Removed old client tests and fixed lint
This commit is contained in:
Keith Holliday
2017-08-16 15:51:48 -06:00
committed by GitHub
parent 716695e11e
commit 0d28e663e4
13 changed files with 218 additions and 135 deletions

View File

@@ -16,6 +16,7 @@
</template>
<script>
import axios from 'axios';
import AppMenu from './components/appMenu';
import AppHeader from './components/appHeader';
import AppFooter from './components/appFooter';
@@ -43,6 +44,20 @@ export default {
},
},
created () {
// Set up Error interceptors
axios.interceptors.response.use((response) => {
return response;
}, (error) => {
if (error.response.status >= 400) {
this.$notify({
title: 'Habitica',
text: error.response.data.message,
});
}
return Promise.reject(error);
});
// Setup listener for title
this.$store.watch(state => state.title, (title) => {
document.title = title;