Favoriten-Viewer: Erfolgsmeldung für erfolgreich geladenen Inhalt hinzugefügt
This commit is contained in:
@@ -335,6 +335,21 @@
|
|||||||
color: #d32f2f;
|
color: #d32f2f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#successIndicator {
|
||||||
|
padding: 10px 20px;
|
||||||
|
font-weight: 500;
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
display: none;
|
||||||
|
background-color: #e8f5e9;
|
||||||
|
color: #2e7d32;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Icon für Success Indicator */
|
||||||
|
#successIndicator::before {
|
||||||
|
content: "✅";
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
.stats-container {
|
.stats-container {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
@@ -486,6 +501,7 @@
|
|||||||
⏳ Verarbeite Datei...
|
⏳ Verarbeite Datei...
|
||||||
</div>
|
</div>
|
||||||
<div id="errorIndicator"></div>
|
<div id="errorIndicator"></div>
|
||||||
|
<div id="successIndicator"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -523,6 +539,7 @@
|
|||||||
const outputDiv = document.getElementById('favoritesOutput');
|
const outputDiv = document.getElementById('favoritesOutput');
|
||||||
const loadingIndicator = document.getElementById('loadingIndicator');
|
const loadingIndicator = document.getElementById('loadingIndicator');
|
||||||
const errorIndicator = document.getElementById('errorIndicator');
|
const errorIndicator = document.getElementById('errorIndicator');
|
||||||
|
const successIndicator = document.getElementById('successIndicator');
|
||||||
const searchInput = document.getElementById('searchInput');
|
const searchInput = document.getElementById('searchInput');
|
||||||
const statsContainer = document.getElementById('statsContainer');
|
const statsContainer = document.getElementById('statsContainer');
|
||||||
const statsGrid = document.getElementById('statsGrid');
|
const statsGrid = document.getElementById('statsGrid');
|
||||||
@@ -563,6 +580,7 @@
|
|||||||
fileName.textContent = 'Keine Datei ausgewählt';
|
fileName.textContent = 'Keine Datei ausgewählt';
|
||||||
errorIndicator.style.display = 'none';
|
errorIndicator.style.display = 'none';
|
||||||
loadingIndicator.style.display = 'none';
|
loadingIndicator.style.display = 'none';
|
||||||
|
successIndicator.style.display = 'none';
|
||||||
statsContainer.style.display = 'none';
|
statsContainer.style.display = 'none';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -578,6 +596,7 @@
|
|||||||
errorIndicator.textContent = `Fehler: Bitte lade eine HTML-Datei hoch.`;
|
errorIndicator.textContent = `Fehler: Bitte lade eine HTML-Datei hoch.`;
|
||||||
errorIndicator.style.display = 'block';
|
errorIndicator.style.display = 'block';
|
||||||
loadingIndicator.style.display = 'none';
|
loadingIndicator.style.display = 'none';
|
||||||
|
successIndicator.style.display = 'none';
|
||||||
statsContainer.style.display = 'none';
|
statsContainer.style.display = 'none';
|
||||||
return;
|
return;
|
||||||
} else if (selectedFormat === 'json' && !isJson && !isHtml) {
|
} else if (selectedFormat === 'json' && !isJson && !isHtml) {
|
||||||
@@ -585,6 +604,7 @@
|
|||||||
errorIndicator.textContent = `Fehler: Bitte lade eine JSON- oder HTML-Datei hoch.`;
|
errorIndicator.textContent = `Fehler: Bitte lade eine JSON- oder HTML-Datei hoch.`;
|
||||||
errorIndicator.style.display = 'block';
|
errorIndicator.style.display = 'block';
|
||||||
loadingIndicator.style.display = 'none';
|
loadingIndicator.style.display = 'none';
|
||||||
|
successIndicator.style.display = 'none';
|
||||||
statsContainer.style.display = 'none';
|
statsContainer.style.display = 'none';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -594,6 +614,7 @@
|
|||||||
reader.onloadstart = () => {
|
reader.onloadstart = () => {
|
||||||
outputDiv.innerHTML = ''; // Vorherige Ausgabe löschen
|
outputDiv.innerHTML = ''; // Vorherige Ausgabe löschen
|
||||||
errorIndicator.style.display = 'none';
|
errorIndicator.style.display = 'none';
|
||||||
|
successIndicator.style.display = 'none';
|
||||||
loadingIndicator.style.display = 'block';
|
loadingIndicator.style.display = 'block';
|
||||||
statsContainer.style.display = 'none';
|
statsContainer.style.display = 'none';
|
||||||
|
|
||||||
@@ -611,6 +632,7 @@
|
|||||||
|
|
||||||
reader.onerror = () => {
|
reader.onerror = () => {
|
||||||
loadingIndicator.style.display = 'none';
|
loadingIndicator.style.display = 'none';
|
||||||
|
successIndicator.style.display = 'none';
|
||||||
errorIndicator.textContent = 'Fehler beim Lesen der Datei.';
|
errorIndicator.textContent = 'Fehler beim Lesen der Datei.';
|
||||||
errorIndicator.style.display = 'block';
|
errorIndicator.style.display = 'block';
|
||||||
outputDiv.innerHTML = '';
|
outputDiv.innerHTML = '';
|
||||||
@@ -631,6 +653,17 @@
|
|||||||
|
|
||||||
updateStatistics();
|
updateStatistics();
|
||||||
updateSearch();
|
updateSearch();
|
||||||
|
|
||||||
|
// Erfolgsmeldung anzeigen
|
||||||
|
const successIndicator = document.getElementById('successIndicator');
|
||||||
|
successIndicator.textContent = `${statistics.totalBookmarks} Lesezeichen und ${statistics.totalFolders} Ordner erfolgreich geladen!`;
|
||||||
|
successIndicator.style.display = 'block';
|
||||||
|
|
||||||
|
// Erfolgsmeldung nach 5 Sekunden ausblenden
|
||||||
|
setTimeout(() => {
|
||||||
|
successIndicator.style.display = 'none';
|
||||||
|
}, 5000);
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Fehler beim Parsen:", error);
|
console.error("Fehler beim Parsen:", error);
|
||||||
errorIndicator.textContent = 'Fehler beim Verarbeiten der Datei: ' + error.message;
|
errorIndicator.textContent = 'Fehler beim Verarbeiten der Datei: ' + error.message;
|
||||||
|
Reference in New Issue
Block a user