mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-10 07:11:08 +00:00
gui: Use versioned link to documentation in bottom bar (#8204)
This commit is contained in:
parent
e974c13c7a
commit
a3a4da6e3e
@ -892,7 +892,7 @@
|
||||
<div class="container">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a class="navbar-link" href="https://syncthing.net/" target="_blank"><span class="fas fa-home"></span> <span translate>Home page</span></a></li>
|
||||
<li><a class="navbar-link" href="https://docs.syncthing.net/" target="_blank"><span class="fas fa-book"></span> <span translate>Documentation</span></a></li>
|
||||
<li><a class="navbar-link" href="{{docsURL()}}" target="_blank"><span class="fas fa-book"></span> <span translate>Documentation</span></a></li>
|
||||
<li><a class="navbar-link" href="https://forum.syncthing.net" target="_blank"><span class="fas fa-question-circle"></span> <span translate>Support</span></a></li>
|
||||
<li><a class="navbar-link" href="https://data.syncthing.net/" target="_blank"><span class="fas fa-bar-chart"></span> <span translate>Statistics</span></a></li>
|
||||
<li><a class="navbar-link" href="https://github.com/syncthing/syncthing/releases" target="_blank"><span class="far fa-file-alt"></span> <span translate>Changelog</span></a></li>
|
||||
|
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user