Vibe deck UI and hiding notes UI for now

This commit is contained in:
2026-06-18 21:07:28 -04:00
parent eefbb62eb7
commit add734b522
29 changed files with 503 additions and 180 deletions
+27 -13
View File
@@ -142,9 +142,10 @@ foreach (var file in deckFiles)
Cards = ParseList(yaml, "cards").Select(s => StripWikiLink(s) ?? "").Where(s => s != "").ToList(),
Keycards = ParseList(yaml, "keycards").Select(s => StripWikiLink(s) ?? "").Where(s => s != "").ToList(),
Divers = ParseList(yaml, "divers").Select(s => StripWikiLink(s) ?? "").Where(s => s != "").ToList(),
Description = StripWikiLinks(NullIfNa(yaml.GetValueOrDefault("description")))?.Replace("\r\n", "\n").Replace("\r", "\n").Replace("\n\n", "\n").Replace("\n\n", "\n"),
Description = StripWikiLinks(NullIfNa(yaml.GetValueOrDefault("description")))?.Replace("\r\n", "\n")
.Replace("\r", "\n").Replace("\n\n", "\n").Replace("\n\n", "\n"),
Factions = ParseList(yaml, "factions").Select(s => StripWikiLink(s) ?? "").Where(s => s != "").ToList(),
IsVisible = isVisible,
IsVisible = isVisible
};
decks.Add(deck);
@@ -267,6 +268,7 @@ static Dictionary<string, string> ParseYaml(string yaml)
blockScalarLines.Add(trimmed);
continue;
}
if (blockScalarKey != null)
dict[blockScalarKey] = string.Join("\n", blockScalarLines);
inBlockScalar = false;
@@ -285,8 +287,10 @@ static Dictionary<string, string> ParseYaml(string yaml)
quoteKey = null;
quoteLines.Clear();
}
continue;
}
dict[quoteKey] = string.Join("\n", quoteLines.Select(UnescapeYaml));
quoteKey = null;
quoteLines.Clear();
@@ -347,24 +351,34 @@ static string UnescapeYaml(string s)
{
var sb = new StringBuilder();
for (var i = 0; i < s.Length; i++)
{
if (s[i] == '\\' && i + 1 < s.Length)
{
switch (s[i + 1])
{
case 'r': sb.Append('\r'); i++; break;
case 'n': sb.Append('\n'); i++; break;
case 't': sb.Append('\t'); i++; break;
case '\\': sb.Append('\\'); i++; break;
case '"': sb.Append('"'); i++; break;
case 'r':
sb.Append('\r');
i++;
break;
case 'n':
sb.Append('\n');
i++;
break;
case 't':
sb.Append('\t');
i++;
break;
case '\\':
sb.Append('\\');
i++;
break;
case '"':
sb.Append('"');
i++;
break;
default: sb.Append(s[i]); break;
}
}
else
{
sb.Append(s[i]);
}
}
return sb.ToString();
}