feat: Refonte moderne du panneau de notes avec design latéral
- Transformation en panneau latéral droit au lieu du bas - Header avec gradient violet et design moderne - Ajout bouton Effacer et amélioration du placeholder - Suppression du badge rouge de notification - Animations fluides et redimensionnement automatique de la webview - Interface plus cohérente et intuitive
This commit is contained in:
@@ -1,5 +1,38 @@
|
|||||||
# Changelog - SimpleConnect Electron
|
# Changelog - SimpleConnect Electron
|
||||||
|
|
||||||
|
## [1.2.11] - 2025-09-04
|
||||||
|
|
||||||
|
### Ajouté
|
||||||
|
- **Panneau de notes latéral moderne** : Refonte complète de l'interface des notes
|
||||||
|
- Panneau qui glisse depuis la droite de l'écran (au lieu du bas)
|
||||||
|
- Header avec gradient violet et icône intégrée
|
||||||
|
- Placeholder avec suggestions d'utilisation
|
||||||
|
- Nouveau bouton "Effacer" pour réinitialiser les notes
|
||||||
|
- Footer dédié pour les actions
|
||||||
|
- Animation fluide cubic-bezier pour l'ouverture/fermeture
|
||||||
|
|
||||||
|
### Modifié
|
||||||
|
- **Design du panneau de notes** : Interface plus moderne et cohérente
|
||||||
|
- Hauteur complète (100vh - 60px) au lieu d'une fenêtre popup
|
||||||
|
- Position proche du bouton d'activation pour meilleure cohérence
|
||||||
|
- Bouton de fermeture circulaire avec effet hover
|
||||||
|
- Textarea avec fond grisé qui devient blanc au focus
|
||||||
|
- Notifications modernes remplaçant les alert() natifs
|
||||||
|
- Webview qui se redimensionne automatiquement quand les notes sont ouvertes
|
||||||
|
|
||||||
|
### Supprimé
|
||||||
|
- **Badge de notification rouge** : Suppression de l'indicateur de contenu
|
||||||
|
- Plus de point rouge sur le bouton des notes
|
||||||
|
- Suppression du code JavaScript de surveillance du contenu
|
||||||
|
- Interface plus épurée sans distractions visuelles
|
||||||
|
- **Code du bouton flottant** : Nettoyage du CSS non utilisé
|
||||||
|
|
||||||
|
### Technique
|
||||||
|
- Nouvelle classe `.notes-open` pour ajuster la webview
|
||||||
|
- Animation `slideInRight` pour l'apparition du panneau
|
||||||
|
- Fonction `clearNotes()` avec confirmation avant effacement
|
||||||
|
- Tooltips modernes sur les boutons avec pseudo-éléments CSS
|
||||||
|
|
||||||
## [1.2.10] - 2025-09-04
|
## [1.2.10] - 2025-09-04
|
||||||
|
|
||||||
### Modifié
|
### Modifié
|
||||||
|
|||||||
14
index.html
14
index.html
@@ -103,7 +103,7 @@
|
|||||||
<div id="webviewContainer" class="webview-container">
|
<div id="webviewContainer" class="webview-container">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Zone de notes rapides (masquable) -->
|
<!-- Zone de notes rapides - Panneau latéral -->
|
||||||
<div id="notesSection" class="notes-section">
|
<div id="notesSection" class="notes-section">
|
||||||
<div class="notes-header">
|
<div class="notes-header">
|
||||||
<h4>Notes rapides</h4>
|
<h4>Notes rapides</h4>
|
||||||
@@ -111,9 +111,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<textarea
|
<textarea
|
||||||
id="quickNotes"
|
id="quickNotes"
|
||||||
placeholder="Prenez des notes ici..."
|
placeholder="Prenez des notes ici pendant vos appels...
|
||||||
|
|
||||||
|
• Informations patient
|
||||||
|
• Motif de l'appel
|
||||||
|
• Actions à effectuer
|
||||||
|
• Remarques importantes"
|
||||||
></textarea>
|
></textarea>
|
||||||
<button id="saveNotesBtn" class="btn-small">Sauvegarder</button>
|
<div class="notes-footer">
|
||||||
|
<button id="clearNotesBtn" class="btn-small btn-clear">Effacer</button>
|
||||||
|
<button id="saveNotesBtn" class="btn-small">Sauvegarder</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
48
renderer.js
48
renderer.js
@@ -63,6 +63,12 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|||||||
saveNotesBtn.addEventListener('click', saveNotes);
|
saveNotesBtn.addEventListener('click', saveNotes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Bouton effacer notes
|
||||||
|
const clearNotesBtn = document.getElementById('clearNotesBtn');
|
||||||
|
if (clearNotesBtn) {
|
||||||
|
clearNotesBtn.addEventListener('click', clearNotes);
|
||||||
|
}
|
||||||
|
|
||||||
// Bouton toggle notes
|
// Bouton toggle notes
|
||||||
const toggleNotesBtn = document.getElementById('toggleNotesBtn');
|
const toggleNotesBtn = document.getElementById('toggleNotesBtn');
|
||||||
if (toggleNotesBtn) {
|
if (toggleNotesBtn) {
|
||||||
@@ -84,6 +90,7 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|||||||
// Charger les préférences utilisateur
|
// Charger les préférences utilisateur
|
||||||
loadUserPreferences();
|
loadUserPreferences();
|
||||||
|
|
||||||
|
|
||||||
// Gérer les boutons de la modal de déconnexion (si on est sur la page principale)
|
// Gérer les boutons de la modal de déconnexion (si on est sur la page principale)
|
||||||
const cancelLogoutBtn = document.getElementById('cancelLogoutBtn');
|
const cancelLogoutBtn = document.getElementById('cancelLogoutBtn');
|
||||||
const confirmLogoutBtn = document.getElementById('confirmLogoutBtn');
|
const confirmLogoutBtn = document.getElementById('confirmLogoutBtn');
|
||||||
@@ -672,7 +679,10 @@ function updateCallStats() {
|
|||||||
|
|
||||||
async function saveNotes() {
|
async function saveNotes() {
|
||||||
const notes = document.getElementById('quickNotes').value;
|
const notes = document.getElementById('quickNotes').value;
|
||||||
if (!notes.trim()) return;
|
if (!notes.trim()) {
|
||||||
|
showNotification('Aucune note à sauvegarder', 'error');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const result = await ipcRenderer.invoke('save-notes', {
|
const result = await ipcRenderer.invoke('save-notes', {
|
||||||
content: notes,
|
content: notes,
|
||||||
@@ -680,8 +690,9 @@ async function saveNotes() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
alert('Notes sauvegardées !');
|
showNotification('Notes sauvegardées avec succès !', 'success');
|
||||||
document.getElementById('quickNotes').value = '';
|
// Optionnel : garder les notes ou les effacer
|
||||||
|
// document.getElementById('quickNotes').value = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -835,6 +846,7 @@ function validateTerminal(terminal) {
|
|||||||
function toggleNotes() {
|
function toggleNotes() {
|
||||||
const notesSection = document.getElementById('notesSection');
|
const notesSection = document.getElementById('notesSection');
|
||||||
const toggleBtn = document.getElementById('toggleNotesBtn');
|
const toggleBtn = document.getElementById('toggleNotesBtn');
|
||||||
|
const webviewContainer = document.getElementById('webviewContainer');
|
||||||
|
|
||||||
if (notesSection.classList.contains('visible')) {
|
if (notesSection.classList.contains('visible')) {
|
||||||
hideNotes();
|
hideNotes();
|
||||||
@@ -846,28 +858,54 @@ function toggleNotes() {
|
|||||||
function showNotes() {
|
function showNotes() {
|
||||||
const notesSection = document.getElementById('notesSection');
|
const notesSection = document.getElementById('notesSection');
|
||||||
const toggleBtn = document.getElementById('toggleNotesBtn');
|
const toggleBtn = document.getElementById('toggleNotesBtn');
|
||||||
|
const webviewContainer = document.getElementById('webviewContainer');
|
||||||
|
|
||||||
notesSection.classList.add('visible');
|
notesSection.classList.add('visible');
|
||||||
toggleBtn.classList.add('active');
|
toggleBtn.classList.add('active');
|
||||||
|
|
||||||
|
// Ajuster la largeur de la webview pour faire de la place aux notes
|
||||||
|
if (webviewContainer) {
|
||||||
|
webviewContainer.classList.add('notes-open');
|
||||||
|
}
|
||||||
|
|
||||||
// Sauvegarder la préférence
|
// Sauvegarder la préférence
|
||||||
localStorage.setItem('notesVisible', 'true');
|
localStorage.setItem('notesVisible', 'true');
|
||||||
|
|
||||||
// Focus sur le textarea
|
// Focus sur le textarea avec un délai pour l'animation
|
||||||
document.getElementById('quickNotes').focus();
|
setTimeout(() => {
|
||||||
|
const textarea = document.getElementById('quickNotes');
|
||||||
|
if (textarea) {
|
||||||
|
textarea.focus();
|
||||||
|
textarea.setSelectionRange(textarea.value.length, textarea.value.length);
|
||||||
|
}
|
||||||
|
}, 300);
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideNotes() {
|
function hideNotes() {
|
||||||
const notesSection = document.getElementById('notesSection');
|
const notesSection = document.getElementById('notesSection');
|
||||||
const toggleBtn = document.getElementById('toggleNotesBtn');
|
const toggleBtn = document.getElementById('toggleNotesBtn');
|
||||||
|
const webviewContainer = document.getElementById('webviewContainer');
|
||||||
|
|
||||||
notesSection.classList.remove('visible');
|
notesSection.classList.remove('visible');
|
||||||
toggleBtn.classList.remove('active');
|
toggleBtn.classList.remove('active');
|
||||||
|
|
||||||
|
// Restaurer la largeur normale de la webview
|
||||||
|
if (webviewContainer) {
|
||||||
|
webviewContainer.classList.remove('notes-open');
|
||||||
|
}
|
||||||
|
|
||||||
// Sauvegarder la préférence
|
// Sauvegarder la préférence
|
||||||
localStorage.setItem('notesVisible', 'false');
|
localStorage.setItem('notesVisible', 'false');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clearNotes() {
|
||||||
|
const textarea = document.getElementById('quickNotes');
|
||||||
|
if (textarea && confirm('Êtes-vous sûr de vouloir effacer toutes les notes ?')) {
|
||||||
|
textarea.value = '';
|
||||||
|
textarea.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// === GESTION DES PRÉFÉRENCES UTILISATEUR ===
|
// === GESTION DES PRÉFÉRENCES UTILISATEUR ===
|
||||||
function loadUserPreferences() {
|
function loadUserPreferences() {
|
||||||
// Charger l'état des notes
|
// Charger l'état des notes
|
||||||
|
|||||||
@@ -612,95 +612,171 @@ body {
|
|||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* === ZONE DE NOTES === */
|
/* === ZONE DE NOTES - PANNEAU LATÉRAL === */
|
||||||
.notes-section {
|
.notes-section {
|
||||||
|
position: fixed;
|
||||||
|
top: 60px; /* Juste sous le header */
|
||||||
|
right: -400px; /* Caché par défaut */
|
||||||
|
width: 380px;
|
||||||
|
height: calc(100vh - 60px);
|
||||||
background: white;
|
background: white;
|
||||||
border-top: 2px solid #667eea;
|
box-shadow: -4px 0 20px rgba(0,0,0,0.1);
|
||||||
position: absolute;
|
transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
transition: transform 0.3s ease;
|
|
||||||
transform: translateY(100%);
|
|
||||||
box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
|
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
border-left: 1px solid #e1e4e8;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notes-section.visible {
|
.notes-section.visible {
|
||||||
transform: translateY(0);
|
right: 0;
|
||||||
|
animation: slideInRight 0.3s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes slideInRight {
|
||||||
|
from {
|
||||||
|
right: -400px;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
right: 0;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.notes-header {
|
.notes-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 15px 20px;
|
padding: 20px;
|
||||||
background: #f8f9fa;
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||||
border-bottom: 1px solid #e9ecef;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notes-header h4 {
|
.notes-header h4 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: #333;
|
color: white;
|
||||||
font-size: 16px;
|
font-size: 18px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notes-header h4::before {
|
||||||
|
content: '📝';
|
||||||
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-close-notes {
|
.btn-close-notes {
|
||||||
background: none;
|
background: rgba(255, 255, 255, 0.2);
|
||||||
border: none;
|
border: none;
|
||||||
font-size: 24px;
|
font-size: 20px;
|
||||||
color: #999;
|
color: white;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
width: 30px;
|
width: 32px;
|
||||||
height: 30px;
|
height: 32px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border-radius: 4px;
|
border-radius: 50%;
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-close-notes:hover {
|
.btn-close-notes:hover {
|
||||||
background: white;
|
background: rgba(255, 255, 255, 0.3);
|
||||||
color: #333;
|
transform: scale(1.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.notes-section textarea {
|
.notes-section textarea {
|
||||||
|
flex: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 120px;
|
padding: 20px;
|
||||||
padding: 15px 20px;
|
|
||||||
border: none;
|
border: none;
|
||||||
resize: none;
|
resize: none;
|
||||||
font-family: inherit;
|
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 1.5;
|
line-height: 1.6;
|
||||||
|
background: #fafbfc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notes-section textarea:focus {
|
.notes-section textarea:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notes-section textarea::placeholder {
|
||||||
|
color: #959da5;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notes-footer {
|
||||||
|
padding: 15px 20px;
|
||||||
|
background: white;
|
||||||
|
border-top: 1px solid #e1e4e8;
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-small {
|
.btn-small {
|
||||||
margin: 0 20px 15px 20px;
|
flex: 1;
|
||||||
padding: 8px 20px;
|
padding: 10px 20px;
|
||||||
background: #667eea;
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||||
color: white;
|
color: white;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 6px;
|
border-radius: 8px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 500;
|
font-weight: 600;
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-small:hover {
|
.btn-small:hover {
|
||||||
background: #5a6fd8;
|
|
||||||
transform: translateY(-2px);
|
transform: translateY(-2px);
|
||||||
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
|
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-small.btn-clear {
|
||||||
|
flex: 0.5;
|
||||||
|
background: #f1f3f5;
|
||||||
|
color: #495057;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-small.btn-clear:hover {
|
||||||
|
background: #e9ecef;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ajustement de la webview quand les notes sont visibles */
|
||||||
|
.webview-container.notes-open {
|
||||||
|
margin-right: 380px;
|
||||||
|
transition: margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tooltip moderne pour le bouton notes */
|
||||||
|
.btn-icon[title]::after {
|
||||||
|
content: attr(title);
|
||||||
|
position: absolute;
|
||||||
|
bottom: -35px;
|
||||||
|
right: 0;
|
||||||
|
background: rgba(0, 0, 0, 0.9);
|
||||||
|
color: white;
|
||||||
|
padding: 6px 12px;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-size: 12px;
|
||||||
|
white-space: nowrap;
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
transition: opacity 0.3s;
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-icon[title]:hover::after {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* === MODAL === */
|
/* === MODAL === */
|
||||||
.modal {
|
.modal {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
Reference in New Issue
Block a user