mirror of
https://github.com/d0zingcat/BroadcastChannel.git
synced 2026-06-03 23:16:50 +00:00
feat: add HIDE_DESCRIPTION env variable to control TG description visibility
Co-authored-by: miantiao-me <2959393+miantiao-me@users.noreply.github.com>
This commit is contained in:
@@ -16,6 +16,7 @@ HEADER_INJECT=HEADER_INJECT
|
|||||||
|
|
||||||
NO_FOLLOW=false
|
NO_FOLLOW=false
|
||||||
NO_INDEX=false
|
NO_INDEX=false
|
||||||
|
HIDE_DESCRIPTION=false
|
||||||
|
|
||||||
TELEGRAM_HOST=telegram.dog
|
TELEGRAM_HOST=telegram.dog
|
||||||
STATIC_PROXY=""
|
STATIC_PROXY=""
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ const MASTODON = getEnv(import.meta.env, Astro, 'MASTODON')
|
|||||||
const BLUESKY = getEnv(import.meta.env, Astro, 'BLUESKY')
|
const BLUESKY = getEnv(import.meta.env, Astro, 'BLUESKY')
|
||||||
|
|
||||||
const staticProxy = getEnv(import.meta.env, Astro, 'STATIC_PROXY') ?? '/static/'
|
const staticProxy = getEnv(import.meta.env, Astro, 'STATIC_PROXY') ?? '/static/'
|
||||||
|
const hideDescription = getEnv(import.meta.env, Astro, 'HIDE_DESCRIPTION')
|
||||||
---
|
---
|
||||||
|
|
||||||
<div id="header">
|
<div id="header">
|
||||||
@@ -102,7 +103,7 @@ const staticProxy = getEnv(import.meta.env, Astro, 'STATIC_PROXY') ?? '/static/'
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{
|
{
|
||||||
channel?.descriptionHTML && channel?.descriptionHTML.length > 0 && (
|
!hideDescription && channel?.descriptionHTML && channel?.descriptionHTML.length > 0 && (
|
||||||
<div class="text-box" id="site-intro" set:html={channel?.descriptionHTML} />
|
<div class="text-box" id="site-intro" set:html={channel?.descriptionHTML} />
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user