server: use configurable images

This commit is contained in:
Johann150 2022-12-12 19:26:55 +01:00
parent ae6ba05306
commit 5ea744b1b2
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1
2 changed files with 14 additions and 3 deletions

View file

@ -178,6 +178,15 @@ export const meta = {
type: 'string',
optional: false, nullable: true,
},
images: {
type: 'object',
optional: false, nullable: false,
properties: {
info: { type: 'string' },
notFound: { type: 'string' },
error: { type: 'string' },
},
},
features: {
type: 'object',
optional: true, nullable: false,
@ -301,6 +310,8 @@ export default define(meta, paramDef, async (ps, me) => {
proxyAccountName: instance.proxyAccountId ? (await Users.pack(instance.proxyAccountId).catch(() => null))?.username : null,
images: config.images,
features: {
registration: !instance.disableRegistration,
localTimeLine: !instance.disableLocalTimeline,

View file

@ -31,9 +31,9 @@ html
link(rel='icon' href= icon || '/favicon.ico')
link(rel='apple-touch-icon' href= icon || '/apple-touch-icon.png')
link(rel='manifest' href='/manifest.json')
link(rel='prefetch' href='https://xn--931a.moe/assets/info.jpg')
link(rel='prefetch' href='https://xn--931a.moe/assets/not-found.jpg')
link(rel='prefetch' href='https://xn--931a.moe/assets/error.jpg')
link(rel='prefetch' href=config.images.info)
link(rel='prefetch' href=config.images.notFound)
link(rel='prefetch' href=config.images.error)
link(rel='stylesheet' href='/assets/fontawesome/css/all.css')
link(rel='modulepreload' href=`/assets/${clientEntry.file}`)