gui: Use versioned link to documentation in bottom bar (#8204)

This commit is contained in:
Jakob Borg
2022-03-08 07:56:42 +01:00
committed by GitHub
parent e974c13c7a
commit a3a4da6e3e
2 changed files with 13 additions and 11 deletions
@@ -2921,16 +2921,18 @@ angular.module('syncthing.core')
$scope.docsURL = function (path) {
var url = 'https://docs.syncthing.net';
if (path) {
var hash = path.indexOf('#');
if (hash != -1) {
url += '/' + path.slice(0, hash);
url += '?version=' + $scope.versionBase();
url += path.slice(hash);
} else {
url += '/' + path;
url += '?version=' + $scope.versionBase();
}
if (!path) {
// Undefined or null should become a valid string.
path = '';
}
var hash = path.indexOf('#');
if (hash != -1) {
url += '/' + path.slice(0, hash);
url += '?version=' + $scope.versionBase();
url += path.slice(hash);
} else {
url += '/' + path;
url += '?version=' + $scope.versionBase();
}
return url;
};