From d8bea1f54f98d5e7eb6245baed69cb0c35dede28 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich <onny@project-insanity.org> Date: Tue, 8 Dec 2020 18:28:00 +0100 Subject: [PATCH] fix episode styling --- appinfo/info.xml | 2 +- img/podcast-trans.svg | 79 +++++++++++---------- img/podcast.svg | 80 +++++++++++---------- package.json | 2 +- src/components/Navigation.vue | 20 ++---- src/components/Table.vue | 57 +++++---------- src/router.js | 22 ++---- src/views/Podcast.vue | 126 +--------------------------------- 8 files changed, 114 insertions(+), 274 deletions(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index 46d3f0c..73f839d 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -17,7 +17,7 @@ app uses radio-browser.info database as a backend. - 👂 Smoth audio playback and transitions </description> - <version>0.1</version> + <version>0.0.1</version> <licence>agpl</licence> <author mail="onny@project-insanity.org" >Jonas Heinrich</author> <namespace>Podcast</namespace> diff --git a/img/podcast-trans.svg b/img/podcast-trans.svg index d1c1cff..2c8488f 100644 --- a/img/podcast-trans.svg +++ b/img/podcast-trans.svg @@ -7,49 +7,48 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - xml:space="preserve" - enable-background="new 0 0 32 32" - viewBox="0 0 32 32" - height="32px" - width="32px" - y="0px" - x="0px" - inkscape:export-filename="tasks.png" - inkscape:export-xdpi="90" - inkscape:export-ydpi="90" - inkscape:version="1.0 (4035a4fb49, 2020-05-01)" - sodipodi:docname="radio-trans.svg" + version="1.1" id="svg3212" - version="1.1"><metadata + sodipodi:docname="podcast-trans.svg" + inkscape:version="1.0 (4035a4fb49, 2020-05-01)" + inkscape:export-ydpi="90" + inkscape:export-xdpi="90" + inkscape:export-filename="tasks.png" + x="0px" + y="0px" + width="32px" + height="32px" + viewBox="0 0 32 32" + enable-background="new 0 0 32 32" + xml:space="preserve"><metadata id="metadata4147"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs id="defs4145" /><sodipodi:namedview - inkscape:document-rotation="0" - inkscape:window-maximized="1" - gridtolerance="10" - borderopacity="1" - inkscape:cy="-2.9149524" - pagecolor="#ffffff" - fit-margin-top="0" - objecttolerance="10" - showgrid="false" - guidetolerance="10" - inkscape:cx="25.717246" - bordercolor="#666666" - fit-margin-left="0" - inkscape:zoom="9.4816592" - inkscape:window-x="0" - inkscape:window-y="0" - inkscape:current-layer="svg3212" - fit-margin-right="0" - fit-margin-bottom="0" - inkscape:pageshadow="2" - inkscape:window-width="1436" - inkscape:window-height="872" + id="namedview11" inkscape:pageopacity="0" - id="namedview11" /><path - inkscape:connector-curvature="0" - id="path3615" - d="M 5.3238144,27.267185 C 4.7917522,26.986461 4.4177017,26.581211 4.15348,25.999229 3.8003492,25.221436 3.7647534,24.597298 3.760967,19.116498 c -0.00472,-6.734592 0.043233,-7.003791 1.4081752,-7.915674 0.3838272,-0.256425 0.8557816,-0.81894 1.0487872,-1.2500351 0.3881439,-0.8669515 0.696847,-1.050171 1.7694108,-1.050171 0.6153046,0 17.3966268,-4.5304592 17.8738818,-4.8254165 0.09106,-0.056281 0.165569,-0.2205616 0.165569,-0.3650743 0,-0.4502592 0.718636,-0.9390384 1.380639,-0.9390384 0.951238,0 1.424666,0.6039704 1.281254,1.6345411 -0.129059,0.9274084 -1.333846,1.3156669 -2.200009,0.7089804 -0.415963,-0.2913486 -1.010119,-0.1424718 -8.737412,2.189303 -7.553254,2.2792577 -8.2858093,2.5389107 -8.231577,2.9176578 0.058624,0.409366 0.2011827,0.417315 9.290147,0.517905 8.930592,0.09884 9.24936,0.115913 9.807245,0.525319 1.240788,0.910553 1.291519,1.220094 1.28693,7.851703 -0.0041,5.483245 -0.03929,6.104682 -0.392958,6.883734 -0.275308,0.606395 -0.629454,0.979142 -1.213275,1.276986 -0.801924,0.409108 -1.116904,0.420376 -11.508224,0.411592 C 6.4752908,27.680127 6.0787679,27.665504 5.3238144,27.267185 Z M 23.574967,24.413091 c 5.670694,-2.56158 3.953447,-10.889406 -2.247489,-10.899253 -2.266325,-0.0036 -4.232556,1.263149 -5.179497,3.336903 -0.618584,1.354659 -0.601273,3.486172 0.03827,4.71757 0.811796,1.562967 2.024216,2.627651 3.505321,3.078181 1.021571,0.310748 2.933086,0.195859 3.883354,-0.233401 z m -3.779875,-1.305019 c -0.566954,-0.259604 -0.451965,-0.281368 1.532386,-0.290021 1.959238,-0.0085 2.10102,0.01606 1.63454,0.282643 -0.647105,0.369916 -2.36642,0.373925 -3.166926,0.0074 z m -2.104466,-1.784943 c -0.13485,-0.13486 -0.245183,-0.318735 -0.245183,-0.408635 0,-0.0899 1.746913,-0.163461 3.882035,-0.163461 2.135117,0 3.882035,0.03847 3.882035,0.08544 0,0.04702 -0.05581,0.230882 -0.124033,0.408635 -0.106425,0.277366 -0.622083,0.323188 -3.636851,0.323188 -2.459781,0 -3.586336,-0.07349 -3.758012,-0.245182 z M 17.173017,19.59324 c -0.07492,-0.07491 -0.136209,-0.304773 -0.136209,-0.510794 0,-0.351339 0.266229,-0.374581 4.290672,-0.374581 h 4.290667 v 0.510794 0.510792 h -4.154459 c -2.284951,0 -4.215753,-0.06129 -4.290671,-0.136204 z m 0.272426,-2.022555 c 0,-0.06357 0.09518,-0.293432 0.211508,-0.510794 0.196639,-0.367424 0.460792,-0.395203 3.758013,-0.395203 3.652271,0 3.794549,0.03127 3.794549,0.833981 0,0.107348 -1.660743,0.187606 -3.882035,0.187606 -2.135122,0 -3.882035,-0.05202 -3.882035,-0.115592 z m 2.101905,-2.252774 c 0.950113,-0.515211 2.38094,-0.561304 3.312511,-0.106708 l 0.817269,0.39882 -2.34965,0.0084 c -2.209142,0.0078 -2.315593,-0.01012 -1.78013,-0.300476 z m -10.163162,5.95321 c 0.902098,-0.902104 0.4483519,-2.363689 -0.8337056,-2.685466 -0.6334803,-0.158992 -1.4698961,0.358676 -1.7438806,1.07931 -0.5908997,1.554184 1.3932053,2.790531 2.5775862,1.606156 z M 9.412824,16.220438 C 10.001146,15.667733 10.0206,14.848114 9.4622104,14.138272 8.9469518,13.483221 7.915845,13.411743 7.2113223,13.982234 c -0.5936896,0.480739 -0.6420795,1.657067 -0.093126,2.263656 0.5170523,0.571337 1.6729921,0.558516 2.2946005,-0.02544 z" - style="fill:#000000;stroke-width:0.40858808" /></svg> + inkscape:window-height="772" + inkscape:window-width="1276" + inkscape:pageshadow="2" + fit-margin-bottom="0" + fit-margin-right="0" + inkscape:current-layer="svg3212" + inkscape:window-y="0" + inkscape:window-x="0" + inkscape:zoom="11.339914" + fit-margin-left="0" + bordercolor="#666666" + inkscape:cx="25.289002" + guidetolerance="10" + showgrid="false" + objecttolerance="10" + fit-margin-top="0" + pagecolor="#ffffff" + inkscape:cy="12.053717" + borderopacity="1" + gridtolerance="10" + inkscape:window-maximized="1" + inkscape:document-rotation="0" /><path + style="stroke-width:0.0487184" + d="m 18.538667,27.416721 c -0.250558,0.926135 -1.197058,1.141812 -2.11579,1.141812 -0.91868,0 -1.86523,-0.215677 -2.115737,-1.141812 -0.372453,-1.385013 -1.002234,-4.855513 -1.002234,-6.470428 0,-1.712741 1.517186,-2.131426 3.117971,-2.131426 1.600789,0 3.117976,0.418685 3.117976,2.131426 0,1.605222 -0.627055,5.075427 -1.002186,6.470428 z m -5.386396,-9.744106 c -0.910692,-0.891935 -1.459504,-2.152035 -1.40231,-3.536901 0.100069,-2.422472 2.065415,-4.3825066 4.488129,-4.4762896 2.662699,-0.103088 4.861748,2.0331626 4.861748,4.6733546 0,1.306968 -0.539018,2.490286 -1.406303,3.33974 -0.130321,0.127642 -0.116972,0.340346 0.0306,0.447574 0.453665,0.329581 0.801903,0.747486 1.034484,1.235643 0.08482,0.178017 0.316523,0.227028 0.46034,0.09213 1.404356,-1.31749 2.267985,-3.204838 2.217221,-5.289106 -0.09037,-3.712629 -3.098242,-6.7332646 -6.810482,-6.8385456 -3.960507,-0.112343 -7.2182537,3.0768566 -7.2182537,7.0125666 0,2.015039 0.8541297,3.834133 2.2191187,5.11489 0.143866,0.134998 0.375668,0.08623 0.460535,-0.09193 0.232582,-0.488206 0.58087,-0.906062 1.034536,-1.235643 0.147566,-0.107178 0.160964,-0.319883 0.03065,-0.447478 z M 16.422877,3.6147454 c -6.031134,0 -10.9129052,4.880846 -10.9129052,10.9129056 0,4.384262 2.562682,8.070048 6.1257932,9.812264 0.211098,0.103185 0.451473,-0.07522 0.415811,-0.307413 -0.116047,-0.755719 -0.211535,-1.507637 -0.263371,-2.160123 -0.0072,-0.08944 -0.05598,-0.169832 -0.130467,-0.219816 -2.3092507,-1.549537 -3.8275072,-4.190558 -3.8091402,-7.1785 0.02884,-4.6885066 3.8628762,-8.5085606 8.5514792,-8.5207886 4.738395,-0.01238 8.597229,3.83881 8.597229,8.5743766 0,3.017224 -1.566685,5.675202 -3.929134,7.203836 -0.04867,0.68386 -0.149516,1.490195 -0.273992,2.300966 -0.03566,0.232241 0.204763,0.410647 0.415811,0.307412 3.554781,-1.738269 6.125795,-5.418453 6.125795,-9.812214 0,-6.0310856 -4.880847,-10.9129056 -10.912909,-10.9129056 z m 0,7.7949336 c -1.721997,0 -3.117971,1.395974 -3.117971,3.117972 0,1.721999 1.395974,3.117976 3.117971,3.117976 1.721999,0 3.117976,-1.395977 3.117976,-3.117976 0,-1.721998 -1.395977,-3.117972 -3.117976,-3.117972 z" + id="path143" /></svg> diff --git a/img/podcast.svg b/img/podcast.svg index a3a505b..06da819 100644 --- a/img/podcast.svg +++ b/img/podcast.svg @@ -1,6 +1,4 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Generator: Adobe Illustrator 15.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> - <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" @@ -9,48 +7,48 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - version="1.1" - id="svg3212" - sodipodi:docname="radio.svg" - inkscape:version="0.92.1 r" - inkscape:export-ydpi="90" - inkscape:export-xdpi="90" - inkscape:export-filename="tasks.png" - x="0px" - y="0px" - width="32px" - height="32px" - viewBox="0 0 32 32" + xml:space="preserve" enable-background="new 0 0 32 32" - xml:space="preserve"><metadata + viewBox="0 0 32 32" + height="32px" + width="32px" + y="0px" + x="0px" + inkscape:export-filename="tasks.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + inkscape:version="1.0 (4035a4fb49, 2020-05-01)" + sodipodi:docname="podcast.svg" + id="svg3212" + version="1.1"><metadata id="metadata4147"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs id="defs4145" /><sodipodi:namedview - id="namedview11" - inkscape:pageopacity="0" - inkscape:window-height="858" - inkscape:window-width="1436" - inkscape:pageshadow="2" - fit-margin-bottom="0" - fit-margin-right="0" - inkscape:current-layer="svg3212" - inkscape:window-y="21" - inkscape:window-x="2" - inkscape:zoom="9.4816592" - fit-margin-left="0" - bordercolor="#666666" - inkscape:cx="25.717246" - guidetolerance="10" - showgrid="false" - objecttolerance="10" - fit-margin-top="0" - pagecolor="#ffffff" - inkscape:cy="-2.9149524" - borderopacity="1" + inkscape:document-rotation="0" + inkscape:window-maximized="1" gridtolerance="10" - inkscape:window-maximized="0" /><path - style="fill:#ffffff;stroke-width:0.40858808" - d="M 5.3238144,27.267185 C 4.7917522,26.986461 4.4177017,26.581211 4.15348,25.999229 3.8003492,25.221436 3.7647534,24.597298 3.760967,19.116498 c -0.00472,-6.734592 0.043233,-7.003791 1.4081752,-7.915674 0.3838272,-0.256425 0.8557816,-0.81894 1.0487872,-1.2500351 0.3881439,-0.8669515 0.696847,-1.050171 1.7694108,-1.050171 0.6153046,0 17.3966268,-4.5304592 17.8738818,-4.8254165 0.09106,-0.056281 0.165569,-0.2205616 0.165569,-0.3650743 0,-0.4502592 0.718636,-0.9390384 1.380639,-0.9390384 0.951238,0 1.424666,0.6039704 1.281254,1.6345411 -0.129059,0.9274084 -1.333846,1.3156669 -2.200009,0.7089804 -0.415963,-0.2913486 -1.010119,-0.1424718 -8.737412,2.189303 -7.553254,2.2792577 -8.2858093,2.5389107 -8.231577,2.9176578 0.058624,0.409366 0.2011827,0.417315 9.290147,0.517905 8.930592,0.09884 9.24936,0.115913 9.807245,0.525319 1.240788,0.910553 1.291519,1.220094 1.28693,7.851703 -0.0041,5.483245 -0.03929,6.104682 -0.392958,6.883734 -0.275308,0.606395 -0.629454,0.979142 -1.213275,1.276986 -0.801924,0.409108 -1.116904,0.420376 -11.508224,0.411592 C 6.4752908,27.680127 6.0787679,27.665504 5.3238144,27.267185 Z M 23.574967,24.413091 c 5.670694,-2.56158 3.953447,-10.889406 -2.247489,-10.899253 -2.266325,-0.0036 -4.232556,1.263149 -5.179497,3.336903 -0.618584,1.354659 -0.601273,3.486172 0.03827,4.71757 0.811796,1.562967 2.024216,2.627651 3.505321,3.078181 1.021571,0.310748 2.933086,0.195859 3.883354,-0.233401 z m -3.779875,-1.305019 c -0.566954,-0.259604 -0.451965,-0.281368 1.532386,-0.290021 1.959238,-0.0085 2.10102,0.01606 1.63454,0.282643 -0.647105,0.369916 -2.36642,0.373925 -3.166926,0.0074 z m -2.104466,-1.784943 c -0.13485,-0.13486 -0.245183,-0.318735 -0.245183,-0.408635 0,-0.0899 1.746913,-0.163461 3.882035,-0.163461 2.135117,0 3.882035,0.03847 3.882035,0.08544 0,0.04702 -0.05581,0.230882 -0.124033,0.408635 -0.106425,0.277366 -0.622083,0.323188 -3.636851,0.323188 -2.459781,0 -3.586336,-0.07349 -3.758012,-0.245182 z M 17.173017,19.59324 c -0.07492,-0.07491 -0.136209,-0.304773 -0.136209,-0.510794 0,-0.351339 0.266229,-0.374581 4.290672,-0.374581 h 4.290667 v 0.510794 0.510792 h -4.154459 c -2.284951,0 -4.215753,-0.06129 -4.290671,-0.136204 z m 0.272426,-2.022555 c 0,-0.06357 0.09518,-0.293432 0.211508,-0.510794 0.196639,-0.367424 0.460792,-0.395203 3.758013,-0.395203 3.652271,0 3.794549,0.03127 3.794549,0.833981 0,0.107348 -1.660743,0.187606 -3.882035,0.187606 -2.135122,0 -3.882035,-0.05202 -3.882035,-0.115592 z m 2.101905,-2.252774 c 0.950113,-0.515211 2.38094,-0.561304 3.312511,-0.106708 l 0.817269,0.39882 -2.34965,0.0084 c -2.209142,0.0078 -2.315593,-0.01012 -1.78013,-0.300476 z m -10.163162,5.95321 c 0.902098,-0.902104 0.4483519,-2.363689 -0.8337056,-2.685466 -0.6334803,-0.158992 -1.4698961,0.358676 -1.7438806,1.07931 -0.5908997,1.554184 1.3932053,2.790531 2.5775862,1.606156 z M 9.412824,16.220438 C 10.001146,15.667733 10.0206,14.848114 9.4622104,14.138272 8.9469518,13.483221 7.915845,13.411743 7.2113223,13.982234 c -0.5936896,0.480739 -0.6420795,1.657067 -0.093126,2.263656 0.5170523,0.571337 1.6729921,0.558516 2.2946005,-0.02544 z" - id="path3615" - inkscape:connector-curvature="0" /></svg> \ No newline at end of file + borderopacity="1" + inkscape:cy="8.4045986" + pagecolor="#ffffff" + fit-margin-top="0" + objecttolerance="10" + showgrid="false" + guidetolerance="10" + inkscape:cx="23.739744" + bordercolor="#666666" + fit-margin-left="0" + inkscape:zoom="9.4816592" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:current-layer="svg3212" + fit-margin-right="0" + fit-margin-bottom="0" + inkscape:pageshadow="2" + inkscape:window-width="1276" + inkscape:window-height="772" + inkscape:pageopacity="0" + id="namedview11" /><path + id="path143" + d="m 18.129434,27.703386 c -0.250558,0.926135 -1.197058,1.141812 -2.11579,1.141812 -0.918679,0 -1.865229,-0.215677 -2.115736,-1.141812 -0.372453,-1.385013 -1.002234,-4.855513 -1.002234,-6.470428 0,-1.712741 1.517186,-2.131426 3.11797,-2.131426 1.600789,0 3.117976,0.418685 3.117976,2.131426 0,1.605222 -0.627055,5.075427 -1.002186,6.470428 z M 12.743039,17.95928 c -0.910692,-0.891935 -1.459504,-2.152035 -1.40231,-3.536901 0.100069,-2.422472 2.065415,-4.382507 4.488128,-4.4762899 2.662699,-0.103088 4.861748,2.0331629 4.861748,4.6733549 0,1.306968 -0.539018,2.490286 -1.406303,3.33974 -0.130321,0.127642 -0.116972,0.340346 0.0306,0.447574 0.453665,0.329581 0.801903,0.747486 1.034484,1.235643 0.08482,0.178017 0.316523,0.227028 0.46034,0.09213 1.404356,-1.31749 2.267985,-3.204838 2.217221,-5.289106 -0.09037,-3.712629 -3.098242,-6.7332649 -6.810482,-6.8385459 -3.960506,-0.112343 -7.218253,3.0768569 -7.218253,7.0125669 0,2.015039 0.85413,3.834133 2.219119,5.11489 0.143866,0.134998 0.375668,0.08623 0.460535,-0.09193 0.232582,-0.488206 0.58087,-0.906062 1.034536,-1.235643 0.147566,-0.107178 0.160964,-0.319883 0.03065,-0.447478 z M 16.013644,3.9014105 c -6.031133,0 -10.912905,4.8808456 -10.912905,10.9129055 0,4.384262 2.562682,8.070048 6.125794,9.812264 0.211098,0.103185 0.451473,-0.07522 0.415811,-0.307413 -0.116047,-0.755719 -0.211535,-1.507637 -0.263371,-2.160123 -0.0072,-0.08944 -0.05598,-0.169832 -0.130467,-0.219816 -2.309251,-1.549537 -3.827508,-4.190558 -3.809141,-7.1785 0.02884,-4.688507 3.862877,-8.5085609 8.551479,-8.5207889 4.738395,-0.01238 8.597229,3.8388099 8.597229,8.5743769 0,3.017224 -1.566685,5.675202 -3.929134,7.203836 -0.04867,0.68386 -0.149516,1.490195 -0.273992,2.300966 -0.03566,0.232241 0.204763,0.410647 0.415811,0.307412 3.554781,-1.738269 6.125795,-5.418453 6.125795,-9.812214 0,-6.0310859 -4.880847,-10.9129055 -10.912909,-10.9129055 z m 0,7.7949335 c -1.721996,0 -3.11797,1.395974 -3.11797,3.117972 0,1.721999 1.395974,3.117976 3.11797,3.117976 1.721999,0 3.117976,-1.395977 3.117976,-3.117976 0,-1.721998 -1.395977,-3.117972 -3.117976,-3.117972 z" + style="stroke-width:0.0487184;fill:#ffffff" /></svg> diff --git a/package.json b/package.json index cba1a19..8794ee8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "podcast", "description": "Listen to your favorite podcast shows in Nextcloud", - "version": "0.1", + "version": "0.0.1", "author": "Jonas Heinrich <onny@project-insanity.org>", "contributors": [ "Jonas Heinrich <onny@project-insanity.org>" diff --git a/src/components/Navigation.vue b/src/components/Navigation.vue index 18bb702..5b140cd 100644 --- a/src/components/Navigation.vue +++ b/src/components/Navigation.vue @@ -24,25 +24,17 @@ <AppNavigation> <template id="app-podcast-navigation" #list> <AppNavigationItem - :to="{ name: 'TOP' }" + :to="{ name: 'LISTENING' }" icon="icon-category-dashboard" - :title="t('podcast', 'Top')" /> + :title="t('podcast', 'Listening')" /> <AppNavigationItem - :to="{ name: 'RECENT' }" + :to="{ name: 'LIBRARY' }" icon="icon-recent" - :title="t('podcast', 'Recent')" /> + :title="t('podcast', 'Library')" /> <AppNavigationItem - :to="{ name: 'NEW' }" + :to="{ name: 'BROWSE' }" icon="icon-category-monitoring" - :title="t('podcast', 'New')" /> - <AppNavigationItem - :to="{ name: 'FAVORITES' }" - icon="icon-favorite" - :title="t('podcast', 'Favorites')" /> - <AppNavigationItem - :to="{ name: 'CATEGORIES' }" - icon="icon-files-dark" - :title="t('podcast', 'Categories')" /> + :title="t('podcast', 'Browse')" /> <AppNavigationItem v-if="isSearch" :to="{ name: 'SEARCH' }" diff --git a/src/components/Table.vue b/src/components/Table.vue index 13692a4..48113af 100644 --- a/src/components/Table.vue +++ b/src/components/Table.vue @@ -42,19 +42,16 @@ v-for="(episode, idx) in stationData" :key="idx" :class="{ selected: idx === activeItem}"> - <td @click="doPlay(idx, episode)"> + <td class="iconColumn" @click="doPlay(idx, episode)"> <blur-hash-image - class="stationIcon" - width="32" - height="32" + width="64" + height="64" hash="L1TSUA?bj[?b~qfQfQj[ayfQfQfQ" :src="episode.imgURL" /> - <span :class="{ 'icon-starred': favorites.flat().includes(episode.stationuuid) }" /> </td> <td class="nameColumn" @click="doPlay(idx, episode)"> - <span class="innernametext"> - {{ episode.title }} - </span> + <b>{{ episode.title }}</b> + <span>{{ episode.description }}</span> </td> <td class="actionColumn"> <Actions> @@ -178,7 +175,7 @@ table { th.iconColumn { padding: 0px; - width: 72px; + width: 115px; } th.nameColumn { @@ -200,17 +197,10 @@ table { background-repeat: no-repeat; border-bottom: 1px solid var(--color-border); cursor: pointer; - - span.icon-folder { - display: block; - background-size: cover; - width: 30px; - height: 30px; - } } tr { - height: 51px; + height: 91px; background-color: var(--color-background-light); transition: opacity 500ms ease 0s; @@ -228,42 +218,33 @@ table { background-color: var(--color-primary-light); } - tr td:first-child { - padding-left: 40px; - width: 32px; + td.iconColumn { padding-right: 0px; + padding-left: 40px; } td.nameColumn { - white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 0px; } - td.nameColumn .innernametext { + td.nameColumn b { color: var(--color-main-text); - position: relative; - vertical-align: top; user-select: none; cursor: pointer; + font-size: 1.1em; } - .icon-starred { - background-image: var(--icon-star-dark-fc0); - background-size: 16px 16px; - background-repeat: no-repeat; - background-position: center; - min-width: 16px; - min-height: 16px; - right: -7px; - top: -38px; - margin-bottom: -38px; - float: right; - position: relative; - pointer-events: none; + td.nameColumn span { + display: block; + max-height: 45px; + background: red; + white-space: normal; + text-overflow: ellipsis; + overflow: hidden; + color: #657786; } - } } diff --git a/src/router.js b/src/router.js index e579065..29615d3 100644 --- a/src/router.js +++ b/src/router.js @@ -37,29 +37,19 @@ const router = new Router({ linkActiveClass: 'active', routes: [ { - path: '/top', + path: '/listening', component: Main, - name: 'TOP', + name: 'LISTENING', }, { - path: '/recent', + path: '/library', component: Main, - name: 'RECENT', + name: 'LIBRARY', }, { - path: '/new', + path: '/browse', component: Main, - name: 'NEW', - }, - { - path: '/favorites', - component: Main, - name: 'FAVORITES', - }, - { - path: '/categories/:category?/:query?', - component: Main, - name: 'CATEGORIES', + name: 'BROWSE', }, { path: '/search/:query', diff --git a/src/views/Podcast.vue b/src/views/Podcast.vue index 2d90210..380502e 100644 --- a/src/views/Podcast.vue +++ b/src/views/Podcast.vue @@ -325,16 +325,11 @@ export default { async queryPodcast(podcastId) { const vm = this - const menuState = 'TOP' podcastId = 1084 - let queryURI = 'https://api.fyyd.de/0.2/podcast/episodes?podcast_id=' + podcastId + const queryURI = 'https://api.fyyd.de/0.2/podcast/episodes?podcast_id=' + podcastId try { - if (menuState === 'FAVORITES' || menuState === 'RECENT') { - axios.defaults.headers.requesttoken = requesttoken - } else { - delete axios.defaults.headers.requesttoken - } + delete axios.defaults.headers.requesttoken await axios.get(queryURI) .then(function(response) { vm.processPodcast(response.data) @@ -342,126 +337,11 @@ export default { } catch (error) { showError(t('podcast', 'Could not fetch stations from remote API')) } - - const queryBase = this.$apiUrl + '/json/stations' - queryURI = queryBase - let sortBy = 'clickcount' - - if (vm.$route.name === 'CATEGORIES') { - if (vm.$route.path === '/categories') { - vm.tableData = [ - { - name: t('podcast', 'Countries'), - type: 'folder', - path: '/categories/countries', - }, - { - name: t('podcast', 'States'), - type: 'folder', - path: '/categories/states', - }, - { - name: t('podcast', 'Languages'), - type: 'folder', - path: '/categories/languages', - }, - { - name: t('podcast', 'Tags'), - type: 'folder', - path: '/categories/tags', - }, - ] - vm.pageLoading = false - return true - } else if (vm.$route.params.category === 'tags') { - if (vm.$route.params.query) { - queryURI = this.$apiUrl + '/json/stations/search?tag=' + vm.$route.params.query + '&tagExact=true' - } else { - queryURI = this.$apiUrl + '/json/tags' - } - } else if (vm.$route.params.category === 'countries') { - if (vm.$route.params.query) { - queryURI = this.$apiUrl + '/json/stations/search?country=' + vm.$route.params.query + '&countryExact=true' - } else { - queryURI = this.$apiUrl + '/json/countries' - } - } else if (vm.$route.params.category === 'states') { - if (vm.$route.params.query) { - queryURI = this.$apiUrl + '/json/stations/search?state=' + vm.$route.params.query + '&stateExact=true' - } else { - queryURI = this.$apiUrl + '/json/states' - } - } else if (vm.$route.params.category === 'languages') { - if (vm.$route.params.query) { - queryURI = this.$apiUrl + '/json/stations/search?language=' + vm.$route.params.query + '&languageExact=true' - } else { - queryURI = this.$apiUrl + '/json/languages' - } - } - } - - // Skip loading more stations on certain sites - if (vm.tableData.length > 0 - && (vm.$route.name === 'FAVORITES' - || vm.$route.name === 'RECENT' - || vm.$route.name === 'CATEGORIES')) { - return true - } - - if (menuState === 'TOP') { - sortBy = 'clickcount' - } else if (menuState === 'NEW') { - sortBy = 'lastchangetime' - } else if (menuState === 'SEARCH') { - const searchQuery = vm.$route.params.query - queryURI = queryBase + '/byname/' + searchQuery - } else if (menuState === 'FAVORITES') { - queryURI = generateUrl('/apps/podcast/api/favorites') - } else if (menuState === 'RECENT') { - queryURI = generateUrl('/apps/podcast/api/recent') - } - - if (menuState !== 'CATEGORIES') { - vm.queryParams = { - limit: 20, - order: sortBy, - reverse: true, - offset: vm.tableData.length, - } - } else { - vm.queryParams = {} - } - - try { - if (menuState === 'FAVORITES' || menuState === 'RECENT') { - axios.defaults.headers.requesttoken = requesttoken - } else { - delete axios.defaults.headers.requesttoken - } - await axios.get(queryURI, { - params: vm.queryParams, - }) - .then(function(response) { - for (let i = 0; i < response.data.length; i++) { - const obj = response.data[i] - if (!obj.stationuuid) { - response.data[i].type = 'folder' - response.data[i].path = vm.$route.path + '/' + obj.name - } - } - vm.tableData = vm.tableData.concat(response.data) - vm.pageLoading = false - }) - } catch (error) { - showError(t('podcast', 'Could not fetch stations from remote API')) - } }, processPodcast(podcast) { - console.log(podcast) this.podcast = podcast.data - // vm.tableData = vm.tableData.concat(response.data) - // vm.pageLoading = false + this.pageLoading = false }, /** -- GitLab