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

Some updates from QA#1124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
SilasMarvin merged 1 commit intomasterfromsilas-home-updates
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletionspgml-dashboard/src/components/accordian/accordian.scss
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,13 +4,7 @@ div[data-controller="accordian"] {
}

.accordian-body {
display: none;
height: 0px;
transition: all 0.5s ease-in-out;
}

.accordian-body.selected {
display: block;
height: auto;
overflow: hidden;
transition: all 0.3s ease-in-out;
}
}
39 changes: 29 additions & 10 deletionspgml-dashboard/src/components/accordian/accordian_controller.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,37 @@
import { Controller } from "@hotwired/stimulus";

export default class extends Controller {
initialize() {
this.bodies = document.getElementsByClassName("accordian-body");
this.headers = document.getElementsByClassName("accordian-header");

this.heights = new Map();
for (let i = 0; i < this.bodies.length; i++) {
this.heights.set(this.bodies[i], this.bodies[i].offsetHeight);
if (i > 0) {
this.bodies[i].style.maxHeight = "0px";
} else {
this.bodies[i].style.maxHeight = this.bodies[i].offsetHeight + "px";
}
}
}


titleClick(e) {
let target = e.currentTarget.getAttribute("data-value");
let elements = document.getElementsByClassName("accordian-body");
for (let i = 0; i < elements.length; i++) {
elements[i].classList.remove("selected");
}
elements = document.getElementsByClassName("accordian-header");
for (let i = 0; i < elements.length; i++) {
elements[i].classList.remove("selected");
}
let element = document.querySelector(`[data-accordian-target="${target}"]`);
element.classList.add("selected");
e.currentTarget.classList.add("selected");

let body = document.querySelector(`[data-accordian-target="${target}"]`);
body.classList.add("selected");
body.style.maxHeight = this.heights.get(body) + "px";

for (let i = 0; i < this.bodies.length; i++) {
if (body != this.bodies[i]) {
this.bodies[i].classList.remove("selected");
this.bodies[i].style.maxHeight = "0px";
}
if (e.currentTarget != this.headers[i])
this.headers[i].classList.remove("selected");
}
}
}
4 changes: 2 additions & 2 deletionspgml-dashboard/src/components/chatbot/chatbot.scss
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,8 +59,8 @@ div[data-controller="chatbot"] {
}

.chatbot-brain-option-logo {
height:34px;
width:34px;
height:30px;
width:30px;
background-position: center;
background-repeat: no-repeat;
background-size: contain;
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -65,7 +65,7 @@ const knowledgeBaseIdToName = (knowledgeBase) => {

const createKnowledgeBaseNotice = (knowledgeBase) => {
return `
<div class="chatbot-knowledge-base-notice text-center p-1">Chatting with Knowledge Base ${knowledgeBaseIdToName(
<div class="chatbot-knowledge-base-notice text-center p-3">Chatting with Knowledge Base ${knowledgeBaseIdToName(
knowledgeBase,
)}</div>
`;
Expand Down
4 changes: 2 additions & 2 deletionspgml-dashboard/src/components/chatbot/template.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
<div id="chatbot" data-controller="chatbot" class="container">
<div id="chatbot-inner-wrapper" class="d-flex rounded-3 overflow-hidden">
<div id="chatbot-left-column" class="">
<div id="chatbot-left-column" class="d-none d-sm-block">

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

<div id="chatbot-right-column" class="flex-grow-1 d-flex flex-column overflow-hidden">
<div class="d-flex justify-content-between align-items-center pt-3 pb-3 pe-3 m-0">
<h3 id="chatbot-chatbot-title">Chatbot</h3>
<h3 id="chatbot-chatbot-title" class="mb-0">Chatbot</h3>
<div id="chatbot-expand-contract-image-wrapper" class="p-1 rounded-2" data-action="click->chatbot#handleExpandClick">
<img id="chatbot-expand-contract-image" width="28px" height="28px" src="/dashboard/static/images/icons/arrow_expanded.svg"/>
</div>
Expand Down
4 changes: 4 additions & 0 deletionspgml-dashboard/src/components/star/mod.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,6 +26,10 @@ const SVGS: Lazy<HashMap<&'static str, &'static str>> = Lazy::new(|| {
"give_it_a_spin",
include_str!("../../../static/images/icons/stars/give_it_a_spin.svg"),
);
map.insert(
"give_it_a_spin_outline",
include_str!("../../../static/images/icons/stars/give_it_a_spin_outline.svg"),
);
map
});

Expand Down
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

[8]ページ先頭

©2009-2025 Movatter.jp