diff --git a/app/Helpers/FilterCategories.php b/app/Helpers/FilterCategories.php new file mode 100644 index 0000000..5aafad4 --- /dev/null +++ b/app/Helpers/FilterCategories.php @@ -0,0 +1,102 @@ +remember( + 'searchtags', + 300, + fn () => Tag::where('count', '>', 0) + ->orderBy('slug') + ->get(), + ); + + $appearances = [ + 'Loli', + 'Shota', + 'Milf', + 'Futanari', + 'Big Boobs', + 'Small Boobs', + 'Dark Skin', + 'Cosplay', + 'Elf', + 'Maid', + 'Nekomimi', + 'Nurse', + 'School Girl', + 'Succubus', + 'Teacher', + 'Trap', + 'Pregnant', + 'Glasses', + 'Swim Suit', + 'Ugly Bastard', + 'Monster', + ]; + + $types = [ + '3D', + '4K', + '48Fps', + '4K 48Fps', + 'Censored', + 'Uncensored', + 'Comedy', + 'Fantasy', + 'Horror', + 'Vanilla', + 'Ntr', + 'Pov', + 'Filmed', + 'X-Ray', + ]; + + $actions = [ + 'Anal', + 'Bdsm', + 'Facial', + 'Blow Job', + 'Boob Job', + 'Foot Job', + 'Hand Job', + 'Rimjob', + 'Inflation', + 'Masturbation', + 'Public Sex', + 'Rape', + 'Reverse Rape', + 'Threesome', + 'Orgy', + 'Gangbang', + ]; + + $excluded = [...$appearances, ...$types, ...$actions]; + + $categories = [ + 'Genres' => $taglist + ->reject(fn ($tag) => in_array($tag->name, $excluded)) + ->pluck('name') + ->toArray(), + + 'Actions' => $actions, + + 'Appearance' => collect($appearances) + ->reject(function ($tag) { + return auth()->guest() && in_array($tag, ['Loli', 'Shota']); + }) + ->toArray(), + + 'Types' => $types, + ]; + + return $categories; + } +} diff --git a/resources/views/modals/filter-blacklist.blade.php b/resources/views/modals/filter-blacklist.blade.php index bfb8a9f..8b73b5e 100644 --- a/resources/views/modals/filter-blacklist.blade.php +++ b/resources/views/modals/filter-blacklist.blade.php @@ -1,165 +1,107 @@ - -