mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Merge branch 'UI2' of https://github.com/ebolam/KoboldAI into UI2
This commit is contained in:
@@ -5187,11 +5187,11 @@ let load_substitutions;
|
||||
/* -- Tooltips -- */
|
||||
function initalizeTooltips() {
|
||||
const tooltip = $e("span", document.body, {id: "tooltip-text", "style.display": "none"});
|
||||
let tooltipActive = false;
|
||||
let tooltipTarget = null;
|
||||
|
||||
function alterTooltipState(enabled, specialClass=null) {
|
||||
tooltipActive = enabled;
|
||||
tooltip.style.display = enabled ? "block" : "none";
|
||||
function alterTooltipState(target, specialClass=null) {
|
||||
tooltipTarget = target;
|
||||
tooltip.style.display = target ? "block" : "none";
|
||||
tooltip.className = specialClass || "";
|
||||
}
|
||||
|
||||
@@ -5206,11 +5206,11 @@ function initalizeTooltips() {
|
||||
// Kinda lame
|
||||
if (this.classList.contains("context-token")) specialClass = "tooltip-context-token";
|
||||
|
||||
alterTooltipState(true, specialClass);
|
||||
alterTooltipState(el, specialClass);
|
||||
});
|
||||
|
||||
el.addEventListener("mouseleave", function(event) {
|
||||
alterTooltipState(false);
|
||||
alterTooltipState(null);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -5218,7 +5218,7 @@ function initalizeTooltips() {
|
||||
const yOffset = 15;
|
||||
|
||||
document.addEventListener("mousemove", function(event) {
|
||||
if (!tooltipActive) return;
|
||||
if (!tooltipTarget) return;
|
||||
|
||||
let [x, y] = [event.x, event.y];
|
||||
|
||||
@@ -5256,6 +5256,9 @@ function initalizeTooltips() {
|
||||
continue;
|
||||
}
|
||||
|
||||
// If we remove the tooltip target, stop showing the tooltip. Maybe a little ineffecient.
|
||||
if (!document.body.contains(tooltipTarget)) alterTooltipState(null);
|
||||
|
||||
for (const node of record.addedNodes) {
|
||||
if (node.nodeType !== 1) continue;
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Name: Darkness
|
||||
Author: LightSaveUs
|
||||
Version: 0.4
|
||||
Version: 0.4.1
|
||||
Description: A theme inspired by the AI Dungeon interface.
|
||||
*/
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
/*World Info*/
|
||||
--wi_card_border_color: #333333;
|
||||
--wi_card_border_color_to_ai: #333333;
|
||||
--wi_card_border_color_to_ai: #1e6d6aa1;
|
||||
|
||||
--wi_card_bg_color: #242424;
|
||||
--wi_card_text_color: #e0e0e0;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Name: Monochrome
|
||||
Author: LightSaveUs
|
||||
Version: 0.7
|
||||
Version: 0.7.1
|
||||
Description: A theme inspired by the NovelAI interface.
|
||||
*/
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
/*World Info*/
|
||||
--wi_card_border_color: #334552;
|
||||
--wi_card_border_color_to_ai: #334552;
|
||||
--wi_card_border_color_to_ai: #eedcb880;
|
||||
|
||||
--wi_card_bg_color: #223040;
|
||||
--wi_card_text_color: #e0e0e0;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Name: Nostalgia
|
||||
Author: LightSaveUs
|
||||
Version: 0.3
|
||||
Version: 0.3.1
|
||||
Description: A theme inspired by the old KoboldAI interface.
|
||||
*/
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
/*World Info*/
|
||||
--wi_card_border_color: #1e1e1e;
|
||||
--wi_card_border_color_to_ai: #1e1e1e00;
|
||||
--wi_card_border_color_to_ai: #3bf72380;
|
||||
|
||||
--wi_card_bg_color: #1e1e1e;
|
||||
--wi_card_text_color: #ffffff;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Name: Unicorn
|
||||
Author: LightSaveUs
|
||||
Version: 0.4
|
||||
Version: 0.4.1
|
||||
Description: A theme inspired by the DreamilyAI interface.
|
||||
*/
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
|
||||
/*World Info*/
|
||||
--wi_card_border_color: #acacac;
|
||||
--wi_card_border_color_to_ai: #acacac;
|
||||
--wi_card_border_color_to_ai: #e2677180;
|
||||
|
||||
--wi_card_bg_color: #ebebeb;
|
||||
--wi_card_text_color: #5c5c5c;
|
||||
|
@@ -3,3 +3,7 @@
|
||||
color: inherit;
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
.world_info_card.used_in_game {
|
||||
border: 2px outset var(--wi_card_border_color);
|
||||
}
|
||||
|
Reference in New Issue
Block a user