1
0
Fork 0
mirror of https://github.com/heyarne/airsonic-ui.git synced 2026-05-07 02:33:39 +02:00

Mobile improvements (#42)

* Implement variadic url parameters

* Trying to make the audio player more mobile friendly

All good but progress bar is missing

* Implement progress bar with html elements, fixes #39

* Add duration text next to progress bar

* Simplify audio player structure

* Make albums more comfortably browsable on mobile

* Implement responsive generated covers with SVG

* Restrict progress bar to 100% max-width

* Make search results somewhat usable on mobile

* Implement progress bar with svg
This commit is contained in:
Arne Schlüter 2019-01-23 14:09:11 +01:00 committed by GitHub
commit a75cdca9e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 281 additions and 232 deletions

View file

@ -26,6 +26,17 @@
encoded-str (js/encodeURIComponent query)]
(is (str/includes? (api/url {:server "http://localhost"} "search3" {:query query}) encoded-str)))))
(deftest variadic-parameters
(testing "Should append list-like parameters correctly"
(is (= (count (re-seq #"id=" (api/url {:server "http://localost"} "test" {:id []}))) 0))
(is (= (count (re-seq #"id=" (api/url {:server "http://localost"} "test" {:id [1]}))) 1))
(is (= (count (re-seq #"id=" (api/url {:server "http://localost"} "test" {:id (range 10)}))) 10)))
(testing "Should keep the non-lists"
(let [mixed (api/url {:server "http://localost"} "test" {:id (range 5) :foo "bar"})]
(is (some? (re-find #"u=user" (api/url {:server "http://localhost"} "test" {:u "user"}))))
(is (and (some? (re-find #"foo=bar" mixed))
(= (count (re-seq #"id=" mixed)) 5))))))
(deftest stream-urls
(testing "Should construct the url based on a song's id"
(let [stream-url (api/stream-url {:server "http://localhost"} fixtures/song)]