mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 04:58:59 +00:00
(site-info) Only show samples if feed is absent, never both.
This commit is contained in:
parent
8b804359a9
commit
19b69b1764
@ -340,6 +340,14 @@ public class SearchSiteInfoService {
|
||||
implements SiteInfoModel
|
||||
{
|
||||
|
||||
public boolean hasSamples() {
|
||||
return samples != null && !samples.isEmpty();
|
||||
}
|
||||
|
||||
public boolean hasFeed() {
|
||||
return feed != null && !feed.items.isEmpty();
|
||||
}
|
||||
|
||||
public String query() { return "site:" + domain; }
|
||||
|
||||
public boolean isKnown() {
|
||||
|
@ -25,8 +25,7 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (siteInfo.feed() != null && !siteInfo.feed().items().isEmpty())
|
||||
|
||||
@if (siteInfo.hasFeed())
|
||||
<div class="mx-3 flex place-items-baseline space-x-2 p-2 bg-gray-100 rounded">
|
||||
<i class="fas fa-rss text-orange-500"></i>
|
||||
<span class="grow">Feed</span>
|
||||
@ -46,7 +45,7 @@
|
||||
|
||||
@endif
|
||||
|
||||
@if (siteInfo.samples() != null && !siteInfo.samples().isEmpty())
|
||||
@if (siteInfo.hasSamples() && !siteInfo.hasFeed())
|
||||
|
||||
<div class="mx-3 flex place-items-baseline space-x-2 p-2 bg-gray-100 rounded">
|
||||
<i class="fas fa-magnifying-glass"></i>
|
||||
|
Loading…
Reference in New Issue
Block a user