Improved: Feed config: title, website url, feed url#4258
Improved: Feed config: title, website url, feed url#4258Alkarex merged 13 commits intoFreshRSS:edgefrom
Conversation
Co-authored-by: Alexandre Alapetite <[email protected]>
Co-authored-by: Alexandre Alapetite <[email protected]>
app/layout/aside_feed.phtml
Outdated
| <li class="item"><a href="<?= _url('stats', 'repartition', 'id', '------') ?>"><?= _t('index.menu.stats') ?></a></li> | ||
| <?php } ?> | ||
| <li class="item"><a target="_blank" rel="noreferrer" href="http://example.net/"><?= _t('gen.action.see_website') ?></a></li> | ||
| <li class="item" id="websiteURL"><a target="_blank" rel="noreferrer" href="http://example.net/"><?= _t('gen.action.see_website') ?></a></li> |
There was a problem hiding this comment.
Not good, as we end up with multiple elements with the same ID in the DOM. Could be changed to a class instead, but see my alternative proposition below.
|
Instead of removing the Website link, we could consider falling back on feed URL when the Website is empty. Easier logic and I would find it more consistent: FreshRSS/app/layout/aside_feed.phtml Line 100 in 926ce8f |
I am not happy with this idea (or I do not understand it correctly). On my device (Firefox on Windows), an RSS link would open an download prompt. I would be irritated, when I clicked on "Website" and would expect an opened website of the feed. |
|
Improved. Now it is changed from ID to class |
| a.href = '#dropdown-' + id; | ||
| div.querySelector('.dropdown-target').id = 'dropdown-' + id; | ||
| div.insertAdjacentHTML('beforeend', template); | ||
| if (feed_web.length < 1) { |
There was a problem hiding this comment.
Sorry, wrong comment. It is in a template, so all good
empty website URL
If the website URL input is empty:

Before:

After:

title + feed URL required
After:

Before: the fields were not required
Changes proposed in this pull request:
How to test the feature manually:
Pull request checklist: