mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
CSS adjustments and user script formatting
This commit is contained in:
@@ -7471,10 +7471,11 @@ def UI_2_load_userscripts_list(data):
|
||||
column_widths=['200px', '150px', 'auto'])
|
||||
|
||||
def valid_userscripts_to_load(file):
|
||||
return file.endswith(".lua") and file not in koboldai_vars.userscripts
|
||||
print("{} is valid: {}".format(file, file.endswith(".lua") and os.path.basename(file) not in koboldai_vars.userscripts))
|
||||
return file.endswith(".lua") and os.path.basename(file) not in koboldai_vars.userscripts
|
||||
|
||||
def valid_userscripts_to_unload(file):
|
||||
return file.endswith(".lua") and file in koboldai_vars.userscripts
|
||||
return file.endswith(".lua") and os.path.basename(file) in koboldai_vars.userscripts
|
||||
|
||||
def get_userscripts_desc(item_full_path, item, valid_selection):
|
||||
if not valid_selection:
|
||||
|
@@ -232,6 +232,24 @@ input[type="range"]::-ms-fill-upper {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.setting_container_single_wide {
|
||||
display: grid;
|
||||
grid-template-areas: "label"
|
||||
"item";
|
||||
grid-template-rows: 20px auto;
|
||||
grid-template-columns: 354px;
|
||||
row-gap: 0.2em;
|
||||
background-color: var(--setting_background);
|
||||
color: var(--text);
|
||||
border-radius: var(--radius_settings_background);
|
||||
padding: 3px;
|
||||
margin: 2px;
|
||||
}
|
||||
.setting_container_single_wide .setting_item{
|
||||
font-size: calc(0.93em + var(--font_size_adjustment));
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
|
||||
.setting_minlabel {
|
||||
padding-top: 6px;
|
||||
@@ -1051,7 +1069,7 @@ body {
|
||||
background-color: var(--gamescreen_background);
|
||||
z-index: 2;
|
||||
box-shadow: var(--light_shadow_value);
|
||||
color: white;
|
||||
color: var(--text);
|
||||
width: 100%;
|
||||
grid-area: gamescreen;
|
||||
display: flex;
|
||||
|
@@ -645,7 +645,7 @@ function popup_items(data) {
|
||||
for (i=0; i < data.column_widths.length; i++) {
|
||||
style = style + " p"+i;
|
||||
}
|
||||
style = style + '"; grid-template-columns: 30px';
|
||||
style = style + '"; grid-template-columns: 50px';
|
||||
for (column_width of data.column_widths) {
|
||||
style = style + " "+column_width;
|
||||
}
|
||||
|
@@ -177,18 +177,20 @@
|
||||
<span class="setting_minlabel"><span style="top: -4px; position: relative;"></span></span>
|
||||
<span class="setting_maxlabel"><span style="top: -4px; position: relative;"></span></span>
|
||||
</div>
|
||||
<div class="setting_container_single">
|
||||
<div class="setting_container_single_wide">
|
||||
<!---Top Row---->
|
||||
<span class="setting_label">
|
||||
<span style="white-space: pre-wrap;">User Scripts: </span>
|
||||
<span style="white-space: pre-wrap;">Enabled User Scripts: </span>
|
||||
<span class="helpicon material-icons-outlined" title="Allows for user scripts that modify the way the game functions">help_icon</span>
|
||||
</span>
|
||||
<!---Bottom Row---->
|
||||
<span class="setting_item">
|
||||
<div style="display: flex;flex-direction: row;">
|
||||
<select id="loaded_userscripts" class="var_sync_system_userscripts settings_select" multiple></select>
|
||||
<span class="material-icons-outlined cursor" style="font-size: 18px;" title="Unload File(s)" onclick="unload_userscripts();">delete</span>
|
||||
<span class="material-icons-outlined cursor" style="font-size: 18px;" title="Load File" onclick="socket.emit('load_userscripts_list', '');">upload_file</span>
|
||||
<select id="loaded_userscripts" class="var_sync_system_userscripts settings_select" multiple style="width:300px;"></select>
|
||||
<div style="display: flex;flex-direction: column;">
|
||||
<span class="material-icons-outlined cursor" style="font-size: 24px;" title="Unload File(s)" onclick="unload_userscripts();">delete</span>
|
||||
<span class="material-icons-outlined cursor" style="font-size: 24px;" title="Load File" onclick="socket.emit('load_userscripts_list', '');">upload_file</span>
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
<!---Slider Labels--->
|
||||
|
@@ -49,7 +49,7 @@ local example_config = [[# Phrase bias
|
||||
# case-sensitive, with a leading space, to appear in the output, with the
|
||||
# bias increasing as each consecutive token in that phrase appears):
|
||||
# 7, 25.4, 1309, 262, 3809, 286, 1842, 1011, 345, 2440
|
||||
#
|
||||
# #
|
||||
]]
|
||||
|
||||
-- If config file is empty, write example config
|
||||
|
Reference in New Issue
Block a user