diff --git a/static/css/style.css b/static/css/style.css index b15d3a4..152e7d7 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -389,6 +389,13 @@ button:disabled { background-color: rgba(255, 255, 255, 0.1); } +.menu-icon { + display: inline-block; + width: 1.2em; + margin-right: 0.5rem; + text-align: center; +} + .feed-menu-item.delete { color: var(--primary-red); } diff --git a/static/js/app.js b/static/js/app.js index 36f9aa8..cb58a26 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -106,7 +106,7 @@ function openFeed(feed) { const menuButton = document.createElement('button'); menuButton.className = 'feed-menu-button'; - menuButton.innerHTML = '⋮'; + menuButton.innerHTML = ''; menuButton.title = 'Feed options'; menuButton.onclick = (e) => { e.stopPropagation(); @@ -117,9 +117,28 @@ function openFeed(feed) { const menu = document.createElement('div'); menu.className = 'feed-menu'; + const copyItem = document.createElement('a'); + copyItem.className = 'feed-menu-item copy'; + copyItem.innerHTML = ' Copy feed URL'; + copyItem.onclick = async (e) => { + e.stopPropagation(); + try { + await navigator.clipboard.writeText(feed.url); + // Briefly show success feedback + const originalText = copyItem.innerHTML; + copyItem.innerHTML = ' Copied!'; + setTimeout(() => { + copyItem.innerHTML = originalText; + }, 1500); + } catch (error) { + console.error('Failed to copy URL:', error); + } + menu.classList.remove('show'); + }; + const deleteItem = document.createElement('a'); deleteItem.className = 'feed-menu-item delete'; - deleteItem.textContent = 'Remove Feed'; + deleteItem.innerHTML = ' Remove Feed'; deleteItem.onclick = async (e) => { e.stopPropagation(); if (confirm(`Are you sure you want to delete "${feed.name}"?`)) { @@ -139,6 +158,7 @@ function openFeed(feed) { menu.classList.remove('show'); }; + menu.appendChild(copyItem); menu.appendChild(deleteItem); name.appendChild(menuButton); name.appendChild(menu); diff --git a/templates/index.html.tera b/templates/index.html.tera index 7c56264..0c16124 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -4,6 +4,7 @@ RSS Reader + @@ -14,7 +15,7 @@

RSS Reader