mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-13 22:27:21 +00:00
Changed all icons of AI Studio to Lucide (#1187)
This commit is contained in:
1 parent
9a676101f7
commit
7ef26cd5c8
352 files changed
+6261
-1620
No files matched your search
@@ -24,6 +24,14 @@ public static class ConfidenceLevelExtensions
|
||||
_ => TB("Unknown confidence level"),
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// The color of the level for icons, text, and borders on the background of the app.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// In dark mode, these are light tones: the dark ones of <see cref="GetBackgroundColor"/> almost vanish on the
|
||||
/// dark background, especially as the thin strokes of a Lucide icon.
|
||||
/// </remarks>
|
||||
/// <param name="settingsManager">The settings manager, which knows whether the app shows its dark mode.</param>
|
||||
public string GetColor(SettingsManager settingsManager) => (level, settingsManager.IsDarkMode) switch
|
||||
{
|
||||
(ConfidenceLevel.NONE, false) => "#cccccc",
|
||||
@@ -33,27 +41,49 @@ public static class ConfidenceLevelExtensions
|
||||
(ConfidenceLevel.UNKNOWN, true) => "#aaaaaa",
|
||||
|
||||
(ConfidenceLevel.UNTRUSTED, false) => "#ff0000",
|
||||
(ConfidenceLevel.UNTRUSTED, true) => "#800000",
|
||||
(ConfidenceLevel.UNTRUSTED, true) => "#fe7c75",
|
||||
|
||||
(ConfidenceLevel.VERY_LOW, false) => "#ff6600",
|
||||
(ConfidenceLevel.VERY_LOW, true) => "#803300",
|
||||
(ConfidenceLevel.VERY_LOW, true) => "#f58b4b",
|
||||
|
||||
(ConfidenceLevel.LOW, false) => "#ffcc00",
|
||||
(ConfidenceLevel.LOW, true) => "#806600",
|
||||
(ConfidenceLevel.LOW, true) => "#e3b842",
|
||||
|
||||
(ConfidenceLevel.MODERATE, false) => "#99cc00",
|
||||
(ConfidenceLevel.MODERATE, true) => "#4d6600",
|
||||
(ConfidenceLevel.MODERATE, true) => "#afc84e",
|
||||
|
||||
(ConfidenceLevel.MEDIUM, false) => "#86b300",
|
||||
(ConfidenceLevel.MEDIUM, true) => "#394d00",
|
||||
(ConfidenceLevel.MEDIUM, true) => "#8bc55c",
|
||||
|
||||
(ConfidenceLevel.HIGH, false) => "#009933",
|
||||
(ConfidenceLevel.HIGH, true) => "#004d1a",
|
||||
(ConfidenceLevel.HIGH, true) => "#5ac576",
|
||||
|
||||
(_, false) => "#cc6600",
|
||||
(_, true) => "#663300",
|
||||
(_, true) => "#db9152",
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// The color of the level as the background of white text, such as the levels in the confidence scheme.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// In light mode, this is the color of <see cref="GetColor"/>. In dark mode, these are dark tones, so the white
|
||||
/// text on them stays readable.
|
||||
/// </remarks>
|
||||
/// <param name="settingsManager">The settings manager, which knows whether the app shows its dark mode.</param>
|
||||
public string GetBackgroundColor(SettingsManager settingsManager) => settingsManager.IsDarkMode ? level switch
|
||||
{
|
||||
ConfidenceLevel.NONE => "#666666",
|
||||
ConfidenceLevel.UNKNOWN => "#555555",
|
||||
ConfidenceLevel.UNTRUSTED => "#800000",
|
||||
ConfidenceLevel.VERY_LOW => "#803300",
|
||||
ConfidenceLevel.LOW => "#806600",
|
||||
ConfidenceLevel.MODERATE => "#4d6600",
|
||||
ConfidenceLevel.MEDIUM => "#394d00",
|
||||
ConfidenceLevel.HIGH => "#004d1a",
|
||||
|
||||
_ => "#663300",
|
||||
} : level.GetColor(settingsManager);
|
||||
|
||||
public string SetColorStyle(SettingsManager settingsManager) => $"--confidence-color: {level.GetColor(settingsManager)};";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user