From f101791d020483844e9afd846836a12856360316 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 15 Aug 2022 15:55:30 -0700 Subject: [PATCH] Fix overlap betwen favicon and splash icon --- packages/backend/src/server/web/index.ts | 7 ++++--- packages/backend/src/server/web/views/base.pug | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/server/web/index.ts b/packages/backend/src/server/web/index.ts index 0d3f012c4b..4a6dfaff17 100644 --- a/packages/backend/src/server/web/index.ts +++ b/packages/backend/src/server/web/index.ts @@ -530,16 +530,17 @@ router.get('(.*)', async ctx => { if (meta.customMOTD.length > 0) { motd = meta.customMOTD; } - let iconUrl = meta.iconUrl; + let splashIconUrl = meta.iconUrl; if (meta.customSplashIcons.length > 0) { - iconUrl = meta.customSplashIcons[Math.floor(Math.random() * meta.customSplashIcons.length)]; + splashIconUrl = meta.customSplashIcons[Math.floor(Math.random() * meta.customSplashIcons.length)]; } await ctx.render('base', { img: meta.bannerUrl, title: meta.name || 'Calckey', instanceName: meta.name || 'Calckey', desc: meta.description, - icon: iconUrl, + icon: meta.iconUrl, + splashIcon: splashIconUrl, themeColor: meta.themeColor, privateMode: meta.privateMode, randomMOTD: motd[Math.floor(Math.random() * motd.length)], diff --git a/packages/backend/src/server/web/views/base.pug b/packages/backend/src/server/web/views/base.pug index 925bd6ba90..d019d2f649 100644 --- a/packages/backend/src/server/web/views/base.pug +++ b/packages/backend/src/server/web/views/base.pug @@ -77,7 +77,7 @@ html br | Please turn on your JavaScript div#splash - img#splashIcon(src= icon || '/static-assets/splash.png') + img#splashIcon(src= splashIcon || '/static-assets/splash.png') span#splashText block randomMOTD = randomMOTD