| 110 | </html>`; |
| 111 | |
| 112 | export const sidecarCrashHtml = ({ reported }: CrashScreenOptions): string => `<!doctype html> |
| 113 | <html> |
| 114 | <head> |
| 115 | <meta charset="utf-8" /> |
| 116 | <title>Executor</title> |
| 117 | <style> |
| 118 | :root { color-scheme: dark; } |
| 119 | body { |
| 120 | margin: 0; |
| 121 | min-height: 100vh; |
| 122 | display: grid; |
| 123 | place-items: center; |
| 124 | background: #0a0a0a; |
| 125 | color: #fafafa; |
| 126 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; |
| 127 | } |
| 128 | .card { max-width: 26rem; padding: 2rem; text-align: center; } |
| 129 | .icon { font-size: 2rem; margin-bottom: 0.75rem; } |
| 130 | h1 { font-size: 1.15rem; font-weight: 600; margin: 0 0 0.5rem; } |
| 131 | p { font-size: 0.875rem; color: #a1a1aa; line-height: 1.5; margin: 0 0 1.5rem; } |
| 132 | .row { display: flex; gap: 0.6rem; justify-content: center; } |
| 133 | button { |
| 134 | padding: 0.55rem 1.1rem; |
| 135 | border-radius: 6px; |
| 136 | border: 1px solid transparent; |
| 137 | background: #fafafa; |
| 138 | color: #0a0a0a; |
| 139 | font: inherit; |
| 140 | font-size: 0.875rem; |
| 141 | cursor: pointer; |
| 142 | white-space: nowrap; |
| 143 | } |
| 144 | button.secondary { background: transparent; color: #fafafa; border-color: #3f3f46; } |
| 145 | #status { margin-top: 1.25rem; min-height: 1.2em; font-size: 0.8rem; color: #a1a1aa; } |
| 146 | .reset-row { margin-top: 1.75rem; font-size: 0.75rem; color: #71717a; } |
| 147 | .reset-row a { color: #f87171; text-decoration: underline; cursor: pointer; } |
| 148 | </style> |
| 149 | </head> |
| 150 | <body> |
| 151 | <main class="card"> |
| 152 | <div class="icon">⚠️</div> |
| 153 | <h1>The local Executor server stopped unexpectedly</h1> |
| 154 | <p> |
| 155 | Your data is safe.${reported ? " A crash report was sent automatically so this can get fixed." : ""} |
| 156 | Restart the server to keep working. |
| 157 | </p> |
| 158 | <div class="row"> |
| 159 | <button id="restart">Restart server</button> |
| 160 | <button id="update" class="secondary">Check for updates</button> |
| 161 | <button id="export" class="secondary">Export diagnostics</button> |
| 162 | </div> |
| 163 | <p id="status"></p> |
| 164 | <p class="reset-row"> |
| 165 | Still won't start after restarting? |
| 166 | <a id="reset" href="#">Reset data</a> |
| 167 | clears a damaged database to get the app running again. |
| 168 | </p> |
| 169 | </main> |