Compare commits

..

No commits in common. "052767433386c372908e8e7fb0645056c4c809d4" and "2b338e32eb5e93811c57e8a91dc017fba244bb12" have entirely different histories.

7 changed files with 36 additions and 8 deletions

2
common

@ -1 +1 @@
Subproject commit c45852d6937abe25e1205af0b9b96d49970901c8
Subproject commit dc00c3d58af2c23530b8b3cb6704f3860fdd7d0f

View File

@ -67,6 +67,25 @@ module.exports = {
bans: {
defaultExpiry: 60 * 24 * 3, // in minutes, 3 days
},
socials: {
urls: {
cashapp: 'https://cash.app/${handle}', // eslint-disable-line no-template-curly-in-string
fansly: 'https://fansly.com/{handle}',
instagram: 'https://www.instagram.com/{handle}',
linktree: 'https://linktr.ee/{handle}',
loyalfans: 'https://www.loyalfans.com/{handle}',
manyvids: 'https://{handle}.manyvids.com',
onlyfans: 'https://onlyfans.com/{handle}',
pornhub: 'https://www.pornhub.com/model/{handle}',
reddit: 'https://www.reddit.com/u/{handle}',
twitter: 'https://x.com/{handle}',
},
prefix: {
default: '@',
cashapp: '$',
reddit: 'u/',
},
},
apiAccess: {
graphqlEnabled: true,
keySize: 24, // bytes

4
package-lock.json generated
View File

@ -1,11 +1,11 @@
{
"name": "traxxx-web",
"version": "0.41.25",
"version": "0.41.24",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "0.41.25",
"version": "0.41.24",
"dependencies": {
"@brillout/json-serializer": "^0.5.8",
"@dicebear/collection": "^7.0.5",

View File

@ -87,7 +87,7 @@
"overrides": {
"vite": "$vite"
},
"version": "0.41.25",
"version": "0.41.24",
"imports": {
"#/*": "./*.js"
}

View File

@ -19,7 +19,7 @@ import { curateStash } from './stashes.js';
import escape from '../utils/escape-manticore.js';
import slugify from '../utils/slugify.js';
import { curateRevision } from './revisions.js';
import { interpolateProfiles, platformsByHostname } from '../common/actors.mjs'; // eslint-disable-line import/namespace
import { interpolateProfiles } from '../common/actors.mjs'; // eslint-disable-line import/namespace
import { resolvePlace } from '../common/geo.mjs'; // eslint-disable-line import/namespace
const logger = initLogger();
@ -824,6 +824,16 @@ function convertWeight(weight, units) {
return Number(weight) || null;
}
const platformsByHostname = Object.fromEntries(Object.entries(config.socials.urls).map(([platform, url]) => {
const { hostname, pathname } = new URL(url);
return [hostname, {
platform,
pathname: decodeURIComponent(pathname),
url,
}];
}));
function curateSocials(socials) {
return socials.map((social) => {
if (!social.handle && !social.url) {

View File

@ -4,7 +4,6 @@ import { renderPage } from 'vike/server'; // eslint-disable-line import/extensio
import { fetchUserStashes } from '../stashes.js';
import { fetchUserTemplates } from '../users.js';
import { fetchUnseenNotificationsCount } from '../alerts.js';
import { socials } from '../../common/actors.mjs'; // eslint-disable-line import/namespace
export default async function mainHandler(req, res, next) {
const [stashes, templates, unseenNotifications] = req.user ? await Promise.all([
@ -44,7 +43,7 @@ export default async function mainHandler(req, res, next) {
media: config.media,
psa: config.psa,
links: config.links,
socials,
socials: config.socials,
},
meta: {
now: new Date().toISOString(),

2
static

@ -1 +1 @@
Subproject commit 475141c733eb1f1a76c179f4f9bbacadbad0186a
Subproject commit a24825ba1042dabfc488e72e934f08f9f4629000