| 1 | /** Cap for the per-thread "recently seen" URL list shown in the empty state. */ |
| 2 | export const PREVIEW_RECENT_URL_LIMIT = 10; |
| 3 | |
| 4 | /** |
| 5 | * Common Chromium error codes mapped to a short human label. Used by the |
| 6 | * unreachable view to drop the raw `ERR_*` code in favour of friendlier copy. |
| 7 | */ |
| 8 | export const PREVIEW_ERROR_CODE_MESSAGES: Readonly<Record<string, string>> = Object.freeze({ |
| 9 | ERR_NAME_NOT_RESOLVED: "DNS address could not be found", |
| 10 | ERR_NAME_RESOLUTION_FAILED: "DNS address could not be found", |
| 11 | ERR_CONNECTION_REFUSED: "Connection refused", |
| 12 | ERR_CONNECTION_RESET: "Connection was reset", |
| 13 | ERR_CONNECTION_CLOSED: "Connection was closed", |
| 14 | ERR_CONNECTION_TIMED_OUT: "Connection timed out", |
| 15 | ERR_INTERNET_DISCONNECTED: "No internet connection", |
| 16 | ERR_TIMED_OUT: "Connection timed out", |
| 17 | ERR_CERT_AUTHORITY_INVALID: "Certificate authority is not trusted", |
| 18 | ERR_CERT_COMMON_NAME_INVALID: "Certificate hostname mismatch", |
| 19 | ERR_CERT_DATE_INVALID: "Certificate is expired or not yet valid", |
| 20 | ERR_TOO_MANY_REDIRECTS: "Too many redirects", |
| 21 | }); |