From dae82a26d07db663d56a1a4f45f18352d2075a8f Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Sun, 19 May 2013 13:23:39 +1200 Subject: [PATCH] Navbar now toggles between the play & pause button. Ugly approach, but I could get it working by changing the
  • ... --- lib/EtcX/Sounds.pm | 2 +- views/layouts/main.tt | 63 ++++++++++++++++++++++++++++++++++--------- 2 files changed, 51 insertions(+), 14 deletions(-) diff --git a/lib/EtcX/Sounds.pm b/lib/EtcX/Sounds.pm index d8a89e3..7c46eee 100644 --- a/lib/EtcX/Sounds.pm +++ b/lib/EtcX/Sounds.pm @@ -68,7 +68,7 @@ ajax '/current/' => sub { } } else { return { - state => 'none', + state => $mpd->status->state(), title => 'No song playing', } } diff --git a/views/layouts/main.tt b/views/layouts/main.tt index 1962be7..95f689a 100644 --- a/views/layouts/main.tt +++ b/views/layouts/main.tt @@ -18,12 +18,17 @@
    [% content %]
    -
    +
    +
    + @@ -31,6 +36,9 @@