diff --git a/templates/index.html b/templates/index.html index 2b6294a..d8245bf 100644 --- a/templates/index.html +++ b/templates/index.html @@ -26,8 +26,10 @@ .protocol-icon { margin-right: 5px; height: 16px; width: 16px; vertical-align: middle; } .connection-link { color: blue; text-decoration: underline; cursor: pointer; } .edit-button { display: none; position: absolute; right: 5px; top: 50%; transform: translateY(-50%); background: #007bff; color: white; border: none; padding: 2px 5px; border-radius: 3px; cursor: pointer; } - .edit-button:hover { background: #0056b3; } + .copy-button { display: none; position: absolute; right: 25px; top: 50%; transform: translateY(-50%); background: #28a745; color: white; border: none; padding: 2px 5px; border-radius: 3px; cursor: pointer; } + .copy-button:hover { background: #218838; } .install-item:hover .edit-button { display: inline-block; } + .install-item:hover .copy-button { display: inline-block; } .action-buttons { display: none; } .install-item:hover .action-buttons { display: inline; } #import-form { margin-top: 5px; } @@ -162,6 +164,16 @@ parent: folder.parent_id ? folder.parent_id : "root" }))); cb(treeData); + + // Автоматически выбираем папку "Несортированные" после загрузки дерева + const unsortedFolder = data.find(f => f.name === 'Несортированные'); + if (unsortedFolder) { + setTimeout(() => { + $('#folder-tree').jstree('select_node', unsortedFolder.id); + loadInstalls(unsortedFolder.id); + updateFolderActions(); + }, 100); // Задержка для инициализации jstree + } }); }, 'check_callback': true @@ -261,6 +273,7 @@