From 0927c130ed9f270fe6d22cc35b13bed5425434e2 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Sun, 20 Aug 2017 16:20:55 +0430 Subject: [PATCH] press keys to open developer tools Stack traces without developer tools are useless. Instead show a beatiful message --- lib/app/components/nuxt-error.vue | 26 ++++++++------------------ lib/app/views/error.html | 3 --- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/lib/app/components/nuxt-error.vue b/lib/app/components/nuxt-error.vue index 8918197a49..ef58252f40 100644 --- a/lib/app/components/nuxt-error.vue +++ b/lib/app/components/nuxt-error.vue @@ -6,12 +6,16 @@

{{ statusCode }}

{{ message }}

- <% if(debug) { %> -
Route: {{ $route.fullPath }}
Query: {{ $route.query }}
Params: {{$route.params}}
{{ error.stack }}
- <% } %>

Back to the home page

+ <% if(debug) { %> +
+ Press Command + Option + I + or Control + Shift + I + To open developer tools +
+ <% } %>
@@ -55,7 +59,7 @@ export default { return (this.error && this.error.statusCode) || 500 }, message () { - return (this.error && this.error.message) || 'Nuxt Server Error' + return this.error.toString() || 'Nuxt Server Error' } } } @@ -81,13 +85,6 @@ export default { margin: 0 auto; max-width: 70%; } -<% if(debug) { %> -.__nuxt-error-page .error-box { - box-shadow: 0px 0px 9px #d3d3d3; - padding: 10px; - text-align: left; -} -<% } %> .__nuxt-error-page .poweredby { text-align: center; margin-top: 10%; @@ -95,11 +92,4 @@ export default { .__nuxt-error-page a { color: #42b983 !important; } -.__nuxt-error-page pre { - border-color: #42b983 !important; - background-color: white; -} -.__nuxt-error-page pre code { - background-color: white; -} diff --git a/lib/app/views/error.html b/lib/app/views/error.html index ee9a186005..a194321d69 100644 --- a/lib/app/views/error.html +++ b/lib/app/views/error.html @@ -43,9 +43,6 @@ .__nuxt-error-page a { color: #42b983 !important; } -.__nuxt-error-page pre { - border-color: #42b983 !important; -}