From 87ce021035272c02cf3d9f3981618a7efd465b6d Mon Sep 17 00:00:00 2001 From: Bruno Quaresma Date: Tue, 21 Oct 2025 14:39:17 -0300 Subject: [PATCH] fix: centralize warning message in static error (#20389) - Centralize warning message in static error - Change a few typography styles to match coder/coder **Before:** Screenshot 2025-10-20 at 14 35 56 **After:** Screenshot 2025-10-20 at 14 35 48 Fixes https://github.com/coder/coder/issues/20369 --- site/static/error.html | 326 ++++++++++++++++++++--------------------- 1 file changed, 159 insertions(+), 167 deletions(-) diff --git a/site/static/error.html b/site/static/error.html index 405ee59d48..af723ebcd1 100644 --- a/site/static/error.html +++ b/site/static/error.html @@ -1,187 +1,179 @@ {{/* - This template is used by application handlers to render friendly error pages - when there is a proxy error (for example, when the target app isn't running). + This template is used by application handlers to render friendly error pages + when there is a proxy error (for example, when the target app isn't running). - Since it is served from subdomains, both on proxies and the primary, it MUST - NOT access any external resources. It must be entirely self-contained. This - includes anything in `/static` or `/icon`, as these are not served from - subdomains. + Since it is served from subdomains, both on proxies and the primary, it MUST + NOT access any external resources. It must be entirely self-contained. This + includes anything in `/static` or `/icon`, as these are not served from + subdomains. */}} - - - - - - {{- if not .Error.HideStatus }}{{ .Error.Status }} - {{end}}{{ - .Error.Title }} - - - - -
- {{/* - DO NOT LOAD AN EXTERNAL IMAGE HERE. See the comment at the top of - this file for more details. - */}} - - - + .warning-title h3 { + margin-left: 12px; + font-size: 16px; + font-weight: 500; + color: white; + } -

- {{- if not .Error.HideStatus }}{{ .Error.Status }} - {{end}}{{ - .Error.Title }} -

- {{- if .Error.RenderDescriptionMarkdown }} {{ .ErrorDescriptionHTML }} {{ - else }} -

{{ .Error.Description }}

- {{ end }} {{- if .Error.AdditionalInfo }} -
-

{{ .Error.AdditionalInfo }}

- {{ end }} {{- if .Error.Warnings }} -
-
- -

Warnings

-
-
    - {{ range $i, $v := .Error.Warnings }} -
  • {{ $v }}
  • - {{ end }} -
-
- {{ end }} -
- {{- if and .Error.AdditionalButtonText .Error.AdditionalButtonLink }} - {{ .Error.AdditionalButtonText }} - {{ end }} {{- if .Error.RetryEnabled }} - - {{ end }} - Back to site -
-
- + .warning li { + padding-top: 10px; + margin-left: 30px; + } + + + + +
+
+ {{/* + DO NOT LOAD AN EXTERNAL IMAGE HERE. See the comment at the top of + this file for more details. + */}} + + + + +

+ {{- if not .Error.HideStatus }}{{ .Error.Status }} - {{end}}{{ + .Error.Title }} +

+ {{- if .Error.RenderDescriptionMarkdown }} {{ .ErrorDescriptionHTML }} {{ + else }} +

{{ .Error.Description }}

+ {{ end }} {{- if .Error.AdditionalInfo }} +
+

{{ .Error.AdditionalInfo }}

+ {{ end }} +
+ + {{- if .Error.Warnings }} +
+
+ +

Warnings

+
+
    + {{ range $i, $v := .Error.Warnings }} +
  • {{ $v }}
  • + {{ end }} +
+
+ {{ end }} +
+ {{- if and .Error.AdditionalButtonText .Error.AdditionalButtonLink }} + {{ .Error.AdditionalButtonText }} + {{ end }} {{- if .Error.RetryEnabled }} + + {{ end }} + Back to site +
+
+