summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorLuciano Iam <lucianito@gmail.com>2020-04-24 12:39:01 +0200
committerLuciano Iam <lucianito@gmail.com>2020-04-24 12:39:06 +0200
commitf983dfe6a7eaaacf9c738f046a40074b624da9d1 (patch)
tree6894cc567e791cb8c05ebdf64b5ef48bd448fc7c /share
parentea8d1d09d4d00bb0992d12cb28b6a6e83db3d742 (diff)
WebSockets: workaround for index page on Windows
Avoid 404s when following surface links while the issue in https://github.com/Ardour/ardour/pull/491 is better investigated
Diffstat (limited to 'share')
-rw-r--r--share/web_surfaces/index/main.js25
1 files changed, 16 insertions, 9 deletions
diff --git a/share/web_surfaces/index/main.js b/share/web_surfaces/index/main.js
index 3594268991..be2ef70d02 100644
--- a/share/web_surfaces/index/main.js
+++ b/share/web_surfaces/index/main.js
@@ -37,23 +37,30 @@ import { ArdourClient } from '/shared/ardour.js';
const li = document.createElement('li');
li.innerHTML = `<li>
- <span>Filesystem location:</span>
- &thinsp;
- <span class="filesystem-path">${group.filesystemPath}</span>
- </li>`;
+ <span>Filesystem location:</span>
+ &thinsp;
+ <span class="filesystem-path">${group.filesystemPath}</span>
+ </li>`;
ul.appendChild(li);
if (group.surfaces.length > 0) {
group.surfaces.sort((a, b) => a.name.localeCompare(b.name));
for (const surface of group.surfaces) {
+ let path = group.path + '/' + surface.path + '/';
+
+ // see https://github.com/Ardour/ardour/pull/491
+ if (navigator.userAgent.indexOf('Windows') != -1) {
+ path += 'index.html';
+ }
+
const li = document.createElement('li');
li.innerHTML = `<li>
- <a href="${group.path}/${surface.path}/">${surface.name}</a>
- &thinsp;
- <span class="surface-version">(${surface.version})</span>
- <p>${surface.description}</p>
- </li>`;
+ <a href="${path}">${surface.name}</a>
+ &thinsp;
+ <span class="surface-version">(${surface.version})</span>
+ <p>${surface.description}</p>
+ </li>`;
ul.appendChild(li);
}
} else {