mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Added code to set option width to 0 if not used (gen amount=1 and no options to show).
This commit is contained in:
@@ -43,10 +43,10 @@
|
||||
--wi_card_bg_color: #262626;
|
||||
--wi_card_tag_bg_color: #404040;
|
||||
--wi_tag_color: #337ab7;
|
||||
|
||||
--story_options_size: 30%;
|
||||
--story_pinned_areas: "menuicon options gamescreen lefticon"
|
||||
"menuicon inputrow inputrow lefticon";
|
||||
--story_pinned_area_widths: 30px 30% auto 30px;
|
||||
--story_pinned_area_widths: 30px var(--story_options_size) auto 30px;
|
||||
}
|
||||
|
||||
/*----------------Folder Tabs--------------------*/
|
||||
@@ -598,7 +598,7 @@ body {
|
||||
margin-right: var(--flyout_menu_closed_width);
|
||||
grid-template-areas: "menuicon gamescreen options lefticon"
|
||||
"menuicon inputrow inputrow lefticon";
|
||||
grid-template-columns: 30px auto 30% 30px;
|
||||
grid-template-columns: 30px auto var(--story_options_size) 30px;
|
||||
grid-template-rows: auto 100px;
|
||||
}
|
||||
.main-grid.settings_pinned {
|
||||
@@ -615,7 +615,7 @@ body {
|
||||
margin-right: var(--flyout_menu_width);
|
||||
grid-template-areas: "menuicon gamescreen options lefticon"
|
||||
"menuicon inputrow inputrow lefticon";
|
||||
grid-template-columns: 30px auto 30% 30px;
|
||||
grid-template-columns: 30px auto var(--story_options_size) 30px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -401,6 +401,17 @@ function var_changed(data) {
|
||||
}
|
||||
}
|
||||
|
||||
//if we changed the gen amount, make sure our option area is set/not set
|
||||
if ((data.classname == 'model') && (data.name == 'numseqs')) {
|
||||
if (data.value == 1) {
|
||||
var r = document.querySelector(':root');
|
||||
r.style.setProperty('--story_options_size', 'fit-content(30%)');
|
||||
} else {
|
||||
var r = document.querySelector(':root');
|
||||
r.style.setProperty('--story_options_size', '30%');
|
||||
}
|
||||
}
|
||||
|
||||
//if we're updating generated tokens, let's show that in our status bar
|
||||
if ((data.classname == 'model') && (data.name == 'tqdm_progress')) {
|
||||
update_status_bar(data);
|
||||
@@ -1380,12 +1391,12 @@ function options_on_right(data) {
|
||||
if (data) {
|
||||
setCookie("options_on_right", "true");
|
||||
r.style.setProperty('--story_pinned_areas', '"menuicon gamescreen options lefticon"\n"menuicon inputrow inputrow lefticon"');
|
||||
r.style.setProperty('--story_pinned_area_widths', '30px auto 30% 30px');
|
||||
r.style.setProperty('--story_pinned_area_widths', '30px auto var(--story_options_size) 30px');
|
||||
document.getElementById('preserve_game_space_setting').checked = true;
|
||||
} else {
|
||||
setCookie("options_on_right", "false");
|
||||
r.style.setProperty('--story_pinned_areas', '"menuicon options gamescreen lefticon"\n"menuicon inputrow inputrow lefticon"');
|
||||
r.style.setProperty('--story_pinned_area_widths', '30px 30% auto 30px');
|
||||
r.style.setProperty('--story_pinned_area_widths', '30px var(--story_options_size) auto 30px');
|
||||
document.getElementById('preserve_game_space_setting').checked = false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user