fix file batch deletion
This commit is contained in:
@@ -127,7 +127,9 @@ export class ViewManager {
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 40px;"></th>
|
||||
<th style="width: 40px;">
|
||||
<input type="checkbox" class="form-check-input select-all-checkbox" style="margin: 0;">
|
||||
</th>
|
||||
<th style="width: 40px;"></th>
|
||||
<th>Name</th>
|
||||
<th>Size</th>
|
||||
@@ -151,7 +153,14 @@ export class ViewManager {
|
||||
async renderGridView(files) {
|
||||
console.log('[ViewManager] Rendering grid view');
|
||||
const fileGrid = document.getElementById('fileGrid');
|
||||
let html = '';
|
||||
let html = `
|
||||
<div class="col-12 mb-3">
|
||||
<div class="d-flex align-items-center">
|
||||
<input type="checkbox" class="form-check-input select-all-checkbox me-2" style="margin: 0;">
|
||||
<span class="text-muted">Select All</span>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
files.forEach((file, index) => {
|
||||
console.log('[ViewManager] Rendering grid item:', file);
|
||||
@@ -170,10 +179,11 @@ export class ViewManager {
|
||||
const modified = new Date(file.modified).toLocaleString();
|
||||
|
||||
return `
|
||||
<tr data-index="${index}" class="file-row" style="cursor: pointer;">
|
||||
<tr data-index="${index}" class="file-row" style="cursor: pointer;" onclick="window.roomManager.fileManager.updateSelection(${index}, event)">
|
||||
<td>
|
||||
<input type="checkbox" class="form-check-input select-item-checkbox"
|
||||
data-index="${index}" style="margin: 0;">
|
||||
data-index="${index}" style="margin: 0;"
|
||||
onclick="event.stopPropagation(); window.roomManager.fileManager.updateSelection(${index}, event)">
|
||||
</td>
|
||||
<td>
|
||||
<i class="fas ${icon}" style="font-size:1.5rem;color:${isFolder ? 'var(--primary-color)' : 'var(--secondary-color)'}"></i>
|
||||
@@ -201,8 +211,13 @@ export class ViewManager {
|
||||
|
||||
return `
|
||||
<div class="col-12 col-sm-6 col-md-4 col-lg-3 mb-3">
|
||||
<div class="card file-card h-100 border-0 shadow-sm position-relative" data-index="${index}">
|
||||
<div class="card file-card h-100 border-0 shadow-sm position-relative" data-index="${index}" onclick="window.roomManager.fileManager.updateSelection(${index}, event)">
|
||||
<div class="card-body d-flex flex-column align-items-center justify-content-center text-center p-4">
|
||||
<div class="mb-2 w-100 d-flex justify-content-start">
|
||||
<input type="checkbox" class="form-check-input select-item-checkbox"
|
||||
data-index="${index}" style="margin: 0;"
|
||||
onclick="event.stopPropagation(); window.roomManager.fileManager.updateSelection(${index}, event)">
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<i class="fas ${icon}" style="font-size:2.5rem;color:${isFolder ? 'var(--primary-color)' : 'var(--secondary-color)'};"></i>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user