MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / generateModalHtml

Method generateModalHtml

src/lib/FancyError.ts:36–59  ·  view source on GitHub ↗

* Generate the modal HTML for an error

(error: QueuedError)

Source from the content-addressed store, hash-verified

34 * Generate the modal HTML for an error
35 */
36 private static generateModalHtml (error: QueuedError): string {
37 return `
38 <div class='fancy-error modal modal--active' data-error='${error.id}'>
39 <div class='modal__content'>
40 <h2>${FancyError.escapeHtml(error.title)}</h2>
41 <p>${FancyError.escapeHtml(error.message)}</p>
42 <div class='padded text--left'>
43 <h3>Details</h3>
44 ${FancyError.render(error.props)}
45 <hr class='separator--material'/>
46 <h3>Need More Help?</h3>
47 <div class='error-section'>
48 <p>Remember you can always ask for more help if you need it at:</p>
49 <p><b>Community Forums</b>: <a href='https://community.monogatari.io/' target='_blank' rel='noopener noreferrer'>https://community.monogatari.io/</a></p>
50 <p><b>Discord</b>: <a href='https://discord.gg/gWSeDTz' target='_blank' rel='noopener noreferrer'>https://discord.gg/gWSeDTz</a></p>
51 <p><b>GitHub</b>: <a href='https://github.com/Monogatari/Monogatari/issues/' target='_blank' rel='noopener noreferrer'>https://github.com/Monogatari/Monogatari/issues/</a></p>
52 <p><b>Twitter</b>: <a href='https://twitter.com/monogatari' target='_blank' rel='noopener noreferrer'>https://twitter.com/monogatari</a></p>
53 </div>
54 <button>Ok</button>
55 </div>
56 </div>
57 </div>
58 `;
59 }
60
61 /**
62 * Attach click handler to dismiss an error modal

Callers 2

popMethod · 0.80
showErrorMethod · 0.80

Calls 2

escapeHtmlMethod · 0.80
renderMethod · 0.45

Tested by

no test coverage detected