Skip to content

Commit

Permalink
Select list styling for chatbot
Browse files Browse the repository at this point in the history
  • Loading branch information
polterguy committed Oct 17, 2023
1 parent bafa188 commit 8b33437
Show file tree
Hide file tree
Showing 33 changed files with 313 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -453,3 +453,12 @@
color: #030a0a !important;
opacity:40% !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
9 changes: 9 additions & 0 deletions backend/files/system/openai/front.files/chat/chess.css
Original file line number Diff line number Diff line change
Expand Up @@ -451,3 +451,12 @@
.aista-chat-prompt::placeholder {
color: rgb(180,181,188) !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
9 changes: 9 additions & 0 deletions backend/files/system/openai/front.files/chat/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -402,3 +402,12 @@
.aista-chat-prompt::placeholder {
color: rgb(180,181,188) !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
43 changes: 24 additions & 19 deletions backend/files/system/openai/front.files/chat/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,25 @@ let ainiro_references = [];
// Type or model to use.
let ainiroChatbotType = '[[type]]';

/*
* "API method" for FAQ questions.
*/
window.ainiro_faq_question = function(e) {

const question = e.srcElement.innerHTML;
aista_show_chat_window();
setTimeout(() => {
const prompt = document.getElementsByClassName('aista-chat-prompt')[0];
if (!ainiroQuestionnaire.questions || ainiroQuestionnaire.questions.length === 0) {
prompt.value = question;
prompt.focus();
prompt.select();
}
}, 1);
e.preventDefault();
e.stopPropagation();
}

// Downloading icofont, making sure we only download it once.
if (!window.ainiroHasDownloadIcofont) {
window.ainiroHasDownloadIcofont = true;
Expand Down Expand Up @@ -91,25 +110,6 @@ window.document.getElementsByTagName('head')[0].appendChild(icofontCss);
// Creating our chat UI.
aista_create_chat_ui();

/*
* "API method" for FAQ questions.
*/
window.ainiro_faq_question = function(e) {

const question = e.srcElement.innerHTML;
aista_show_chat_window();
setTimeout(() => {
const prompt = document.getElementsByClassName('aista-chat-prompt')[0];
if (!ainiroQuestionnaire.questions || ainiroQuestionnaire.questions.length === 0) {
prompt.value = question;
prompt.focus();
prompt.select();
}
}, 1);
e.preventDefault();
e.stopPropagation();
}

/*
* Function creating our chat UI.
*/
Expand Down Expand Up @@ -240,6 +240,11 @@ function aista_create_chat_ui() {
const msgs = window.document.getElementsByClassName('aista-chat-msg-container')[0];
msgs.appendChild(row);
}

// Checking if we've got a global callback that should be invoked as we've created our window.
if (window.ainiroInitializeChatWindow) {
window.ainiroInitializeChatWindow();
}
}

function ainiro_create_wait_animation() {
Expand Down
9 changes: 9 additions & 0 deletions backend/files/system/openai/front.files/chat/emerald.css
Original file line number Diff line number Diff line change
Expand Up @@ -455,3 +455,12 @@
color: #030a0a !important;
opacity:40% !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
9 changes: 9 additions & 0 deletions backend/files/system/openai/front.files/chat/frank.css
Original file line number Diff line number Diff line change
Expand Up @@ -450,3 +450,12 @@
color: #030a0a !important;
opacity:40% !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
9 changes: 9 additions & 0 deletions backend/files/system/openai/front.files/chat/galaxy.css
Original file line number Diff line number Diff line change
Expand Up @@ -455,3 +455,12 @@
color: #030a0a !important;
opacity:40% !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
9 changes: 9 additions & 0 deletions backend/files/system/openai/front.files/chat/lollipop.css
Original file line number Diff line number Diff line change
Expand Up @@ -454,3 +454,12 @@
color: #030a0a !important;
opacity:40% !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
Original file line number Diff line number Diff line change
Expand Up @@ -448,3 +448,12 @@
.aista-chat-prompt::placeholder {
color: rgb(180,181,188) !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
Original file line number Diff line number Diff line change
Expand Up @@ -460,3 +460,12 @@
.aista-chat-prompt::placeholder {
color: rgb(198,198,198) !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
9 changes: 9 additions & 0 deletions backend/files/system/openai/front.files/chat/nuomorphism.css
Original file line number Diff line number Diff line change
Expand Up @@ -447,3 +447,12 @@
.aista-chat-prompt::placeholder {
color: rgb(180,181,188) !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
9 changes: 9 additions & 0 deletions backend/files/system/openai/front.files/chat/ocean-bleu.css
Original file line number Diff line number Diff line change
Expand Up @@ -454,3 +454,12 @@
color: #030a0a !important;
opacity:40% !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
9 changes: 9 additions & 0 deletions backend/files/system/openai/front.files/chat/office.css
Original file line number Diff line number Diff line change
Expand Up @@ -419,3 +419,12 @@
.aista-chat-prompt::placeholder {
color: rgb(180,181,188) !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
9 changes: 9 additions & 0 deletions backend/files/system/openai/front.files/chat/parakeet.css
Original file line number Diff line number Diff line change
Expand Up @@ -455,3 +455,12 @@
color: #030a0a !important;
opacity:40% !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
Original file line number Diff line number Diff line change
Expand Up @@ -454,3 +454,12 @@
.aista-chat-prompt::placeholder {
color: rgb(180,181,188) !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
Original file line number Diff line number Diff line change
Expand Up @@ -468,3 +468,12 @@
.aista-chat-close-btn {
display: none !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
Original file line number Diff line number Diff line change
Expand Up @@ -459,3 +459,12 @@
.aista-chat-prompt::placeholder {
color: rgb(180,181,188) !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
Original file line number Diff line number Diff line change
Expand Up @@ -454,3 +454,12 @@
.aista-chat-prompt::placeholder {
color: rgb(180,181,188) !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
Original file line number Diff line number Diff line change
Expand Up @@ -455,3 +455,12 @@
.aista-chat-prompt::placeholder {
color: rgb(180,181,188) !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
Original file line number Diff line number Diff line change
Expand Up @@ -454,3 +454,12 @@
.aista-chat-prompt::placeholder {
color: rgb(180,181,188) !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
Original file line number Diff line number Diff line change
Expand Up @@ -455,3 +455,12 @@
.aista-chat-prompt::placeholder {
color: rgb(180,181,188) !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
Original file line number Diff line number Diff line change
Expand Up @@ -454,3 +454,12 @@
.aista-chat-prompt::placeholder {
color: rgb(180,181,188) !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
Original file line number Diff line number Diff line change
Expand Up @@ -455,3 +455,12 @@
.aista-chat-prompt::placeholder {
color: rgb(180,181,188) !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
Original file line number Diff line number Diff line change
Expand Up @@ -454,3 +454,12 @@
.aista-chat-prompt::placeholder {
color: rgb(180,181,188) !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
Original file line number Diff line number Diff line change
Expand Up @@ -455,3 +455,12 @@
.aista-chat-prompt::placeholder {
color: rgb(180,181,188) !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
Original file line number Diff line number Diff line change
Expand Up @@ -455,3 +455,12 @@
.aista-chat-prompt::placeholder {
color: rgb(180,181,188) !important;
}
.ainiro-select-list {
display: block;
margin: 10px 0;
width: 100%;
padding: 10px;
outline: none;
border-radius: 10px;
border: solid 1px rgba(0,0,0,.3);
}
Loading

0 comments on commit 8b33437

Please sign in to comment.