modified: app.py
modified: templates/playlists.html
This commit is contained in:
@@ -200,18 +200,10 @@ function generateInviteLink() {
|
||||
const duration = document.getElementById('inviteDuration').value || 60;
|
||||
fetch(`/invite?duration=${duration}`)
|
||||
.then(response => response.text())
|
||||
.then(html => {
|
||||
// Extrahiere den Link aus dem HTML (da /invite ein Template rendert)
|
||||
const match = html.match(/href="([^"]+)"/);
|
||||
if (match) {
|
||||
document.getElementById('inviteLinkInput').value = match[1];
|
||||
document.getElementById('inviteLinkInput').style.display = '';
|
||||
document.getElementById('copyInviteBtn').style.display = '';
|
||||
} else {
|
||||
document.getElementById('inviteLinkInput').value = "Error generating link.";
|
||||
document.getElementById('inviteLinkInput').style.display = '';
|
||||
document.getElementById('copyInviteBtn').style.display = 'none';
|
||||
}
|
||||
.then(link => {
|
||||
document.getElementById('inviteLinkInput').value = link;
|
||||
document.getElementById('inviteLinkInput').style.display = '';
|
||||
document.getElementById('copyInviteBtn').style.display = '';
|
||||
});
|
||||
}
|
||||
function copyInviteLink() {
|
||||
|
||||
Reference in New Issue
Block a user