bunnyquery 1.5.2 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bunnyquery.js +22 -12
- package/package.json +1 -1
package/bunnyquery.js
CHANGED
|
@@ -2213,7 +2213,7 @@ ${options.inlineContentPlaceholder}
|
|
|
2213
2213
|
(function() {
|
|
2214
2214
|
var MCP_PROD = "https://mcp.broadwayinc.computer";
|
|
2215
2215
|
var MCP_DEV = "https://mcp-dev.broadwayinc.computer";
|
|
2216
|
-
var BQ_VERSION = "1.5.
|
|
2216
|
+
var BQ_VERSION = "1.5.3" ;
|
|
2217
2217
|
var ATTACHMENT_URL_EXPIRES_SECONDS = 600;
|
|
2218
2218
|
var GOOGLE_AUTH_URL = "https://accounts.google.com/o/oauth2/v2/auth";
|
|
2219
2219
|
var GOOGLE_TOKEN_URL = "https://oauth2.googleapis.com/token";
|
|
@@ -4201,7 +4201,7 @@ ${options.inlineContentPlaceholder}
|
|
|
4201
4201
|
return (reindex ? "Reindexing: " : "Indexing: ") + nameLabel + (extras.length ? " \xB7 " + extras.join(" \xB7 ") : "");
|
|
4202
4202
|
}
|
|
4203
4203
|
function sanitizeStorageSegment(name) {
|
|
4204
|
-
var n = String(name == null ? "file" : name).trim().replace(/[
|
|
4204
|
+
var n = String(name == null ? "file" : name).normalize("NFC").trim().replace(/[^\p{L}\p{N}._ -]+/gu, "_").replace(/ {2,}/g, " ").replace(/_{2,}/g, "_").replace(/^[_ ]+/, "");
|
|
4205
4205
|
return n || "file";
|
|
4206
4206
|
}
|
|
4207
4207
|
function attachmentStoragePath(relPath) {
|
|
@@ -4646,6 +4646,12 @@ ${options.inlineContentPlaceholder}
|
|
|
4646
4646
|
row.appendChild(removeAll);
|
|
4647
4647
|
}
|
|
4648
4648
|
}
|
|
4649
|
+
function uploadsFrozenForUser() {
|
|
4650
|
+
var conf = S.service && S.service.conf || {};
|
|
4651
|
+
if (!conf.freeze_database) return false;
|
|
4652
|
+
var ag = S.user && typeof S.user.access_group === "number" ? S.user.access_group : 0;
|
|
4653
|
+
return ag < 99;
|
|
4654
|
+
}
|
|
4649
4655
|
function updateComposerControls() {
|
|
4650
4656
|
var uploading = CS.uploadingAttachments;
|
|
4651
4657
|
if (CS.attachBtnEl) CS.attachBtnEl.disabled = uploading;
|
|
@@ -5069,15 +5075,19 @@ ${options.inlineContentPlaceholder}
|
|
|
5069
5075
|
requestAnimationFrame(function() {
|
|
5070
5076
|
autoGrowInput(input);
|
|
5071
5077
|
});
|
|
5072
|
-
var
|
|
5073
|
-
attachFileInput
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5078
|
+
var attachDisabled = uploadsFrozenForUser();
|
|
5079
|
+
var attachFileInput = null, attachBtn = null;
|
|
5080
|
+
if (!attachDisabled) {
|
|
5081
|
+
attachFileInput = h("input", { class: "bq-attach-input", type: "file", multiple: "multiple" });
|
|
5082
|
+
attachFileInput.addEventListener("change", function() {
|
|
5083
|
+
onAttachInputChange(attachFileInput);
|
|
5084
|
+
});
|
|
5085
|
+
attachBtn = h("button", { class: "bq-attach-btn", type: "button", title: "Attach files", html: ATTACH_ICON_SVG });
|
|
5086
|
+
attachBtn.addEventListener("click", function() {
|
|
5087
|
+
attachFileInput.click();
|
|
5088
|
+
});
|
|
5089
|
+
CS.attachBtnEl = attachBtn;
|
|
5090
|
+
}
|
|
5081
5091
|
var attachmentsRow = h("div", { class: "bq-attachments" });
|
|
5082
5092
|
attachmentsRow.style.display = "none";
|
|
5083
5093
|
CS.attachmentsRow = attachmentsRow;
|
|
@@ -5096,7 +5106,7 @@ ${options.inlineContentPlaceholder}
|
|
|
5096
5106
|
chatArea = h("div", { class: "bq-chat" }, box, composer);
|
|
5097
5107
|
CS.chatEl = chatArea;
|
|
5098
5108
|
CS.composerEl = composer;
|
|
5099
|
-
setupDragAndDrop(chatArea);
|
|
5109
|
+
if (!attachDisabled) setupDragAndDrop(chatArea);
|
|
5100
5110
|
return h("div", { class: "bq-meta" }, header, chatArea);
|
|
5101
5111
|
});
|
|
5102
5112
|
if (S.aiPlatform === "none") return;
|