Skip to content

Commit

Permalink
add random avatars
Browse files Browse the repository at this point in the history
  • Loading branch information
w0rng committed Jul 25, 2024
1 parent 87e6ce3 commit ae239ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You have found the easiest way to install & manage WireGuard on any Linux host!
* Download a client's configuration file.
* Statistics for which clients are connected.
* Tx/Rx charts for each connected client.
* Gravatar support.
* Gravatar support or random avatars.
* Automatic Light / Dark Mode
* Multilanguage Support
* UI_TRAFFIC_STATS (default off)
Expand Down
2 changes: 2 additions & 0 deletions src/www/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ new Vue({
this.clients = clients.map((client) => {
if (client.name.includes('@') && client.name.includes('.')) {
client.avatar = `https://gravatar.com/avatar/${sha256(client.name.toLowerCase().trim())}.jpg`;
} else {
client.avatar = `https://api.dicebear.com/9.x/bottts/svg?seed=${sha256(client.name.toLowerCase().trim())}`

Check failure on line 179 in src/www/js/app.js

View workflow job for this annotation

GitHub Actions / Lint

Missing semicolon
}

if (!this.clientsPersist[client.id]) {
Expand Down

0 comments on commit ae239ef

Please sign in to comment.