From cad8b2280f4c8e041c5b8358385d37e51b6eef07 Mon Sep 17 00:00:00 2001 From: Ultradesu Date: Tue, 28 Jul 2026 21:27:48 +0100 Subject: [PATCH] Added favicon --- Cargo.lock | 2 +- templates/base.html | 1 + templates/player/scripts.html | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index e96771a..f38904a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1835,7 +1835,7 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "furumusic" -version = "0.9.5" +version = "0.9.6" dependencies = [ "anyhow", "async-stream", diff --git a/templates/base.html b/templates/base.html index 5028260..b3dab6d 100644 --- a/templates/base.html +++ b/templates/base.html @@ -3,6 +3,7 @@ + {% block title %}{{ t.site_name }}{% endblock title %} {% block head_extra %}{% endblock head_extra %} diff --git a/templates/player/scripts.html b/templates/player/scripts.html index b24656a..4f0203c 100644 --- a/templates/player/scripts.html +++ b/templates/player/scripts.html @@ -735,6 +735,7 @@ document.addEventListener('alpine:init', () => { _remoteStateReceivedAt: 0, _remoteStateTimer: null, _prefetchedQueueKey: null, + _baseDocumentTitle: '', _hasInitialShareLink() { const params = new URLSearchParams(window.location.search); @@ -744,6 +745,10 @@ document.addEventListener('alpine:init', () => { init() { audio.volume = this.volume; + this._baseDocumentTitle = document.title.replace(/^▶\s*/, ''); + Alpine.effect(() => { + document.title = `${this.isPlaying ? '▶ ' : ''}${this._baseDocumentTitle}`; + }); audio.addEventListener('timeupdate', () => { this.currentTime = audio.currentTime;