activate live statistics via settings
All checks were successful
deploy / build-and-deploy (push) Successful in 16s
All checks were successful
deploy / build-and-deploy (push) Successful in 16s
This commit is contained in:
@@ -4,12 +4,13 @@ import Countdown from '@app/website/index/Countdown.svelte';
|
||||
import LiveStats from '@app/website/index/LiveStats.svelte';
|
||||
import Craftattack from '@assets/img/craftattack.webp';
|
||||
import Background from '@assets/img/background.webp';
|
||||
import { START_DATE, STATISTICS_ENDPOINT } from 'astro:env/server';
|
||||
import { START_DATE } from 'astro:env/server';
|
||||
import { getSetting, SettingKey } from '@util/settings';
|
||||
import { db } from '@db/database.ts';
|
||||
|
||||
const signupEnabled = await getSetting(db, SettingKey.SignupEnabled, false);
|
||||
const signupInfoMessage = await getSetting(db, SettingKey.SignupInfoMessage);
|
||||
const statisticsEnabled = await getSetting(db, SettingKey.LiveStatisticsEnabled, false);
|
||||
|
||||
const information = [
|
||||
{
|
||||
@@ -98,7 +99,7 @@ const information = [
|
||||
|
||||
<div class="flex flex-col justify-center items-center py-20 bg-base-100">
|
||||
{
|
||||
STATISTICS_ENDPOINT && (
|
||||
statisticsEnabled && (
|
||||
<>
|
||||
<LiveStats />
|
||||
<div class="divider divider-horizontal mx-auto my-6 h-18" />
|
||||
|
||||
Reference in New Issue
Block a user