mirror of
https://github.com/the-draupnir-project/Draupnir.git
synced 2026-04-26 19:05:15 +00:00
Improve recovery status message spacing (#603)
* Improve safe mode status rendering. Feedback from @jimmackenzie. * Update interface-manager.
This commit is contained in:
+1
-1
@@ -56,7 +56,7 @@
|
||||
"@sentry/node": "^7.17.2",
|
||||
"@sentry/tracing": "^7.17.2",
|
||||
"@sinclair/typebox": "0.32.34",
|
||||
"@the-draupnir-project/interface-manager": "2.4.1",
|
||||
"@the-draupnir-project/interface-manager": "2.5.0",
|
||||
"@the-draupnir-project/matrix-basic-types": "^0.2.0",
|
||||
"await-lock": "^2.2.2",
|
||||
"better-sqlite3": "^9.4.3",
|
||||
|
||||
@@ -26,17 +26,22 @@ export function renderRecoveryOptions(cause: SafeModeCause): DocumentNode {
|
||||
}
|
||||
return (
|
||||
<fragment>
|
||||
Recovery options are available for this failure mode:
|
||||
<ol>
|
||||
{recoveryOptions.map((option) => (
|
||||
<li>{option.description}</li>
|
||||
))}
|
||||
</ol>
|
||||
To use a recovery option, click on one of the reactions (
|
||||
{recoveryOptions
|
||||
.map((_, index) => MatrixReactionHandler.numberToEmoji(index + 1))
|
||||
.join(", ")}
|
||||
), or use the recover command: <code>!draupnir recover 1</code>.
|
||||
<p>
|
||||
Recovery options are available for this failure mode:
|
||||
<ol>
|
||||
{recoveryOptions.map((option) => (
|
||||
<li>{option.description}</li>
|
||||
))}
|
||||
</ol>
|
||||
</p>
|
||||
<hr />
|
||||
<p>
|
||||
To use a <b>recovery option</b>, click on one of the reactions (
|
||||
{recoveryOptions
|
||||
.map((_, index) => MatrixReactionHandler.numberToEmoji(index + 1))
|
||||
.join(", ")}
|
||||
), or use the recover command: <code>!draupnir recover 1</code>.
|
||||
</p>
|
||||
</fragment>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -38,9 +38,11 @@ function renderSafeModeCauseError(error: ResultError): DocumentNode {
|
||||
if (error instanceof ActionException) {
|
||||
return (
|
||||
<fragment>
|
||||
Draupnir is in safe mode because Draupnir failed to start.
|
||||
<p>Draupnir is in safe mode because Draupnir failed to start.</p>
|
||||
<details>
|
||||
<summary>{error.mostRelevantElaboration}</summary>
|
||||
<summary>
|
||||
<code>{error.mostRelevantElaboration}</code>
|
||||
</summary>
|
||||
Details can be found by providing the reference{" "}
|
||||
<code>{error.uuid}</code>
|
||||
to an administrator.
|
||||
@@ -53,7 +55,9 @@ function renderSafeModeCauseError(error: ResultError): DocumentNode {
|
||||
<fragment>
|
||||
Draupnir is in safe mode because Draupnir failed to start.
|
||||
<details>
|
||||
<summary>{error.mostRelevantElaboration}</summary>
|
||||
<summary>
|
||||
<code>{error.mostRelevantElaboration}</code>
|
||||
</summary>
|
||||
<pre>{error.toReadableString()}</pre>
|
||||
</details>
|
||||
</fragment>
|
||||
@@ -86,12 +90,12 @@ export function renderSafeModeStatusInfo(
|
||||
): DocumentNode {
|
||||
return (
|
||||
<fragment>
|
||||
⚠️ Draupnir is in safe mode ⚠️
|
||||
<br />
|
||||
<h3>
|
||||
⚠️ <b>Draupnir is in safe mode</b> ⚠️
|
||||
</h3>
|
||||
{renderSafeModeCause(info.safeModeCause)}
|
||||
<br />
|
||||
{renderRecoveryOptions(info.safeModeCause)}
|
||||
<br />
|
||||
<hr />
|
||||
{StandardPersistentConfigRenderer.renderAdaptorStatus(info.configStatus)}
|
||||
<b>Version: </b>
|
||||
<code>{info.version}</code>
|
||||
|
||||
@@ -256,10 +256,10 @@
|
||||
resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e"
|
||||
integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==
|
||||
|
||||
"@the-draupnir-project/interface-manager@2.4.1":
|
||||
version "2.4.1"
|
||||
resolved "https://registry.yarnpkg.com/@the-draupnir-project/interface-manager/-/interface-manager-2.4.1.tgz#fc93eac495cf89fee0c87786b405a2fbae826b49"
|
||||
integrity sha512-7L9QzsH/BAgdPSoNaB78ENJKAqbD4sqA0J7LmAUDiM7ygLS1yVrrI2VRN9aCdguVcbuD//fnOCJhSlfL2vr6YQ==
|
||||
"@the-draupnir-project/interface-manager@2.5.0":
|
||||
version "2.5.0"
|
||||
resolved "https://registry.yarnpkg.com/@the-draupnir-project/interface-manager/-/interface-manager-2.5.0.tgz#5a41cbbb62d890fb2d539483d046750ef36d4944"
|
||||
integrity sha512-J7h19l5uejb7eniOL8Uz+ByvLrIfiFQNrPJON7nJRGpnQ2oqZIEqic5f186zSWwEOlE2KhNFAz6bfOiQJDm5qg==
|
||||
dependencies:
|
||||
"@gnuxie/super-cool-stream" "^0.2.1"
|
||||
"@gnuxie/typescript-result" "^1.0.0"
|
||||
|
||||
Reference in New Issue
Block a user