Compare commits

..

No commits in common. "bb9649d23bf545bdbe9b38f5464d07b718048f09" and "1c3ee75d3b099c0a33a47bd20d36cd189496b1aa" have entirely different histories.

6 changed files with 20 additions and 42 deletions

View File

@ -2,7 +2,7 @@
<div class="media-container"> <div class="media-container">
<div <div
class="media" class="media"
:class="{ center: release.photos.length + release.scenesPhotos.length < 2, preview: !me }" :class="{ center: release.photos.length < 2, preview: !me }"
> >
<div <div
v-if="release.trailer || release.teaser" v-if="release.trailer || release.teaser"
@ -72,27 +72,23 @@
</div> </div>
<template v-if="release.covers && release.covers.length > 0"> <template v-if="release.covers && release.covers.length > 0">
<div <a
v-for="cover in release.covers" v-for="cover in release.covers"
:key="`cover-${cover.id}`" :key="`cover-${cover.id}`"
class="item-container" :href="getPath(cover)"
target="_blank"
rel="noopener noreferrer"
> >
<a <img
:href="getPath(cover)" :src="getPath(cover, 'thumbnail')"
target="_blank" :style="{ 'background-image': getBgPath(cover, 'lazy') }"
rel="noopener noreferrer" :width="cover.thumbnailWidth"
:height="cover.thumbnailHeight"
class="item cover"
loading="lazy"
@load="$emit('load', $event)"
> >
<img </a>
:src="getPath(cover, 'thumbnail')"
:style="{ 'background-image': getBgPath(cover, 'lazy') }"
:width="cover.thumbnailWidth"
:height="cover.thumbnailHeight"
class="item cover"
loading="lazy"
@load="$emit('load', $event)"
>
</a>
</div>
</template> </template>
<div <div

View File

@ -21,7 +21,7 @@
<Details :release="release" /> <Details :release="release" />
<button <button
v-if="release.photos?.length > 0 || release.scenesPhotos?.length > 0" v-if="release.photos.length > 0"
class="album-toggle" class="album-toggle"
@click="$router.push({ hash: '#album' })" @click="$router.push({ hash: '#album' })"
><Icon icon="grid3" />View album</button> ><Icon icon="grid3" />View album</button>
@ -287,7 +287,7 @@ function pageTitle() {
} }
function showAlbum() { function showAlbum() {
return (this.release.photos?.length > 0 || this.release.scenesPhotos?.length > 0) && this.$route.hash === '#album'; return this.release.photos?.length > 0 && this.$route.hash === '#album';
} }
export default { export default {

View File

@ -227,7 +227,7 @@ function initReleasesActions(store, router) {
slug slug
name name
} }
photos: ${type === 'series' ? 'seriesPhotosBySerieId' : 'moviesPhotos'} { photos: moviesPhotos {
${mediaFragment} ${mediaFragment}
} }
scenesPhotos { scenesPhotos {

View File

@ -3,7 +3,6 @@ const config = require('config');
exports.up = async (knex) => Promise.resolve() exports.up = async (knex) => Promise.resolve()
.then(() => knex.raw(` .then(() => knex.raw(`
ALTER FUNCTION movies_photos(movie movies) RENAME TO movies_scenes_photos; ALTER FUNCTION movies_photos(movie movies) RENAME TO movies_scenes_photos;
ALTER FUNCTION series_photos(serie series) RENAME TO series_scenes_photos;
`)) `))
.then(() => knex.schema.createTable('movies_photos', (table) => { .then(() => knex.schema.createTable('movies_photos', (table) => {
table.integer('movie_id', 16) table.integer('movie_id', 16)
@ -19,20 +18,6 @@ exports.up = async (knex) => Promise.resolve()
table.unique(['movie_id', 'media_id']); table.unique(['movie_id', 'media_id']);
})) }))
.then(() => knex.schema.createTable('series_photos', (table) => {
table.integer('serie_id', 16)
.notNullable()
.references('id')
.inTable('series')
.onDelete('cascade');
table.text('media_id', 21)
.notNullable()
.references('id')
.inTable('media');
table.unique(['serie_id', 'media_id']);
}))
.then(() => knex.raw(` .then(() => knex.raw(`
GRANT ALL ON ALL TABLES IN SCHEMA public TO :visitor; GRANT ALL ON ALL TABLES IN SCHEMA public TO :visitor;
GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO :visitor; GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO :visitor;
@ -42,8 +27,5 @@ exports.up = async (knex) => Promise.resolve()
exports.down = async (knex) => knex.raw(` exports.down = async (knex) => knex.raw(`
DROP TABLE IF EXISTS movies_photos CASCADE; DROP TABLE IF EXISTS movies_photos CASCADE;
DROP TABLE IF EXISTS series_photos CASCADE;
ALTER FUNCTION movies_scenes_photos(movie movies) RENAME TO movies_photos; ALTER FUNCTION movies_scenes_photos(movie movies) RENAME TO movies_photos;
ALTER FUNCTION series_scenes_photos(serie series) RENAME TO series_photos;
`); `);

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.212.1", "version": "1.212.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "traxxx", "name": "traxxx",
"version": "1.212.1", "version": "1.212.0",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@casl/ability": "^5.2.2", "@casl/ability": "^5.2.2",

View File

@ -1,6 +1,6 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.212.1", "version": "1.212.0",
"description": "All the latest porn releases in one place", "description": "All the latest porn releases in one place",
"main": "src/app.js", "main": "src/app.js",
"scripts": { "scripts": {