diff --git a/CHANGELOG.md b/CHANGELOG.md index d74a5a7..79225c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ -## 0.6.3 – +## 0.6.3 – 2018-09-08 ### Fixed +- Fix table size issues for mobile clients + [#72](https://git.project-insanity.org/onny/nextcloud-app-radio/issues/72) @onny +- Include custom User-Agent header + [#75](https://git.project-insanity.org/onny/nextcloud-app-radio/issues/75) @onny - Fix loading all favorites [#58](https://git.project-insanity.org/onny/nextcloud-app-radio/issues/58) @onny - Remember favorite stations sort order diff --git a/css/main.css b/css/main.css index 39b0c9e..aeff13b 100644 --- a/css/main.css +++ b/css/main.css @@ -76,14 +76,6 @@ width: 100%; } -/* make sure there's enough room for the file actions */ -#body-user #filestable { - min-width: 688px; /* 768 (mobile break) - 80 (nav width) */ -} -#body-user #controls { - min-width: 688px; /* 768 (mobile break) - 80 (nav width) */ -} - #filestable tbody tr { background-color: #fff; height: 51px; diff --git a/img/folder_thumb.svg b/img/folder_thumb.svg new file mode 100644 index 0000000..c311e42 --- /dev/null +++ b/img/folder_thumb.svg @@ -0,0 +1 @@ + diff --git a/js/main.js b/js/main.js index 5398422..904a204 100644 --- a/js/main.js +++ b/js/main.js @@ -1,5 +1,7 @@ var MODULE = (function (radio) { + var version = "0.6.3" + $(document).ready(function () { // Scroll event handler @@ -200,7 +202,7 @@ var MODULE = (function (radio) { station_ids.forEach(function (station_id, idx) { var url = "https://www.radio-browser.info/webservice/json/stations/byid/"+station_ids[idx]; - $.getJSON( url , function( data ) { + $.getJSON( url , {"User-Agent": "Nextcloud Radio/"+version }, function( data ) { if (data.length === 0) { station_array = station_array.concat([{'id': station_id, 'name': 'Broken radio station entry :(', 'favicon': '', 'url': ''}]) @@ -246,6 +248,7 @@ var MODULE = (function (radio) { data: { name: query, limit: 20, + "User-Agent": "Nextcloud Radio/"+version, offset: offset }, dataType: 'json', @@ -263,5 +266,28 @@ var MODULE = (function (radio) { radio.switch_menu(0); }); + radio.action_load_categories = function (){ + $('#emptycontent').addClass('hidden'); + $('#filestable').show(); + $('.nofilterresults').addClass('hidden'); + $('.loading').addClass('hidden'); + $('tbody').append('\ + \ + \ + \ + Favorite\ + \ + \ + \ + \ + \ + Languages\ + \ + \ + '); + }; + return radio; }(MODULE || {})); diff --git a/js/navigation.js b/js/navigation.js index 8ca93c9..51d9628 100644 --- a/js/navigation.js +++ b/js/navigation.js @@ -16,6 +16,11 @@ var MODULE = (function (radio) { radio.switch_menu(2); }); + $('a.nav-icon-systemtagsfilter').click(function(e) { + e.preventDefault(); + radio.switch_menu(3); + }); + radio.load_menu_state = function() { var menu_state = 0; var baseUrl = OC.generateUrl('/apps/radio/getMenuState'); @@ -73,6 +78,11 @@ var MODULE = (function (radio) { $('li.nav-favorites').addClass('active'); radio.action_load_favorites(); break; + case 2: + history.pushState("", "", "#categories"); + $('li.nav-categories').addClass('active'); + radio.action_load_categories(); + break; } }, 500); }; diff --git a/templates/main.php b/templates/main.php index 7b00566..bab38cd 100755 --- a/templates/main.php +++ b/templates/main.php @@ -2,10 +2,10 @@ style('radio', 'main'); script('radio', 'main'); script('radio', 'navigation'); - script('radio', 'player'); + script('radio', 'player'); ?> -
+