Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0e93914

Browse files
authored
Some updates from QA (#1124)
1 parent38ae87c commit0e93914

File tree

8 files changed

+73
-23
lines changed

8 files changed

+73
-23
lines changed

‎pgml-dashboard/src/components/accordian/accordian.scss

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@ div[data-controller="accordian"] {
44
}
55

66
.accordian-body {
7-
display:none;
8-
height:0px;
9-
transition:all0.5sease-in-out;
10-
}
11-
12-
.accordian-body.selected {
13-
display:block;
14-
height:auto;
7+
overflow:hidden;
8+
transition:all0.3sease-in-out;
159
}
1610
}
Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,37 @@
11
import{Controller}from"@hotwired/stimulus";
22

33
exportdefaultclassextendsController{
4+
initialize(){
5+
this.bodies=document.getElementsByClassName("accordian-body");
6+
this.headers=document.getElementsByClassName("accordian-header");
7+
8+
this.heights=newMap();
9+
for(leti=0;i<this.bodies.length;i++){
10+
this.heights.set(this.bodies[i],this.bodies[i].offsetHeight);
11+
if(i>0){
12+
this.bodies[i].style.maxHeight="0px";
13+
}else{
14+
this.bodies[i].style.maxHeight=this.bodies[i].offsetHeight+"px";
15+
}
16+
}
17+
}
18+
19+
420
titleClick(e){
521
lettarget=e.currentTarget.getAttribute("data-value");
6-
letelements=document.getElementsByClassName("accordian-body");
7-
for(leti=0;i<elements.length;i++){
8-
elements[i].classList.remove("selected");
9-
}
10-
elements=document.getElementsByClassName("accordian-header");
11-
for(leti=0;i<elements.length;i++){
12-
elements[i].classList.remove("selected");
13-
}
14-
letelement=document.querySelector(`[data-accordian-target="${target}"]`);
15-
element.classList.add("selected");
1622
e.currentTarget.classList.add("selected");
23+
24+
letbody=document.querySelector(`[data-accordian-target="${target}"]`);
25+
body.classList.add("selected");
26+
body.style.maxHeight=this.heights.get(body)+"px";
27+
28+
for(leti=0;i<this.bodies.length;i++){
29+
if(body!=this.bodies[i]){
30+
this.bodies[i].classList.remove("selected");
31+
this.bodies[i].style.maxHeight="0px";
32+
}
33+
if(e.currentTarget!=this.headers[i])
34+
this.headers[i].classList.remove("selected");
35+
}
1736
}
1837
}

‎pgml-dashboard/src/components/chatbot/chatbot.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ div[data-controller="chatbot"] {
5959
}
6060

6161
.chatbot-brain-option-logo {
62-
height:34px;
63-
width:34px;
62+
height:30px;
63+
width:30px;
6464
background-position:center;
6565
background-repeat:no-repeat;
6666
background-size:contain;

‎pgml-dashboard/src/components/chatbot/chatbot_controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const knowledgeBaseIdToName = (knowledgeBase) => {
6565

6666
constcreateKnowledgeBaseNotice=(knowledgeBase)=>{
6767
return`
68-
<divx x-first x-last">1">Chatting with Knowledge Base${knowledgeBaseIdToName(
68+
<divx x-first x-last">3">Chatting with Knowledge Base${knowledgeBaseIdToName(
6969
knowledgeBase,
7070
)}</div>
7171
`;

‎pgml-dashboard/src/components/chatbot/template.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<divid="chatbot"data-controller="chatbot"class="container">
22
<divid="chatbot-inner-wrapper"class="d-flex rounded-3 overflow-hidden">
3-
<divid="chatbot-left-column"class="">
3+
<divid="chatbot-left-column"class="d-none d-sm-block">
44

55
<!-- This is temporary until we have brains -->
66
<h5id="chatbot-change-the-brain-title">Knowledge Base:</h5>
@@ -101,7 +101,7 @@ <h5 id="knowledge-base-title">Knowledge Base:</h5>
101101

102102
<divid="chatbot-right-column"class="flex-grow-1 d-flex flex-column overflow-hidden">
103103
<divclass="d-flex justify-content-between align-items-center pt-3 pb-3 pe-3 m-0">
104-
<h3id="chatbot-chatbot-title">Chatbot</h3>
104+
<h3id="chatbot-chatbot-title"class="mb-0">Chatbot</h3>
105105
<divid="chatbot-expand-contract-image-wrapper"class="p-1 rounded-2"data-action="click->chatbot#handleExpandClick">
106106
<imgid="chatbot-expand-contract-image"width="28px"height="28px"src="/dashboard/static/images/icons/arrow_expanded.svg"/>
107107
</div>

‎pgml-dashboard/src/components/star/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ const SVGS: Lazy<HashMap<&'static str, &'static str>> = Lazy::new(|| {
2626
"give_it_a_spin",
2727
include_str!("../../../static/images/icons/stars/give_it_a_spin.svg"),
2828
);
29+
map.insert(
30+
"give_it_a_spin_outline",
31+
include_str!("../../../static/images/icons/stars/give_it_a_spin_outline.svg"),
32+
);
2933
map
3034
});
3135

Lines changed: 9 additions & 0 deletions
Loading
Lines changed: 24 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp