Доавление векторного поиска и репликации

This commit is contained in:
2026-01-29 00:42:30 +03:00
parent 09d5739256
commit 9f814e7271
19 changed files with 450 additions and 73 deletions
+2 -2
View File
@@ -242,7 +242,7 @@ $(document).ready(() => {
return;
}
if (!parseInt(pageCount)) {
if (!pageCount) {
Utils.showToast("Введите количество страниц", "error");
return;
}
@@ -253,7 +253,7 @@ $(document).ready(() => {
const bookPayload = {
title: title,
description: description || null,
page_count: pageCount ? parseInt(pageCount) : null,
page_count: pageCount,
};
const createdBook = await Api.post("/api/books/", bookPayload);
+2 -2
View File
@@ -331,7 +331,7 @@ $(document).ready(() => {
const title = $titleInput.val().trim();
const description = $descInput.val().trim();
const pages = $pagesInput.val();
const pages = parseInt($("#book-page-count").val()) || null;
const status = $statusSelect.val();
if (!title) {
@@ -343,7 +343,7 @@ $(document).ready(() => {
if (title !== originalBook.title) payload.title = title;
if (description !== (originalBook.description || ""))
payload.description = description || null;
if (pageCount !== originalBook.page_count) payload.page_count = pages;
if (pages !== originalBook.page_count) payload.page_count = pages;
if (status !== originalBook.status) payload.status = status;
if (Object.keys(payload).length === 0) {