mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-24 16:09:14 +01:00
Replace NoFound view by a generic error view
This commit is contained in:
parent
e9ecbbe057
commit
dda3901bb9
9
resources/js/app.js
vendored
9
resources/js/app.js
vendored
@ -9,7 +9,7 @@ import Register from './views/Register'
|
|||||||
import Accounts from './views/Accounts'
|
import Accounts from './views/Accounts'
|
||||||
import Create from './views/Create'
|
import Create from './views/Create'
|
||||||
import Edit from './views/Edit'
|
import Edit from './views/Edit'
|
||||||
import NotFound from './views/NotFound'
|
import NotFound from './views/Error'
|
||||||
|
|
||||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
import { faPlus, faQrcode, faImage, faTrash, faEdit, faCheck, faLock, faLockOpen } from '@fortawesome/free-solid-svg-icons'
|
import { faPlus, faQrcode, faImage, faTrash, faEdit, faCheck, faLock, faLockOpen } from '@fortawesome/free-solid-svg-icons'
|
||||||
@ -51,7 +51,12 @@ const router = new VueRouter({
|
|||||||
{
|
{
|
||||||
path: '/404',
|
path: '/404',
|
||||||
name: '404',
|
name: '404',
|
||||||
component: NotFound,
|
component: NotFound
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/error',
|
||||||
|
name: 'GenericError',
|
||||||
|
component: NotFound
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
if (error.response.status === 404) {
|
if (error.response.status === 404) {
|
||||||
this.$router.push({name: '404' });
|
this.$router.push({ name: '404' });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -120,7 +120,7 @@
|
|||||||
this.errors = error.response.data.error
|
this.errors = error.response.data.error
|
||||||
}
|
}
|
||||||
else if (error.response.status === 404) {
|
else if (error.response.status === 404) {
|
||||||
this.$router.push({name: '404' });
|
this.$router.push({ name: '404' });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<modal v-model="ShowModal">
|
<modal v-model="ShowModal">
|
||||||
<div>
|
<div v-if="$route.name == '404'">
|
||||||
Resource not found, please <router-link :to="{ name: 'accounts' }" class="is-text has-text-white">refresh</router-link>
|
<p class="error-404"></p>
|
||||||
|
<p>Resource not found, please <router-link :to="{ name: 'accounts' }" class="is-text has-text-white">refresh</router-link></p>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<p class="error-generic"></p>
|
||||||
|
<p>An error occured, please <router-link :to="{ name: 'accounts' }" class="is-text has-text-white">refresh</router-link></p>
|
||||||
</div>
|
</div>
|
||||||
</modal>
|
</modal>
|
||||||
</div>
|
</div>
|
17
resources/sass/app.scss
vendored
17
resources/sass/app.scss
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user