feat: hide-my-anime interface setting

This commit is contained in:
RockinChaos 2024-05-29 17:15:52 -07:00
parent 8ebbab1192
commit 755039c201
2 changed files with 14 additions and 8 deletions

View file

@ -221,13 +221,13 @@ function createSections () {
hide: !alToken
},
// common, non-user specific sections
{ title: 'Popular This Season', variables: { sort: 'POPULARITY_DESC'} },
{ title: 'Trending Now', variables: { sort: 'TRENDING_DESC'} },
{ title: 'All Time Popular', variables: { sort: 'POPULARITY_DESC'} },
{ title: 'Romance', variables: { sort: 'TRENDING_DESC', genre: ['Romance']} },
{ title: 'Action', variables: { sort: 'TRENDING_DESC', genre: ['Action']} },
{ title: 'Adventure', variables: { sort: 'TRENDING_DESC', genre: ['Adventure'] } },
{ title: 'Fantasy', variables: { sort: 'TRENDING_DESC', genre: ['Fantasy']} },
{ title: 'Comedy', variables: { sort: 'TRENDING_DESC', genre: ['Comedy'] } }
{ title: 'Popular This Season', variables: { sort: 'POPULARITY_DESC', season: currentSeason, year: currentYear, hideMyAnime: settings.value.hideMyAnime, hideStatus: ['COMPLETED', 'DROPPED'] } },
{ title: 'Trending Now', variables: { sort: 'TRENDING_DESC', hideMyAnime: settings.value.hideMyAnime, hideStatus: ['COMPLETED', 'DROPPED'] } },
{ title: 'All Time Popular', variables: { sort: 'POPULARITY_DESC', hideMyAnime: settings.value.hideMyAnime, hideStatus: ['COMPLETED', 'DROPPED'] } },
{ title: 'Romance', variables: { sort: 'TRENDING_DESC', genre: ['Romance'], hideMyAnime: settings.value.hideMyAnime, hideStatus: ['COMPLETED', 'DROPPED'] } },
{ title: 'Action', variables: { sort: 'TRENDING_DESC', genre: ['Action'], hideMyAnime: settings.value.hideMyAnime, hideStatus: ['COMPLETED', 'DROPPED'] } },
{ title: 'Adventure', variables: { sort: 'TRENDING_DESC', genre: ['Adventure'], hideMyAnime: settings.value.hideMyAnime, hideStatus: ['COMPLETED', 'DROPPED'] } },
{ title: 'Fantasy', variables: { sort: 'TRENDING_DESC', genre: ['Fantasy'], hideMyAnime: settings.value.hideMyAnime, hideStatus: ['COMPLETED', 'DROPPED'] } },
{ title: 'Comedy', variables: { sort: 'TRENDING_DESC', genre: ['Comedy'], hideMyAnime: settings.value.hideMyAnime, hideStatus: ['COMPLETED', 'DROPPED'] } }
]
}

View file

@ -61,6 +61,12 @@
{/if}
<h4 class='mb-10 font-weight-bold'>Home Screen Settings</h4>
<SettingCard title='Hide My Anime' description={'The anime on your Completed or Dropped list will automatically be hidden from the default sections, this excludes manually added RSS feeds and user specific feeds.\nThis setting does not apply to manual searches.'}>
<div class='custom-switch'>
<input type='checkbox' id='hide-my-anime' bind:checked={settings.hideMyAnime} />
<label for='hide-my-anime'>{settings.hideMyAnime ? 'On' : 'Off'}</label>
</div>
</SettingCard>
<SettingCard title='RSS Feeds' description={'RSS feeds to display on the home screen. This needs to be a CORS enabled URL to a Nyaa or Tosho like RSS feed which cotains either an "infoHash" or "enclosure" tag.\nThis only shows the releases on the home screen, it doesn\'t automatically download the content.\nSince the feeds only provide the name of the file, Miru might not always detect the anime correctly!\nSome presets for popular groups are already provided as an example, custom feeds require the FULL URL.'}>
<div>
{#each settings.rssFeedsNew as _, i}