mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 14:17:22 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user