Skip to content

Commit

Permalink
added user avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsPi3141 committed Mar 25, 2023
1 parent 8578609 commit a1e541e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ function initChat() {
alpacaReady = false;
alpacaHalfReady = false;
initChat();
} else if (res.endsWith("\n> ") && alpacaReady) {
} else if (res.includes("\n>") && alpacaReady) {
win.webContents.send("result", {
data: "\n\n<end>"
});
Expand Down
Binary file added src/img/alpaca.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/img/user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 19 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ body {
margin: 0;
padding: 0px;
overflow: hidden;
padding-top: 32px;
padding-top: 35px;
}

.input-field {
Expand Down Expand Up @@ -258,6 +258,24 @@ button#clear {
li {
white-space: pre-wrap;
}
#messages > li::before {
width: 32px;
height: 32px;
content: "";
display: inline-block;
background-size: cover;
position: relative;
margin-left: -48px;
margin-right: 16px;
margin-top: -32px;
top: 14px;
}
#messages > li.user-msg::before {
background-image: url(img/user.png);
}
#messages > li.bot-msg::before {
background-image: url(img/alpaca.png);
}

@-webkit-keyframes spin {
to {
Expand Down

0 comments on commit a1e541e

Please sign in to comment.