auto-git:
[change] renderer.js
This commit is contained in:
40
renderer.js
40
renderer.js
@@ -101,27 +101,27 @@ window.addEventListener('DOMContentLoaded', async () => {
|
|||||||
</button>
|
</button>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
// play/pause Button korrekt initialisieren
|
// play/pause Button korrekt initialisieren
|
||||||
const pausePlayBtn = document.createElement('button');
|
const pausePlayBtn = document.createElement('button');
|
||||||
pausePlayBtn.className = 'pause-play-btn ml-2 hover:bg-gray-200 p-1 rounded';
|
pausePlayBtn.className = 'pause-play-btn ml-2 hover:bg-gray-200 p-1 rounded';
|
||||||
pausePlayBtn.title = isMonitoring ? 'Monitoring pausieren' : 'Monitoring starten';
|
pausePlayBtn.title = isMonitoring ? 'Monitoring pausieren' : 'Monitoring starten';
|
||||||
// statt Emoji: SVG-Strings
|
// statt Emoji: SVG-Strings
|
||||||
pausePlayBtn.innerHTML = isMonitoring
|
pausePlayBtn.innerHTML = isMonitoring
|
||||||
? /* Pause-Icon */
|
? /* Pause-Icon */
|
||||||
`<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
`<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
<rect x="6" y="5" width="4" height="14" rx="1" fill="currentColor"/>
|
<rect x="6" y="5" width="4" height="14" rx="1" fill="currentColor"/>
|
||||||
<rect x="14" y="5" width="4" height="14" rx="1" fill="currentColor"/>
|
<rect x="14" y="5" width="4" height="14" rx="1" fill="currentColor"/>
|
||||||
</svg>`
|
</svg>`
|
||||||
: /* Play-Icon */
|
: /* Play-Icon */
|
||||||
`<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
`<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
<polygon points="7,5 19,12 7,19" fill="currentColor"/>
|
<polygon points="7,5 19,12 7,19" fill="currentColor"/>
|
||||||
</svg>`;
|
</svg>`;
|
||||||
|
|
||||||
pausePlayBtn.addEventListener('click', async e => {
|
pausePlayBtn.addEventListener('click', async e => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
await window.electronAPI.setMonitoring(folderObj, !isMonitoring);
|
await window.electronAPI.setMonitoring(folderObj, !isMonitoring);
|
||||||
await renderSidebar();
|
await renderSidebar();
|
||||||
});
|
});
|
||||||
li.appendChild(pausePlayBtn);
|
li.appendChild(pausePlayBtn);
|
||||||
|
|
||||||
li.addEventListener('contextmenu', e => {
|
li.addEventListener('contextmenu', e => {
|
||||||
|
|||||||
Reference in New Issue
Block a user