555555
This commit is contained in:
24
favicon.svg
24
favicon.svg
@@ -1,14 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
||||
<!-- Background -->
|
||||
<rect width="64" height="64" rx="12" fill="#0A84FF"/>
|
||||
<!-- Фон -->
|
||||
<rect width="64" height="64" rx="16" fill="#1d4ed8"/>
|
||||
|
||||
<!-- Database cylinder -->
|
||||
<ellipse cx="32" cy="18" rx="18" ry="8" fill="white"/>
|
||||
<rect x="14" y="18" width="36" height="20" fill="white"/>
|
||||
<ellipse cx="32" cy="38" rx="18" ry="8" fill="white"/>
|
||||
|
||||
<!-- Lines (data layers) -->
|
||||
<ellipse cx="32" cy="26" rx="14" ry="5" fill="#0A84FF"/>
|
||||
<ellipse cx="32" cy="34" rx="14" ry="5" fill="#0A84FF"/>
|
||||
<!-- Иконка базы данных -->
|
||||
<g fill="none" stroke="white" stroke-width="3">
|
||||
<!-- Верх -->
|
||||
<ellipse cx="32" cy="20" rx="12" ry="6"/>
|
||||
|
||||
<!-- Боковые линии -->
|
||||
<path d="M20 20v16c0 3.3 5.4 6 12 6s12-2.7 12-6V20"/>
|
||||
|
||||
<!-- Средние линии -->
|
||||
<path d="M20 28c0 3.3 5.4 6 12 6s12-2.7 12-6"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 542 B After Width: | Height: | Size: 513 B |
14
index.html
14
index.html
@@ -583,15 +583,8 @@ SELECT * FROM users LIMIT 10;"></textarea>
|
||||
const filterInputs = document.getElementById('filterInputs');
|
||||
const body = document.getElementById('tableBody');
|
||||
|
||||
if (records.length === 0) {
|
||||
headers.innerHTML = '';
|
||||
filterInputs.innerHTML = '';
|
||||
body.innerHTML = '<tr><td colspan="100%" class="text-center py-8 text-slate-500">Нет данных</td></tr>';
|
||||
return;
|
||||
}
|
||||
|
||||
// Generate headers
|
||||
const columns = Object.keys(records[0]);
|
||||
const columns = records.length > 0 ? Object.keys(records[0]) : this.tableStructure.map(col => col.name);
|
||||
headers.innerHTML = columns.map(col => {
|
||||
const isSorted = this.sortColumn === col;
|
||||
const arrow = isSorted ? (this.sortDirection === 'ASC' ? '↑' : '↓') : '';
|
||||
@@ -603,7 +596,10 @@ SELECT * FROM users LIMIT 10;"></textarea>
|
||||
return `<td class="p-2"><input type="text" placeholder="Фильтр ${col}" class="w-full px-2 py-1 text-xs border border-slate-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500" oninput="app.updateFilter('${col}', this.value)" value="${this.filters[col] || ''}"></td>`;
|
||||
}).join('') + '<td class="p-2"><button onclick="app.clearFilters()" class="text-xs text-slate-500 hover:text-slate-700">Очистить</button></td>';
|
||||
|
||||
// Generate rows
|
||||
if (records.length === 0) {
|
||||
body.innerHTML = '<tr><td colspan="100%" class="text-center py-8 text-slate-500">Нет данных</td></tr>';
|
||||
return;
|
||||
}
|
||||
body.innerHTML = records.map(record => {
|
||||
const pkValue = this.primaryKey ? record[this.primaryKey] : null;
|
||||
const cells = columns.map(col => {
|
||||
|
||||
Reference in New Issue
Block a user