From 17d5fa69242b114065d1c1db71683f4bdff9ae44 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Tue, 5 Jun 2018 19:25:38 +0200 Subject: [PATCH] Fixed #239: broken track download modal (overflow and wrong URL) --- changes/changelog.d/239.bugfix | 1 + front/src/audio/backend.js | 6 +++++- front/src/components/audio/track/Table.vue | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 changes/changelog.d/239.bugfix diff --git a/changes/changelog.d/239.bugfix b/changes/changelog.d/239.bugfix new file mode 100644 index 000000000..169bf6b89 --- /dev/null +++ b/changes/changelog.d/239.bugfix @@ -0,0 +1 @@ +Fixed broken track download modal (overflow and wrong URL) (#239) diff --git a/front/src/audio/backend.js b/front/src/audio/backend.js index 5b4c70706..619f3cefd 100644 --- a/front/src/audio/backend.js +++ b/front/src/audio/backend.js @@ -26,7 +26,11 @@ export default { return url } if (url.startsWith('/')) { - return config.BACKEND_URL + url.substr(1) + let rootUrl = ( + window.location.protocol + '//' + window.location.hostname + + (window.location.port ? ':' + window.location.port : '') + ) + return rootUrl + url } else { return config.BACKEND_URL + url } diff --git a/front/src/components/audio/track/Table.vue b/front/src/components/audio/track/Table.vue index 7045cf9bd..4559b3c41 100644 --- a/front/src/components/audio/track/Table.vue +++ b/front/src/components/audio/track/Table.vue @@ -84,4 +84,7 @@ export default { tr:not(:hover) .favorite-icon:not(.favorited) { display: none; } +pre { + overflow-x: scroll; +}