mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Popup fixes
This commit is contained in:
@@ -8781,7 +8781,7 @@ def UI_2_load_userscripts_list(data):
|
|||||||
deleteable=True, show_breadcrumbs=False, item_check=valid_userscripts_to_load,
|
deleteable=True, show_breadcrumbs=False, item_check=valid_userscripts_to_load,
|
||||||
valid_only=True, hide_extention=True, extra_parameter_function=get_userscripts_desc,
|
valid_only=True, hide_extention=True, extra_parameter_function=get_userscripts_desc,
|
||||||
column_names=['Module Name', 'Description'],
|
column_names=['Module Name', 'Description'],
|
||||||
show_filename=True, show_folders=False,
|
show_filename=False, show_folders=False,
|
||||||
column_widths=['150px', 'auto'])
|
column_widths=['150px', 'auto'])
|
||||||
|
|
||||||
@logger.catch
|
@logger.catch
|
||||||
|
@@ -971,8 +971,7 @@ function redrawPopup() {
|
|||||||
let gridIndex = 0;
|
let gridIndex = 0;
|
||||||
if (row.showFilename) {
|
if (row.showFilename) {
|
||||||
let popup_item = document.createElement("span");
|
let popup_item = document.createElement("span");
|
||||||
popup_item.style = `overflow-x: hidden; grid-area: p${gridIndex};`;
|
popup_item.style = `overflow-x: hidden; grid-area: file;`;
|
||||||
gridIndex += 1;
|
|
||||||
|
|
||||||
popup_item.id = row.path;
|
popup_item.id = row.path;
|
||||||
popup_item.setAttribute("folder", row.isFolder);
|
popup_item.setAttribute("folder", row.isFolder);
|
||||||
@@ -1111,7 +1110,7 @@ function popup_items(data) {
|
|||||||
dataRow.path = item[1];
|
dataRow.path = item[1];
|
||||||
dataRow.fileName = item[2];
|
dataRow.fileName = item[2];
|
||||||
dataRow.isValid = item[3];
|
dataRow.isValid = item[3];
|
||||||
dataRow.showFilename = item.show_filename;
|
dataRow.showFilename = data.show_filename;
|
||||||
|
|
||||||
popup_rows.push(dataRow);
|
popup_rows.push(dataRow);
|
||||||
}
|
}
|
||||||
@@ -1126,15 +1125,17 @@ function popup_items(data) {
|
|||||||
|
|
||||||
//create the column widths
|
//create the column widths
|
||||||
popup_style = 'display: grid; grid-template-areas: "icons';
|
popup_style = 'display: grid; grid-template-areas: "icons';
|
||||||
|
if (data.show_filename) {
|
||||||
|
popup_style += ' file';
|
||||||
|
}
|
||||||
for (let i=0; i < data.column_widths.length; i++) {
|
for (let i=0; i < data.column_widths.length; i++) {
|
||||||
popup_style += ` p${i}`;
|
popup_style += ` p${i}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.show_filename) {
|
|
||||||
popup_style += ` p${i}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
popup_style += '"; grid-template-columns: 50px';
|
popup_style += '"; grid-template-columns: 50px';
|
||||||
|
if (data.show_filename) {
|
||||||
|
popup_style += ' 100px';
|
||||||
|
}
|
||||||
for (const column_width of data.column_widths) {
|
for (const column_width of data.column_widths) {
|
||||||
popup_style += " "+column_width;
|
popup_style += " "+column_width;
|
||||||
}
|
}
|
||||||
@@ -1155,8 +1156,7 @@ function popup_items(data) {
|
|||||||
td = document.createElement("span");
|
td = document.createElement("span");
|
||||||
td.textContent = "File Name";
|
td.textContent = "File Name";
|
||||||
td.classList.add("table-header-container")
|
td.classList.add("table-header-container")
|
||||||
td.style = "overflow-x: hidden; grid-area: p"+i+";";
|
td.style = "overflow-x: hidden; grid-area: file;";
|
||||||
i+=1;
|
|
||||||
tr.append(td)
|
tr.append(td)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user