tweak: use qr code image for favicon as well (#3031)

use qr code image for favicon as well
This commit is contained in:
Arc 2025-03-12 11:12:43 +00:00 committed by GitHub
parent 1833adc0a1
commit 28e32a54a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 6 deletions

View file

@ -1,5 +1,4 @@
from http import HTTPStatus from http import HTTPStatus
from pathlib import Path
from typing import Annotated, List, Optional, Union from typing import Annotated, List, Optional, Union
from urllib.parse import urlencode, urlparse from urllib.parse import urlencode, urlparse
@ -37,7 +36,7 @@ generic_router = APIRouter(
@generic_router.get("/favicon.ico", response_class=FileResponse) @generic_router.get("/favicon.ico", response_class=FileResponse)
async def favicon(): async def favicon():
return FileResponse(Path("lnbits", "static", "favicon.ico")) return RedirectResponse(settings.lnbits_qr_logo)
@generic_router.get("/", response_class=HTMLResponse) @generic_router.get("/", response_class=HTMLResponse)

View file

@ -260,7 +260,7 @@ class ThemesSettings(LNbitsSettings):
lnbits_ad_space_enabled: bool = Field(default=False) lnbits_ad_space_enabled: bool = Field(default=False)
lnbits_allowed_currencies: list[str] = Field(default=[]) lnbits_allowed_currencies: list[str] = Field(default=[])
lnbits_default_accounting_currency: str | None = Field(default=None) lnbits_default_accounting_currency: str | None = Field(default=None)
lnbits_qr_logo: str = Field(default="/static/images/logos/lnbits.png") lnbits_qr_logo: str = Field(default="/static/favicon.ico")
lnbits_default_reaction: str = Field(default="confettiBothSides") lnbits_default_reaction: str = Field(default="confettiBothSides")
lnbits_default_theme: str = Field(default="salvador") lnbits_default_theme: str = Field(default="salvador")
lnbits_default_border: str = Field(default="hard-border") lnbits_default_border: str = Field(default="hard-border")

File diff suppressed because one or more lines are too long

View file

@ -507,8 +507,8 @@ window.localisation.en = {
denomination: 'Denomination', denomination: 'Denomination',
denomination_hint: 'The name for the FakeWallet token', denomination_hint: 'The name for the FakeWallet token',
denomination_error: 'Denomination must be 3 characters, or `sats`', denomination_error: 'Denomination must be 3 characters, or `sats`',
ui_qr_code_logo: 'QR Code Logo', ui_qr_code_logo: 'QR Code/Favicon Logo',
ui_qr_code_logo_hint: 'URL to logo image in QR code', ui_qr_code_logo_hint: 'QR code and favicon logo url',
ui_custom_image: 'Custom Image', ui_custom_image: 'Custom Image',
ui_custom_image_label: 'URL to custom image', ui_custom_image_label: 'URL to custom image',
ui_custom_image_hint: 'Image showed at homepage/login', ui_custom_image_hint: 'Image showed at homepage/login',