feat(chat): multi-session chat support (up to 15), human-like auto-titling, line-clamp titles and sorted registries
This commit is contained in:
@@ -30,7 +30,8 @@ async function loadModals() {
|
||||
'profile_modal.html',
|
||||
'admin_modal.html',
|
||||
'snapshot_inspector_modal.html',
|
||||
'presence_modal.html'
|
||||
'presence_modal.html',
|
||||
'confirm_modal.html'
|
||||
];
|
||||
|
||||
const container = document.getElementById('modals-container');
|
||||
@@ -102,6 +103,7 @@ async function handleLoginSubmit(e) {
|
||||
hideAuthModal();
|
||||
updateUIState();
|
||||
if (window.SidebarManager) SidebarManager.switchTab('tasks');
|
||||
if (window.TopicsManager && typeof window.TopicsManager.init === 'function') window.TopicsManager.init();
|
||||
} else {
|
||||
const err = await res.json();
|
||||
if (errEl) {
|
||||
@@ -249,7 +251,7 @@ async function deleteAdminUser(id, username) {
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// 4. ВСПОМОГАТЕЛЬНЫЕ ФОРМАТЕРЫ И МОДАЛКА УДАЛЕНЩИКОВ
|
||||
// 4. ВСПОМОГАТЕЛЬНЫЕ ФОРМАТЕРЫ И МОДАЛКА УДАЛЕНЩИКОВ (ИЗ СНАПШОТА)
|
||||
// ============================================================================
|
||||
function dmyToYmd(str) {
|
||||
if (!str) return "";
|
||||
@@ -383,7 +385,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
||||
setupStaffAutocomplete(rwFioInput, "rw-fio-suggestions");
|
||||
}
|
||||
|
||||
//3.1 Автокомплит для местных командировок и иного
|
||||
// 3.1 Автокомплит для местных командировок и иного
|
||||
const maFioInput = document.getElementById("manual-absence-fio-input");
|
||||
if (maFioInput && typeof setupStaffAutocomplete === "function") {
|
||||
setupStaffAutocomplete(maFioInput, "manual-absence-suggestions");
|
||||
@@ -399,11 +401,11 @@ document.addEventListener("DOMContentLoaded", async () => {
|
||||
});
|
||||
}
|
||||
|
||||
// 5. Проверка сессии пользователя
|
||||
// 5. Проверка сессии пользователя и запуск менеджеров
|
||||
if (IS_GUEST) {
|
||||
hideAuthModal();
|
||||
updateUIState();
|
||||
} else if (AuthManager && AuthManager.isAuthenticated()) {
|
||||
} else if (typeof AuthManager !== 'undefined' && AuthManager.isAuthenticated()) {
|
||||
hideAuthModal();
|
||||
updateUIState();
|
||||
if (typeof loadTasks === "function") {
|
||||
@@ -412,6 +414,9 @@ document.addEventListener("DOMContentLoaded", async () => {
|
||||
if (window.SidebarManager) {
|
||||
SidebarManager.init();
|
||||
}
|
||||
if (window.TopicsManager && typeof window.TopicsManager.init === "function") {
|
||||
TopicsManager.init();
|
||||
}
|
||||
} else {
|
||||
showAuthModal();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user