gui: Use versioned link to documentation in bottom bar (#8204)
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user