Hansimov commited on
Commit
a348252
1 Parent(s): ed18d7d

:gem: [Feature] New buttons for Messager button group

Browse files
Files changed (1) hide show
  1. apps/llm_mixer/js/messager.js +20 -10
apps/llm_mixer/js/messager.js CHANGED
@@ -37,19 +37,29 @@ export class MessagerViewer {
37
  .addClass("col-auto")
38
  .addClass("button-group");
39
 
40
- this.button = $("<button>").addClass("btn px-0");
41
- let button_icon = $("<i>");
 
 
 
 
 
 
 
 
 
 
 
 
42
  if (this.message.role === "user") {
43
- button_icon.addClass("fa fa-edit");
44
- this.button.attr("title", "Edit");
45
- this.button.addClass("edit-button");
46
  } else {
47
- button_icon.addClass("fa fa-rotate fa-spin-fast");
48
- this.button.attr("title", "Regenerate");
49
- this.button.addClass("regenerate-button");
 
 
 
50
  }
51
- this.button.append(button_icon);
52
- this.button_group.append(this.button);
53
  }
54
  }
55
 
 
37
  .addClass("col-auto")
38
  .addClass("button-group");
39
 
40
+ this.edit_button = $("<button>")
41
+ .addClass("btn px-2")
42
+ .addClass("edit-button")
43
+ .attr("title", "Edit")
44
+ .append($("<i>").addClass("fa fa-edit"));
45
+ this.button_group.append(this.edit_button);
46
+
47
+ this.copy_button = $("<button>")
48
+ .addClass("btn px-2")
49
+ .addClass("copy-button")
50
+ .attr("title", "Copy")
51
+ .append($("<i>").addClass("fa fa-copy"));
52
+ this.button_group.append(this.copy_button);
53
+
54
  if (this.message.role === "user") {
 
 
 
55
  } else {
56
+ this.regenerate_button = $("<button>")
57
+ .addClass("btn px-2")
58
+ .addClass("generate-button")
59
+ .attr("title", "Regenerate")
60
+ .append($("<i>").addClass("fa fa-rotate fa-spin-fast"));
61
+ this.button_group.append(this.regenerate_button);
62
  }
 
 
63
  }
64
  }
65