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
This commit is contained in:
parent
ea8d1d09d4
commit
f983dfe6a7
@ -37,23 +37,30 @@ import { ArdourClient } from '/shared/ardour.js';
|
|||||||
|
|
||||||
const li = document.createElement('li');
|
const li = document.createElement('li');
|
||||||
li.innerHTML = `<li>
|
li.innerHTML = `<li>
|
||||||
<span>Filesystem location:</span>
|
<span>Filesystem location:</span>
|
||||||
 
|
 
|
||||||
<span class="filesystem-path">${group.filesystemPath}</span>
|
<span class="filesystem-path">${group.filesystemPath}</span>
|
||||||
</li>`;
|
</li>`;
|
||||||
ul.appendChild(li);
|
ul.appendChild(li);
|
||||||
|
|
||||||
if (group.surfaces.length > 0) {
|
if (group.surfaces.length > 0) {
|
||||||
group.surfaces.sort((a, b) => a.name.localeCompare(b.name));
|
group.surfaces.sort((a, b) => a.name.localeCompare(b.name));
|
||||||
|
|
||||||
for (const surface of group.surfaces) {
|
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');
|
const li = document.createElement('li');
|
||||||
li.innerHTML = `<li>
|
li.innerHTML = `<li>
|
||||||
<a href="${group.path}/${surface.path}/">${surface.name}</a>
|
<a href="${path}">${surface.name}</a>
|
||||||
 
|
 
|
||||||
<span class="surface-version">(${surface.version})</span>
|
<span class="surface-version">(${surface.version})</span>
|
||||||
<p>${surface.description}</p>
|
<p>${surface.description}</p>
|
||||||
</li>`;
|
</li>`;
|
||||||
ul.appendChild(li);
|
ul.appendChild(li);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user