This commit is contained in:
ymq1 2025-06-07 06:29:19 +00:00
parent e50012751d
commit 6d10256aa9
3 changed files with 7 additions and 5 deletions

View File

@ -484,7 +484,7 @@ bricks.LlmIO = class extends bricks.VBox {
var w = await bricks.widgetBuild(this.input_view, this.o_w, data);
w.set_css(this.msg_css||'user_msg');
w.set_css('filler');
var img = new bricks.Svg({rate:2,url:this.user_icon||bricks_resource('imgs/user.svg')});
var img = new bricks.Svg({rate:2,url:this.user_icon||bricks_resource('imgs/chat-user.svg')});
box.add_widget(new bricks.BlankIcon({rate:2, flexShrink:0}));
box.add_widget(w);
box.add_widget(img);

View File

@ -23,7 +23,7 @@ bricks.UserMsgBox = class extends bricks.HBox {
*/
constructor(opts){
super(opts);
var img = new bricks.Svg({rate:2,url:this.icon||bricks_resource('imgs/user.svg')});
var img = new bricks.Svg({rate:2,url:this.icon||bricks_resource('imgs/chat-user.svg')});
var w = new bricks.MdWidget({mdtext:this.prompt});
w.set_css('filler');
w.set_css(this.msg_css||'user_msg');

View File

@ -31,9 +31,11 @@ bricks.Svg = class extends bricks.VBox {
fetch(url)
.then(response => response.text())
.then(svgText => {
this.svgText = svgText;
this.set_colored_svg(this.color);
if (this.blink) this.start_blink();
if (svgText.startsWith("<svg ")){
this.svgText = svgText;
this.set_colored_svg(this.color);
if (this.blink) this.start_blink();
}
});
}
set_ancent_color(e){