upd: use metadata to fetch idRequired value

This should speed up the loading as it doesn't need to load all the instance info on initial load then
This commit is contained in:
Marie 2024-09-14 01:07:33 +02:00
parent fe32d3a4d9
commit 43ee1c52b8
No known key found for this signature in database
GPG key ID: 7ADF6C9CD9A28555
6 changed files with 15 additions and 14 deletions

View file

@ -198,6 +198,7 @@ export class ClientServerService {
notFoundImageUrl: meta.notFoundImageUrl ?? 'https://launcher.moe/missingpage.webp',
instanceUrl: this.config.url,
randomMOTD: this.config.customMOTD ? this.config.customMOTD[Math.floor(Math.random() * this.config.customMOTD.length)] : undefined,
idRequired: this.config.stripeAgeCheck.enabled && this.config.stripeAgeCheck.required ? "true" : "false",
metaJson: htmlSafeJsonStringify(await this.metaEntityService.packDetailed(meta)),
now: Date.now(),
};

View file

@ -31,6 +31,7 @@ html
meta(name='theme-color-orig' content= themeColor || '#86b300')
meta(property='og:site_name' content= instanceName || 'Sharkey')
meta(property='instance_url' content= instanceUrl)
meta(property='idRequired' content= idRequired)
meta(name='viewport' content='width=device-width, initial-scale=1')
meta(name='format-detection' content='telephone=no,date=no,address=no,email=no,url=no')
link(rel='icon' href= icon || '/favicon.ico')