frontend name now set in config

pull/52/head
tycrek 3 years ago
parent d5c8044a82
commit 7f588e2b1e
No known key found for this signature in database
GPG Key ID: 25D74F3943625263

@ -13,7 +13,7 @@ if (doSetup) {
}
// Load the config
const { host, port, useSsl, isProxied, s3enabled } = require('./config.json');
const { host, port, useSsl, isProxied, s3enabled, frontendName } = require('./config.json');
//#region Imports
const fs = require('fs-extra');
@ -32,7 +32,7 @@ const { name: ASS_NAME, version: ASS_VERSION } = require('./package.json');
log.blank().info(`* ${ASS_NAME} v${ASS_VERSION} *`).blank();
// Set up premium frontend
const FRONTEND_NAME = 'ass-x'; // <-- Change this to use a custom frontend
const FRONTEND_NAME = frontendName;
const ASS_PREMIUM = fs.existsSync(`./${FRONTEND_NAME}/package.json`) ? (require('submodule'), require(`./${FRONTEND_NAME}`)) : { enabled: false };
//#region Variables, module setup

@ -13,6 +13,7 @@ const config = {
saveWithDate: false,
saveAsOriginal: true,
mediaStrict: false,
frontendName: 'ass-x',
s3enabled: false,
s3endpoint: 'sfo3.digitaloceanspaces.com',
s3bucket: 'bucket-name',
@ -127,6 +128,12 @@ function doSetup() {
default: config.mediaStrict,
required: false
},
frontendName: {
description: 'Name of your frontend (leave blank if not using frontends)',
type: 'string',
default: config.frontendName,
required: false
},
s3enabled: {
description: 'Enable uploading to S3 storage endpoints',
type: 'boolean',

Loading…
Cancel
Save