fix: header sizes, transform image crop, sidebar accordion dropdown
This commit is contained in:
@@ -264,14 +264,14 @@ function updateClientsDropdown() {
|
||||
|
||||
// Adiciona o item "Todos os Clientes"
|
||||
const allItem = document.createElement('div');
|
||||
allItem.className = `submenu-item${selectedClient === '' ? ' active' : ''}`;
|
||||
allItem.innerHTML = '📋 Todos os Clientes';
|
||||
allItem.className = `nav-item${selectedClient === '' ? ' active' : ''}`;
|
||||
allItem.innerHTML = `<span class="icon">📋</span> <span style="flex:1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" title="Todos os Clientes">Todos os Clientes</span>`;
|
||||
allItem.onclick = () => selectClientFilter('');
|
||||
submenu.appendChild(allItem);
|
||||
|
||||
sorted.forEach(c => {
|
||||
const item = document.createElement('div');
|
||||
item.className = `submenu-item${selectedClient === c.name ? ' active' : ''}`;
|
||||
item.className = `nav-item${selectedClient === c.name ? ' active' : ''}`;
|
||||
let lbl = c.name;
|
||||
if (c.name === 'Upload Web') {
|
||||
lbl = 'Upload Web 💻';
|
||||
@@ -279,12 +279,25 @@ function updateClientsDropdown() {
|
||||
if (c.status === 'identified') lbl += ' ✅';
|
||||
else if (c.status === 'historic') lbl += ' 📚';
|
||||
}
|
||||
item.textContent = lbl;
|
||||
item.innerHTML = `<span class="icon">🔹</span> <span style="flex:1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" title="${escapeHtml(lbl)}">${escapeHtml(lbl)}</span>`;
|
||||
item.onclick = () => selectClientFilter(c.name);
|
||||
submenu.appendChild(item);
|
||||
});
|
||||
}
|
||||
|
||||
window.toggleClientsSubmenu = function() {
|
||||
const submenu = document.getElementById('clientsSubmenu');
|
||||
const chevron = document.getElementById('clientsChevron');
|
||||
if (!submenu) return;
|
||||
if (submenu.style.display === 'none') {
|
||||
submenu.style.display = 'flex';
|
||||
if (chevron) chevron.style.transform = 'rotate(180deg)';
|
||||
} else {
|
||||
submenu.style.display = 'none';
|
||||
if (chevron) chevron.style.transform = 'rotate(0deg)';
|
||||
}
|
||||
}
|
||||
|
||||
function selectClientFilter(clientName) {
|
||||
selectedClient = clientName;
|
||||
if (view === 'patients') {
|
||||
@@ -627,8 +640,8 @@ async function showTransformModal(imageId) {
|
||||
{ name: 'Original', rotation: 0, flipH: false, flipV: false, css: 'transform: none;' },
|
||||
{ name: 'Flip Horizontal', rotation: 0, flipH: true, flipV: false, css: 'transform: scaleX(-1);' },
|
||||
{ name: 'Flip Vertical', rotation: 0, flipH: false, flipV: true, css: 'transform: scaleY(-1);' },
|
||||
{ name: 'Rotação +90°', rotation: 90, flipH: false, flipV: false, css: 'transform: rotate(90deg);' },
|
||||
{ name: 'Rotação -90°', rotation: -90, flipH: false, flipV: false, css: 'transform: rotate(-90deg);' }
|
||||
{ name: 'Rotação +90°', rotation: 90, flipH: false, flipV: false, css: 'transform: rotate(90deg) scale(0.65);' },
|
||||
{ name: 'Rotação -90°', rotation: -90, flipH: false, flipV: false, css: 'transform: rotate(-90deg) scale(0.65);' }
|
||||
];
|
||||
|
||||
currentTransformations = transformations;
|
||||
|
||||
Reference in New Issue
Block a user