tickets
All repositories: gitoria
2.8 KB
// lib/problems.hl — WHAT THE ERROR PAGES SAY (tickets#42). /connect and /login/callback are function routes: they decide, they do not draw.// A refusal redirects to a PAGE of the app (components/problem.hl: the same shell, header and theme) and names the reason by a SHORT CODE in the// path (`/login/failed/<code>`, `/connect/failed/<code>`); the sentence is chosen HERE from the code, so no text of the URL (or of ident, or of// the app asking to connect) is ever rendered: an unknown code gets the general sentence.// the sentence and the heading of a code: { title, text, back, backText }static problemOf = (code) => {let title = 'Something went wrong'let text = 'That did not work. Please try again.'let back = '/'let backText = 'back to the tickets'if (code == 'login-method') { title = 'Login failed' text = 'The login return only accepts a normal page visit.' }if (code == 'login-no-code') { title = 'Login failed' text = 'Ident sent no login code. Please sign in again.' }if (code == 'login-refused') { title = 'Login failed' text = 'Ident did not accept the login code. Please sign in again.' }if (code == 'login-no-answer') { title = 'Login failed' text = 'Ident did not answer. Please try again in a moment.' }if (code == 'login-not-set-up') { title = 'Login failed' text = 'Login is not set up on this server.' }if (code == 'login-no-user') { title = 'Login failed' text = 'Your user could not be stored. Please try again.' }if (code == 'login-invite') { title = 'Invite failed' text = 'The invite could not be used. It may be used up, or meant for a project that does not exist any more. Ask for a new one.' }if (code == 'connect-method') { title = 'Connect failed' text = 'The connection request only accepts a normal page visit.' }if (code == 'connect-refused') { title = 'Connect failed' text = 'The app sent a connection request that is not valid: its name or its return address was not accepted. Start again from the app.' }if (code == 'connect-busy') { title = 'Connect failed' text = 'Too many connection requests are waiting. Try again in a few minutes.' }if (code == 'connect-store') { title = 'Connect failed' text = 'The connection request could not be stored. Please try again.' }return { title = title text = text back = back backText = backText }}// the code an ident exchange error stands for (users.hl exchangeCode answers its reason as text)static loginCodeOf = (error) => {if (error == 'ident did not answer') { return 'login-no-answer' }if (error != null && error.indexOf('not set up') >= 0) { return 'login-not-set-up' }return 'login-refused'}// the code a refused connection request stands for (connections.hl createRequest)static connectCodeOf = (r) => {if (r.busy == true) { return 'connect-busy' }if (r.error != null && r.error.startsWith('could not store')) { return 'connect-store' }return 'connect-refused'}
Branches
Latest commits
- e448e656Tickets conductor: STATUS #51mre
- 1c10857bTickets conductor: P51 eval, brief 027mre
- e725969dTickets conductor: #51 directionmre
- 1b5c63ddTickets conductor: P51 startedmre
- 9f13fbdaTickets conductor: brief 026 prioritymre
- acc477d9Tickets conductor: brief 026 + Vinzenz recommendationsmre
- 9233a734Tickets conductor: brief 026 completemre
- 5da589fdTickets conductor: brief 026 + Gitoria's answermre
- a3cd5329Tickets conductor: tickets#51 opened, brief 026 draftmre
- 6f6e5797Tickets conductor: STATUS wordingmre
- 957de51fTickets conductor: T36 live, #36 review, #50 donemre
- bc2fde32Merge branch 'main' into t36-stylemre
- b7ca093atests: wait for the new row and normalize editor marker spacesmre
- 41da3525Tickets conductor: flake cause, T36 deploy stepmre
- 64c477e6Tickets conductor: deploy waits for Arachnemre
- 467d7286Tickets conductor: T36 done, deploy questionmre
- fed5ca81ticket_list: remove repeated selected-state coloursmre
- 8542fc8aTickets conductor: T36 proof reviewedmre
- 35980936inbox: preserve desktop columns after list styles were scopedmre
- 2a5b8b91Tickets conductor: T36 cap stop, resumed for proofmre