From a1e541e4123888436f89a49524ac3833ee3dd135 Mon Sep 17 00:00:00 2001 From: Pi Date: Fri, 24 Mar 2023 19:34:23 -0700 Subject: [PATCH] added user avatar --- index.js | 2 +- src/img/alpaca.png | Bin 0 -> 5840 bytes src/img/user.png | Bin 0 -> 2830 bytes src/style.css | 20 +++++++++++++++++++- 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 src/img/alpaca.png create mode 100644 src/img/user.png diff --git a/index.js b/index.js index 62198a3..9694193 100644 --- a/index.js +++ b/index.js @@ -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" }); diff --git a/src/img/alpaca.png b/src/img/alpaca.png new file mode 100644 index 0000000000000000000000000000000000000000..c101452ad290d2c7b24e5c666af78a2d1b813865 GIT binary patch literal 5840 zcmV;>7BA_EP)00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf6951U69E94oEQKA7G+69K~!i%Ra#kW z9Y=QU_qyN4$9lO{B**XslOP!f86Xbw5d?^VV1gt-J_iX9 zAV8L{d;|u9#+TX#A4 z)~)L9CnX;LyH~s@^uo~dyvR#LUX;LH16+|v>VQc%6fap#_?StAVIrzhyc#Ar8#*Z` zAw8ZKMo|*HHcH@+T)3kR(fUD@^nKV3tH}tw0w7_sMG0x9Z~}$O^_NIWo#%I)e?F>0 zEW|}OLX7MRNn*=B=xTL~!k5pEzBGEQTCIFLyA)L`URZ?$=vHvAN*op3@KCLku`j*4 z0mY9V8~L+~r#tIwKOVp9RjZhx6`PM4d6%>)h-YCXO43m(hZW7q5_{r}MHxk0nu=QT zHN)we$tz>Of9&v!r$)jk0YzeS5*$($7KA-IAL~*e*vANg{F4i(f4#r&#(P(f=kwXX z7dxj|35j|T3yk3v3PP=Di&2-~`Rogv=3-%JtA_QZUvctisd&dcm7ad6*PkyeF09_X zdGFGx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y^Tu_XzW|ra4qjbm$S-cYfBI_C zv9kQaMj~^;G74_-<0(aTUF3jcu~)-ZdlOE1)`vIXS+=x+a;3P+u283+6ys^168=+0 zyZ6*JKs066Zhymf1xB}7fihwC6qklwR@-~btLzvE_qA{J&HXj9&0K|EJinN@Z2R}y$t|_eWppTlebYL_2#{yJ3n>c&zoVCIlfNyknRW1*aqoS&4Y3E;9KIm zj<(gu%xq`xty#0>V#x6Fqzyr(lU>EY#>TEUwSBD}WjAc+mbef*qB5ta5PdqeI| zpAS?D&va(~^2BCvT$PzvMHXW$CJO;0A|I=NpED#@^Y^`BBdMZZ5QU%6XZZa;G>wd#2udc)HuR zB-f`;3(@9H$%J=iDCt96(LGkr^%E`TbJzT%?vT)U$4W|BGyii(Cr#Yo((UJM=Df08 z-a5Y~JUXh 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 {