Compare commits
No commits in common. "1a9ded19c565b4339206122a976c2f57ef80af53" and "0a92586c53f553107c95a436a2aa33d450fe79db" have entirely different histories.
1a9ded19c5
...
0a92586c53
|
@ -17,8 +17,6 @@
|
||||||
:src="getPath(actor.avatar, 'thumbnail')"
|
:src="getPath(actor.avatar, 'thumbnail')"
|
||||||
:style="{ 'background-image': getBgPath(actor.avatar, 'lazy') }"
|
:style="{ 'background-image': getBgPath(actor.avatar, 'lazy') }"
|
||||||
:title="actor.avatar.credit && `© ${actor.avatar.credit}`"
|
:title="actor.avatar.credit && `© ${actor.avatar.credit}`"
|
||||||
:width="actor.avatar.thumbnailWidth"
|
|
||||||
:height="actor.avatar.thumbnailHeight"
|
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
class="avatar photo"
|
class="avatar photo"
|
||||||
@load="$emit('load', $event)"
|
@load="$emit('load', $event)"
|
||||||
|
@ -37,8 +35,6 @@
|
||||||
:src="getPath(photo, 'thumbnail')"
|
:src="getPath(photo, 'thumbnail')"
|
||||||
:style="{ 'background-image': getBgPath(photo, 'lazy') }"
|
:style="{ 'background-image': getBgPath(photo, 'lazy') }"
|
||||||
:title="`© ${photo.credit || photo.entity.name}`"
|
:title="`© ${photo.credit || photo.entity.name}`"
|
||||||
:width="photo.thumbnailWidth"
|
|
||||||
:height="photo.thumbnailHeight"
|
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
class="photo"
|
class="photo"
|
||||||
@load="$emit('load', $event)"
|
@load="$emit('load', $event)"
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
<img
|
<img
|
||||||
:src="getPath(item, 'thumbnail', { local })"
|
:src="getPath(item, 'thumbnail', { local })"
|
||||||
:style="{ 'background-image': `url('${getPath(item, 'lazy', { local })}')` }"
|
:style="{ 'background-image': `url('${getPath(item, 'lazy', { local })}')` }"
|
||||||
:width="item.thumbnailWidth"
|
:width="item.width"
|
||||||
:height="item.thumbnailHeight"
|
:height="item.height"
|
||||||
:title="item.title"
|
:title="item.title"
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
class="item image"
|
class="item image"
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
:src="getPath(photo, 'thumbnail', { local: true })"
|
:src="getPath(photo, 'thumbnail', { local: true })"
|
||||||
:style="{ 'background-image': `url(${getPath(photo, 'lazy', { local: true })})` }"
|
:style="{ 'background-image': `url(${getPath(photo, 'lazy', { local: true })})` }"
|
||||||
:alt="photo.comment"
|
:alt="photo.comment"
|
||||||
:width="photo.thumbnailWidth"
|
:width="photo.width"
|
||||||
:height="photo.thumbnailHeight"
|
:height="photo.height"
|
||||||
class="photo"
|
class="photo"
|
||||||
@load="$emit('load', $event)"
|
@load="$emit('load', $event)"
|
||||||
>
|
>
|
||||||
|
|
|
@ -94,10 +94,6 @@ function initActorActions(store, router) {
|
||||||
path
|
path
|
||||||
thumbnail
|
thumbnail
|
||||||
lazy
|
lazy
|
||||||
width
|
|
||||||
height
|
|
||||||
thumbnailWidth
|
|
||||||
thumbnailHeight
|
|
||||||
hash
|
hash
|
||||||
comment
|
comment
|
||||||
credit
|
credit
|
||||||
|
@ -130,10 +126,6 @@ function initActorActions(store, router) {
|
||||||
path
|
path
|
||||||
thumbnail
|
thumbnail
|
||||||
lazy
|
lazy
|
||||||
width
|
|
||||||
height
|
|
||||||
thumbnailWidth
|
|
||||||
thumbnailHeight
|
|
||||||
hash
|
hash
|
||||||
isS3
|
isS3
|
||||||
comment
|
comment
|
||||||
|
|
|
@ -110,8 +110,6 @@ const releasePosterFragment = `
|
||||||
thumbnail
|
thumbnail
|
||||||
width
|
width
|
||||||
height
|
height
|
||||||
thumbnailWidth
|
|
||||||
thumbnailHeight
|
|
||||||
lazy
|
lazy
|
||||||
isS3
|
isS3
|
||||||
comment
|
comment
|
||||||
|
@ -135,8 +133,6 @@ const releaseCoversFragment = `
|
||||||
thumbnail
|
thumbnail
|
||||||
width
|
width
|
||||||
height
|
height
|
||||||
thumbnailWidth
|
|
||||||
thumbnailHeight
|
|
||||||
lazy
|
lazy
|
||||||
isS3
|
isS3
|
||||||
comment
|
comment
|
||||||
|
@ -160,8 +156,6 @@ const releasePhotosFragment = `
|
||||||
thumbnail
|
thumbnail
|
||||||
width
|
width
|
||||||
height
|
height
|
||||||
thumbnailWidth
|
|
||||||
thumbnailHeight
|
|
||||||
lazy
|
lazy
|
||||||
isS3
|
isS3
|
||||||
comment
|
comment
|
||||||
|
|
|
@ -109,10 +109,6 @@ function initReleasesActions(store, router) {
|
||||||
path
|
path
|
||||||
thumbnail
|
thumbnail
|
||||||
lazy
|
lazy
|
||||||
width
|
|
||||||
height
|
|
||||||
thumbnailWidth
|
|
||||||
thumbnailHeight
|
|
||||||
isS3
|
isS3
|
||||||
sfw: sfwMedia {
|
sfw: sfwMedia {
|
||||||
id
|
id
|
||||||
|
@ -171,10 +167,6 @@ function initReleasesActions(store, router) {
|
||||||
id
|
id
|
||||||
path
|
path
|
||||||
thumbnail
|
thumbnail
|
||||||
width
|
|
||||||
height
|
|
||||||
thumbnailWidth
|
|
||||||
thumbnailHeight
|
|
||||||
lazy
|
lazy
|
||||||
isS3
|
isS3
|
||||||
}
|
}
|
||||||
|
@ -185,10 +177,6 @@ function initReleasesActions(store, router) {
|
||||||
path
|
path
|
||||||
thumbnail
|
thumbnail
|
||||||
lazy
|
lazy
|
||||||
width
|
|
||||||
height
|
|
||||||
thumbnailWidth
|
|
||||||
thumbnailHeight
|
|
||||||
isS3
|
isS3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -197,10 +185,6 @@ function initReleasesActions(store, router) {
|
||||||
id
|
id
|
||||||
path
|
path
|
||||||
thumbnail
|
thumbnail
|
||||||
width
|
|
||||||
height
|
|
||||||
thumbnailWidth
|
|
||||||
thumbnailHeight
|
|
||||||
lazy
|
lazy
|
||||||
isS3
|
isS3
|
||||||
}
|
}
|
||||||
|
@ -228,10 +212,6 @@ function initReleasesActions(store, router) {
|
||||||
path
|
path
|
||||||
thumbnail
|
thumbnail
|
||||||
lazy
|
lazy
|
||||||
width
|
|
||||||
height
|
|
||||||
thumbnailWidth
|
|
||||||
thumbnailHeight
|
|
||||||
isS3
|
isS3
|
||||||
comment
|
comment
|
||||||
sfw: sfwMedia {
|
sfw: sfwMedia {
|
||||||
|
|
|
@ -41,8 +41,6 @@ function initTagsActions(store, _router) {
|
||||||
path
|
path
|
||||||
width
|
width
|
||||||
height
|
height
|
||||||
thumbnailWidth
|
|
||||||
thumbnailHeight
|
|
||||||
comment
|
comment
|
||||||
entity {
|
entity {
|
||||||
id
|
id
|
||||||
|
@ -75,8 +73,6 @@ function initTagsActions(store, _router) {
|
||||||
path
|
path
|
||||||
width
|
width
|
||||||
height
|
height
|
||||||
thumbnailWidth
|
|
||||||
thumbnailHeight
|
|
||||||
comment
|
comment
|
||||||
entity {
|
entity {
|
||||||
id
|
id
|
||||||
|
@ -170,8 +166,6 @@ function initTagsActions(store, _router) {
|
||||||
lazy
|
lazy
|
||||||
width
|
width
|
||||||
height
|
height
|
||||||
thumbnailWidth
|
|
||||||
thumbnailHeight
|
|
||||||
entity {
|
entity {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.186.2",
|
"version": "1.186.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"version": "1.186.2",
|
"version": "1.186.1",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@casl/ability": "^5.2.2",
|
"@casl/ability": "^5.2.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.186.2",
|
"version": "1.186.1",
|
||||||
"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": {
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
'use strict';
|
|
||||||
|
|
||||||
const config = require('config');
|
|
||||||
const { makeExtendSchemaPlugin, gql } = require('graphile-utils');
|
|
||||||
|
|
||||||
const schemaExtender = makeExtendSchemaPlugin(_build => ({
|
|
||||||
typeDefs: gql`
|
|
||||||
extend type Media {
|
|
||||||
thumbnailWidth: Int @requires(columns: ["width", "height"])
|
|
||||||
thumbnailHeight: Int @requires(columns: ["height", "width"])
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
resolvers: {
|
|
||||||
Media: {
|
|
||||||
thumbnailWidth(parent, _args, _context, _info) {
|
|
||||||
if (!parent.width || !parent.height) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (parent.height <= config.media.thumbnailSize) {
|
|
||||||
// thumbnails aren't upscaled
|
|
||||||
return parent.width;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Math.round(parent.width / (parent.height / config.media.thumbnailSize));
|
|
||||||
},
|
|
||||||
thumbnailHeight(parent, _args, _context, _info) {
|
|
||||||
if (!parent.width || !parent.height) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (parent.height <= config.media.thumbnailSize) {
|
|
||||||
// thumbnails aren't upscaled
|
|
||||||
return parent.height;
|
|
||||||
}
|
|
||||||
|
|
||||||
return config.media.thumbnailSize;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}));
|
|
||||||
|
|
||||||
module.exports = [schemaExtender];
|
|
|
@ -3,11 +3,9 @@
|
||||||
const ActorPlugins = require('./actors');
|
const ActorPlugins = require('./actors');
|
||||||
const SitePlugins = require('./sites');
|
const SitePlugins = require('./sites');
|
||||||
// const ReleasePlugins = require('./releases');
|
// const ReleasePlugins = require('./releases');
|
||||||
const MediaPlugins = require('./media');
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
ActorPlugins,
|
ActorPlugins,
|
||||||
SitePlugins,
|
SitePlugins,
|
||||||
ReleasePlugins: [],
|
ReleasePlugins: [],
|
||||||
MediaPlugins,
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,7 +8,7 @@ const PgConnectionFilterPlugin = require('postgraphile-plugin-connection-filter'
|
||||||
const PgSimplifyInflectorPlugin = require('@graphile-contrib/pg-simplify-inflector');
|
const PgSimplifyInflectorPlugin = require('@graphile-contrib/pg-simplify-inflector');
|
||||||
const PgOrderByRelatedPlugin = require('@graphile-contrib/pg-order-by-related');
|
const PgOrderByRelatedPlugin = require('@graphile-contrib/pg-order-by-related');
|
||||||
|
|
||||||
const { ActorPlugins, SitePlugins, ReleasePlugins, MediaPlugins } = require('./plugins/plugins');
|
const { ActorPlugins, SitePlugins, ReleasePlugins } = require('./plugins/plugins');
|
||||||
|
|
||||||
const connectionString = `postgres://${config.database.query.user}:${config.database.query.password}@${config.database.query.host}:5432/${config.database.query.database}`;
|
const connectionString = `postgres://${config.database.query.user}:${config.database.query.password}@${config.database.query.host}:5432/${config.database.query.database}`;
|
||||||
|
|
||||||
|
@ -42,7 +42,6 @@ module.exports = postgraphile(
|
||||||
...ActorPlugins,
|
...ActorPlugins,
|
||||||
...SitePlugins,
|
...SitePlugins,
|
||||||
...ReleasePlugins,
|
...ReleasePlugins,
|
||||||
...MediaPlugins,
|
|
||||||
],
|
],
|
||||||
pgSettings,
|
pgSettings,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue