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">
|
<div class="container">
|
||||||
<ul class="nav navbar-nav">
|
<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://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://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://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>
|
<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,7 +2921,10 @@ angular.module('syncthing.core')
|
|||||||
|
|
||||||
$scope.docsURL = function (path) {
|
$scope.docsURL = function (path) {
|
||||||
var url = 'https://docs.syncthing.net';
|
var url = 'https://docs.syncthing.net';
|
||||||
if (path) {
|
if (!path) {
|
||||||
|
// Undefined or null should become a valid string.
|
||||||
|
path = '';
|
||||||
|
}
|
||||||
var hash = path.indexOf('#');
|
var hash = path.indexOf('#');
|
||||||
if (hash != -1) {
|
if (hash != -1) {
|
||||||
url += '/' + path.slice(0, hash);
|
url += '/' + path.slice(0, hash);
|
||||||
@ -2931,7 +2934,6 @@ angular.module('syncthing.core')
|
|||||||
url += '/' + path;
|
url += '/' + path;
|
||||||
url += '?version=' + $scope.versionBase();
|
url += '?version=' + $scope.versionBase();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return url;
|
return url;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user