Skip to content

Commit

Permalink
Render GitHub avatars in explorer table (#69)
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti authored Jan 3, 2025
1 parent e3ab2e9 commit fd9a4fe
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/enterprise/enterprise_explorer.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,13 @@ static auto file_manager(std::ostringstream &html,
assert(entry.at("type").is_string());
html << "<td>";
if (entry.at("type").to_string() == "directory") {
html << "<i class=\"bi bi-folder-fill\"></i>";
if (entry.defines("github")) {
html << "<img src=\"https://github.com/";
html << entry.at("github").to_string();
html << ".png?size=80\" width=\"40\" height=\"40\">";
} else {
html << "<i class=\"bi bi-folder-fill\"></i>";
}
} else {
html << "<i class=\"bi bi-braces\"></i>";
}
Expand Down

0 comments on commit fd9a4fe

Please sign in to comment.