Commit 782a243b7f

782a243b7fd47572586aa509a8dbd3329e11becf

parent: d79085856c

Unsigned

Duck <57977673+woducku@users.noreply.github.com> · 2026-10-13 01:48 UTC

mixed

Layout: unified · split

docs/.vitepress/theme/components/extrepo/ExtensionRepos.vue +1
@@ -196,6 +196,7 @@ const { facets, isFiltering, filteredSites } = useRepoFilter(allSites, {
196196 :available-langs="facets.availableLangs"
197197 :has-multi-language="facets.hasMultiLanguage"
198198 :has-ratings="facets.hasRatings"
199 :has-mixed="facets.hasMixed"
199200 :has-suggestive="facets.hasSuggestive"
200201 :available-content-types="facets.availableContentTypes"
201202 :has-content-types="facets.availableContentTypes.length > 0"
docs/.vitepress/theme/components/extrepo/SettingsMenu.vue +16 −5
@@ -11,6 +11,7 @@ const props = defineProps<{
1111 availableLangs: string[]
1212 hasMultiLanguage: boolean
1313 hasRatings: boolean
14 hasMixed: boolean
1415 hasSuggestive: boolean
1516 contentTypeFilter: string
1617 availableContentTypes: string[]
@@ -110,8 +111,14 @@ const ratingOptions = computed<FilterOption[]>(() => {
110111 { value: 'all', label: 'All' },
111112 { value: 'safe', label: 'Safe' }
112113 ]
113 if (props.hasSuggestive) opts.push({ value: 'suggestive', label: 'Mature' })
114 opts.push({ value: 'nsfw', label: props.hasSuggestive ? 'Adult' : 'NSFW' })
114 if (props.hasMixed) opts.push({ value: 'mixed', label: 'Mixed' })
115 if (props.hasSuggestive) {
116 opts.push({ value: 'suggestive', label: 'Mature' })
117 }
118 opts.push({
119 value: 'nsfw',
120 label: props.hasMixed || props.hasSuggestive ? 'Adult' : 'NSFW'
121 })
115122 return opts
116123})
117124
@@ -149,7 +156,7 @@ const typeTrigger = computed(() =>
149156 ref="menuRef"
150157 class="ext-settings-menu VPMenu"
151158 :class="{
152 'ext-settings-menu--wide': hasSuggestive || hasContentTypes
159 'ext-settings-menu--wide': hasMixed || hasSuggestive || hasContentTypes
153160 }"
154161 :style="menuStyle"
155162 >
@@ -182,12 +189,16 @@ const typeTrigger = computed(() =>
182189 <strong>Safe</strong>
183190 <span>Only entries with no mature content</span>
184191 </div>
192 <div v-if="hasMixed" class="rating-help-option">
193 <strong>Mixed</strong>
194 <span>Includes mixed content</span>
195 </div>
185196 <div v-if="hasSuggestive" class="rating-help-option">
186197 <strong>Mature</strong>
187 <span>Includes suggestive content</span>
198 <span>Includes mature content</span>
188199 </div>
189200 <div class="rating-help-option">
190 <strong>{{ hasSuggestive ? 'Adult' : 'NSFW' }}</strong>
201 <strong>{{ hasMixed || hasSuggestive ? 'Adult' : 'NSFW' }}</strong>
191202 <span>Includes explicit adult content</span>
192203 </div>
193204 </div>
docs/.vitepress/theme/components/extrepo/SiteGroupCell.vue +2 −1
@@ -19,7 +19,8 @@ defineEmits<{
1919const primary = computed(() => props.sites[0])
2020const highestRated = computed(() =>
2121 props.sites.find(site => site.rating === 'nsfw') ??
22 props.sites.find(site => site.rating === 'suggestive')
22 props.sites.find(site => site.rating === 'suggestive') ??
23 props.sites.find(site => site.rating === 'mixed')
2324)
2425
2526const groupName = computed(() => {
docs/.vitepress/theme/components/extrepo/helpers.ts +3 −1
@@ -69,7 +69,9 @@ export function ratingIcon(rating: Rating): string {
6969}
7070
7171export function ratingTitle(rating: Rating): string {
72 return rating === 'nsfw' ? 'NSFW' : 'Mature'
72 if (rating === 'nsfw') return 'NSFW'
73 if (rating === 'suggestive') return 'Mature'
74 return 'Mixed'
7375}
7476
7577export function contentTypeLabel(type: string): string {
docs/.vitepress/theme/components/extrepo/types.ts +1 −1
@@ -1,4 +1,4 @@
1export type Rating = 'safe' | 'suggestive' | 'nsfw'
1export type Rating = 'safe' | 'mixed' | 'suggestive' | 'nsfw'
22export type RatingFilter = 'all' | Rating
33
44export interface RepoVariant {
docs/.vitepress/theme/components/extrepo/useRepoFilter.ts +3
@@ -30,12 +30,14 @@ export function useRepoFilter(
3030 const contentTypes = new Set<string>()
3131 const langs = new Set<string>()
3232 let hasRatings = false
33 let hasMixed = false
3334 let hasSuggestive = false
3435 let hasMultiLanguage = false
3536 let hasBroken = false
3637 for (const site of allSites.value) {
3738 if (site.contentType) contentTypes.add(site.contentType)
3839 if (site.rating !== 'safe') hasRatings = true
40 if (site.rating === 'mixed') hasMixed = true
3941 if (site.rating === 'suggestive') hasSuggestive = true
4042 if (site.isBroken) hasBroken = true
4143 if (typeof site.lang !== 'string') continue
@@ -48,6 +50,7 @@ export function useRepoFilter(
4850 langLabel(a).localeCompare(langLabel(b))
4951 ),
5052 hasRatings,
53 hasMixed,
5154 hasSuggestive,
5255 hasMultiLanguage,
5356 hasBroken
docs/ext/extensionRepos/parsers.ts +2 −2
@@ -299,7 +299,7 @@ function repoListLabel(indexUrl: string, repoJson: unknown): string {
299299
300300function ratingFromLevel(level: number): Rating {
301301 if (level >= 2) return 'nsfw'
302 if (level >= 1) return 'suggestive'
302 if (level >= 1) return 'mixed'
303303 return 'safe'
304304}
305305
@@ -764,7 +764,7 @@ function toRepoDataLNReader(plugins: LNReaderPlugin[]): RepoSite[] {
764764
765765const CONTENT_WARNING_RATING: Record<string, Rating> = {
766766 CONTENT_WARNING_NSFW: 'nsfw',
767 CONTENT_WARNING_MIXED: 'suggestive',
767 CONTENT_WARNING_MIXED: 'mixed',
768768 CONTENT_WARNING_SAFE: 'safe'
769769}
770770