mirror of
https://github.com/marcogll/ap_pos.git
synced 2026-01-13 13:15:16 +00:00
feat: Add visual clear form tip with OS detection
Added visible tip in interface showing correct keyboard shortcut: - Automatically detects Mac vs Windows/Linux - Shows 'Cmd + Shift + R' on Mac - Shows 'Ctrl + Shift + R' on Windows/Linux - Clean, non-intrusive design with blue accent - Positioned below 'Generar Venta' button Technical implementation: - CSS styling for clear-form-tip class - JavaScript OS detection using navigator.platform - Dynamic content update based on detected OS - Updated cache-busting version for immediate loading 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
18
app.js
18
app.js
@@ -3195,4 +3195,20 @@ function addAnticipo() {
|
||||
}
|
||||
|
||||
|
||||
document.addEventListener('DOMContentLoaded', initializeApp);
|
||||
// Detectar sistema operativo y mostrar shortcut correcto
|
||||
function setCorrectClearShortcut() {
|
||||
const shortcutElement = document.getElementById('clear-shortcut');
|
||||
if (shortcutElement) {
|
||||
const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
||||
if (isMac) {
|
||||
shortcutElement.textContent = 'Cmd + Shift + R';
|
||||
} else {
|
||||
shortcutElement.textContent = 'Ctrl + Shift + R';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
initializeApp();
|
||||
setCorrectClearShortcut();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user