diff --git a/assets/components/entities/entity.vue b/assets/components/entities/entity.vue index 16dbd9dd..c7b58557 100644 --- a/assets/components/entities/entity.vue +++ b/assets/components/entities/entity.vue @@ -137,7 +137,7 @@ async function fetchEntity(scroll = true) { this.pageTitle = entity.name; - if (scroll) { + if (scroll && this.$refs.filter?.$el) { this.$refs.filter.$el.scrollIntoView(); } } @@ -146,9 +146,11 @@ async function mounted() { await this.fetchEntity(); } -async function route() { - await this.fetchEntity(); - this.expanded = false; +async function route(to) { + if (to.name === 'channel' || to.name === 'network' || to.name === 'studio') { + await this.fetchEntity(); + this.expanded = false; + } } export default { diff --git a/assets/components/header/header.vue b/assets/components/header/header.vue index caddacce..6490a24b 100644 --- a/assets/components/header/header.vue +++ b/assets/components/header/header.vue @@ -96,7 +96,11 @@ @@ -154,8 +158,11 @@ function me() { return this.$store.state.auth.user; } -function unseenNotificationsCount() { - return this.$store.state.ui.unseenNotificationsCount; +async function fetchNotifications() { + const { notifications, unseenCount } = await this.$store.dispatch('fetchNotifications'); + + this.notifications = notifications; + this.unseenNotificationsCount = unseenCount; } export default { @@ -170,11 +177,19 @@ export default { logo, searching: false, showFilters: false, + notifications: [], + unseenNotificationsCount: 0, }; }, computed: { me, - unseenNotificationsCount, + }, + watch: { + me: fetchNotifications, + }, + mounted: fetchNotifications, + methods: { + fetchNotifications, }, }; diff --git a/assets/components/header/notifications.vue b/assets/components/header/notifications.vue index 70f84eee..821b5971 100644 --- a/assets/components/header/notifications.vue +++ b/assets/components/header/notifications.vue @@ -5,13 +5,14 @@
@@ -111,28 +112,29 @@
+ +
+ See all +
+ + diff --git a/assets/components/releases/scene-tile.vue b/assets/components/releases/scene-tile.vue index ffbf468f..9aac1946 100644 --- a/assets/components/releases/scene-tile.vue +++ b/assets/components/releases/scene-tile.vue @@ -22,6 +22,8 @@ :src="getPath(release.poster, 'thumbnail')" :style="{ 'background-image': getBgPath(release.poster, 'lazy') }" :alt="release.title" + :width="release.poster.thumbnailWidth" + :height="release.poster.thumbnailHeight" class="thumbnail" loading="lazy" > @@ -31,6 +33,8 @@ :src="getPath(release.photos[0], 'thumbnail')" :style="{ 'background-image': getBgPath(release.photos[0], 'lazy') } " :alt="release.title" + :width="release.photos[0].thumbnailWidth" + :height="release.photos[0].thumbnailHeight" class="thumbnail" loading="lazy" > diff --git a/assets/js/router.js b/assets/js/router.js index e1f3c8b4..2b4fc5f6 100644 --- a/assets/js/router.js +++ b/assets/js/router.js @@ -10,6 +10,7 @@ import Networks from '../components/networks/networks.vue'; import Actor from '../components/actors/actor.vue'; import Actors from '../components/actors/actors.vue'; import Movies from '../components/releases/movies.vue'; +import Notifications from '../components/notifications/notifications.vue'; import Tag from '../components/tags/tag.vue'; import Tags from '../components/tags/tags.vue'; import Stash from '../components/stashes/stash.vue'; @@ -202,6 +203,20 @@ const routes = [ component: Tags, name: 'tags', }, + { + path: '/notifications', + redirect: { + name: 'notifications', + params: { + pageNumber: 1, + }, + }, + }, + { + path: '/notifications/:pageNumber', + component: Notifications, + name: 'notifications', + }, { path: '/stash/:stashId/:stashSlug?', component: Stash, diff --git a/assets/js/ui/actions.js b/assets/js/ui/actions.js index 6e457a24..0864e822 100644 --- a/assets/js/ui/actions.js +++ b/assets/js/ui/actions.js @@ -29,7 +29,7 @@ function initUiActions(store, _router) { localStorage.setItem('sfw', sfw); } - async function fetchNotifications({ commit }) { + async function fetchNotifications(_context, { page = 1, limit = 10 } = {}) { if (!store.state.auth.user) { return []; } @@ -38,44 +38,50 @@ function initUiActions(store, _router) { query Notifications( $hasAuth: Boolean! $userId: Int + $limit: Int = 10 + $offset: Int = 0 ) { - notifications( - first: 10 + notifications: notificationsConnection( + first: $limit + offset: $offset orderBy: CREATED_AT_DESC ) { - id - sceneId - userId - seen - createdAt - scene { - ${releaseFields} - } - alert { - tags: alertsTags { - tag { - id - name - slug - } + nodes { + id + sceneId + userId + seen + createdAt + scene { + ${releaseFields} } - actors: alertsActors { - actor { - id - name - slug + alert { + tags: alertsTags { + tag { + id + name + slug + } } - } - entity: alertsEntityByAlertId { - entity { - id - name - slug - independent + actors: alertsActors { + actor { + id + name + slug + } + } + entity: alertsEntityByAlertId { + entity { + id + name + slug + independent + } } } } - } + totalCount + } unseenNotifications: notificationsConnection( filter: { seen: { equalTo: false } } ) { @@ -85,15 +91,15 @@ function initUiActions(store, _router) { `, { hasAuth: !!store.state.auth.user, userId: store.state.auth.user?.id, + limit, + offset: (page - 1) * limit, }); - const curatedNotifications = notifications.map(notification => curateNotification(notification)); - - commit('setNotifications', curatedNotifications); - commit('setUnseenNotificationsCount', unseenNotifications.totalCount); + const curatedNotifications = notifications.nodes.map(notification => curateNotification(notification)); return { notifications: curatedNotifications, + totalCount: notifications.totalCount, unseenCount: unseenNotifications.totalCount, }; } @@ -207,6 +213,8 @@ function initUiActions(store, _router) { userId: store.state.auth.user?.id, }); + console.log(res.results); + return { releases: res?.results.map(result => curateRelease(result.release)) || [], actors: res?.actors.map(actor => curateActor(actor)) || [], diff --git a/assets/js/ui/mutations.js b/assets/js/ui/mutations.js index b8834b83..76184f2f 100644 --- a/assets/js/ui/mutations.js +++ b/assets/js/ui/mutations.js @@ -1,11 +1,3 @@ -function setNotifications(state, notifications) { - state.notifications = notifications; -} - -function setUnseenNotificationsCount(state, count) { - state.unseenNotificationsCount = count; -} - function setTagFilter(state, tagFilter) { state.tagFilter = tagFilter; } @@ -27,8 +19,6 @@ function setTheme(state, theme) { } export default { - setNotifications, - setUnseenNotificationsCount, setTagFilter, setRange, setBatch, diff --git a/assets/js/ui/state.js b/assets/js/ui/state.js index 0ccdb28f..e6818dfe 100644 --- a/assets/js/ui/state.js +++ b/assets/js/ui/state.js @@ -11,6 +11,4 @@ export default { batch: storedBatch || 'all', sfw: storedSfw === 'true' || false, theme: storedTheme || deviceTheme, - notifications: [], - unseenNotificationsCount: 0, }; diff --git a/public/img/tags/enhanced-boobs/lara_frost_handsonhardcore.jpeg b/public/img/tags/enhanced-boobs/lara_frost_handsonhardcore.jpeg new file mode 100644 index 00000000..7149a842 Binary files /dev/null and b/public/img/tags/enhanced-boobs/lara_frost_handsonhardcore.jpeg differ diff --git a/public/img/tags/enhanced-boobs/lazy/lara_frost_handsonhardcore.jpeg b/public/img/tags/enhanced-boobs/lazy/lara_frost_handsonhardcore.jpeg new file mode 100644 index 00000000..d0099258 Binary files /dev/null and b/public/img/tags/enhanced-boobs/lazy/lara_frost_handsonhardcore.jpeg differ diff --git a/public/img/tags/enhanced-boobs/thumbs/lara_frost_handsonhardcore.jpeg b/public/img/tags/enhanced-boobs/thumbs/lara_frost_handsonhardcore.jpeg new file mode 100644 index 00000000..81a13f7b Binary files /dev/null and b/public/img/tags/enhanced-boobs/thumbs/lara_frost_handsonhardcore.jpeg differ diff --git a/public/img/tags/facefucking/adria_rae_throated.jpeg b/public/img/tags/facefucking/adria_rae_throated.jpeg new file mode 100644 index 00000000..89a5ef11 Binary files /dev/null and b/public/img/tags/facefucking/adria_rae_throated.jpeg differ diff --git a/public/img/tags/facefucking/lazy/adria_rae_throated.jpeg b/public/img/tags/facefucking/lazy/adria_rae_throated.jpeg new file mode 100644 index 00000000..1cced152 Binary files /dev/null and b/public/img/tags/facefucking/lazy/adria_rae_throated.jpeg differ diff --git a/public/img/tags/facefucking/thumbs/adria_rae_throated.jpeg b/public/img/tags/facefucking/thumbs/adria_rae_throated.jpeg new file mode 100644 index 00000000..ec0a110d Binary files /dev/null and b/public/img/tags/facefucking/thumbs/adria_rae_throated.jpeg differ diff --git a/seeds/02_sites.js b/seeds/02_sites.js index 9b643257..129d5e6c 100644 --- a/seeds/02_sites.js +++ b/seeds/02_sites.js @@ -2989,7 +2989,7 @@ const sites = [ { name: 'Black Ambush', slug: 'blackambush', - alias: ['interracial', 'bbc'], + tags: ['bbc'], url: 'https://blackambush.com', parent: 'exploitedx', }, diff --git a/seeds/04_media.js b/seeds/04_media.js index 1a9a1e00..cfe7dba9 100644 --- a/seeds/04_media.js +++ b/seeds/04_media.js @@ -763,8 +763,9 @@ const tagMedia = [ ['dv-tp', 0, 'Luna Rival in SZ1490'], ['facefucking', 5, 'Mia Moore B', 'throated'], ['facefucking', 6, 'Halle Hayes in "Towering Temptress"', '5kporn'], - ['facefucking', 7, 'Anya Olsen and Audrey Snow in "Babysitter Busted Giving A BJ"', 'mommyblowsbest'], + ['facefucking', 'adria_rae_throated', 'Adria Rae in "Adria Rae Sucks Cock All Day"', 'throated'], ['facefucking', 1, 'Paige Owens in "Dark Meat 12"', 'evilangel'], + ['facefucking', 7, 'Anya Olsen and Audrey Snow in "Babysitter Busted Giving A BJ"', 'mommyblowsbest'], ['facefucking', 0, 'Ashly Anderson in "Rough Love"', 'hookuphotshot'], ['facefucking', 2, 'Jynx Maze', 'throated'], ['facefucking', 4, 'Brooklyn Gray in "Throats Fucks 6"', 'evilangel'], @@ -793,7 +794,7 @@ const tagMedia = [ ['enhanced-boobs', '23d', 'Lulu Sex Bomb in "Tropical Touch"'], ['enhanced-boobs', 22, 'Sakura Sena'], ['enhanced-boobs', 'mareeva_trudy_photodromm_1', 'Mareeva and Trudy', 'photodromm'], - ['enhanced-boobs', 'lara_frost_legalporno', 'Lara Frost in NRX059', 'legalporno'], + ['enhanced-boobs', 'lara_frost_handsonhardcore', 'Lara Frost in "Handyman & Hubby Try To Satisfy Horny Little Ukrainian Nympho"', 'handsonhardcore'], ['enhanced-boobs', 'shawna_lenee_inthecrack_3', 'Shawna Lenee', 'inthecrack'], ['enhanced-boobs', 16, 'Marsha May in "Once You Go Black 7"', 'julesjordan'], ['enhanced-boobs', 'azul_hermosa_pornstarslikeitbig', 'Azul Hermosa in "She Likes Rough Quickies"', 'pornstarslikeitbig'],