Skip to content

Commit 75af093

Browse files
committed
add dotnet missing notice to welcome messages
1 parent 9a7583b commit 75af093

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/Pages/Text2Image.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@
558558
<div class="card border-danger mb-3 card-center-container">
559559
<div class="card-header">DotNET @Utilities.DotNetVersMissing Missing</div>
560560
<div class="card-body">
561-
<p class="card-text">
561+
<p id="dotnet_missing_message" class="card-text">
562562
You do not seem to have DotNET @Utilities.DotNetVersMissing installed - this will be required in a future version of StableSwarmUI.
563563
<br>Please install DotNET SDK @(Utilities.DotNetVersMissing).0 from <a href="https://dotnet.microsoft.com/en-us/download/dotnet/@(Utilities.DotNetVersMissing).0">https://dotnet.microsoft.com/en-us/download/dotnet/@(Utilities.DotNetVersMissing).0</a>
564564
</p>

src/wwwroot/js/genpage/welcomemessages.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,17 @@ function automaticWelcomeMessage(override = null) {
5151
`New feature (2023-12-06): Tab Completion in prompts!\nJust type a '&lt;' symbol and watch the suggestions for prompt-syntax tools appear! <a href="https://github.com/Stability-AI/StableSwarmUI/discussions/11#discussioncomment-7775593">(Feature Announcement Link)</a>`,
5252
`New feature (2023-12-07): Welcome messages!\nOh, well, hi, that's this right here. <a href="https://github.com/Stability-AI/StableSwarmUI/discussions/11#discussioncomment-7791189">(Feature Announcement Link)</a>`
5353
];
54+
let dotnetNotice = document.getElementById('dotnet_missing_message');
55+
if (dotnetNotice) {
56+
messages.push(dotnetNotice.innerHTML.trim());
57+
}
5458
if (override == null) {
55-
override = Math.floor(Math.random() * messages.length);
59+
if (dotnetNotice) {
60+
override = messages.length - 1;
61+
}
62+
else {
63+
override = Math.floor(Math.random() * messages.length);
64+
}
5665
}
5766
override = override % messages.length;
5867
if (override < 0) {

0 commit comments

Comments
 (0)