mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-03 07:12:27 +00:00
gui: Scroll to bottom by clicking message in log viewer (#9128)
This commit is contained in:
parent
80a577b025
commit
9940c91ebf
@ -9,7 +9,7 @@
|
||||
<div id="log-viewer-log" class="tab-pane in active">
|
||||
<label translate ng-if="logging.logEntries.length == 0">Loading...</label>
|
||||
<textarea id="logViewerText" class="form-control" rows="20" ng-if="logging.logEntries.length != 0" readonly style="font-family: Consolas, monospace; font-size: 11px; overflow: auto;">{{ logging.content() }}</textarea>
|
||||
<p translate class="help-block" ng-style="{'visibility': logging.paused ? 'visible' : 'hidden'}">Log tailing paused. Scroll to the bottom to continue.</p>
|
||||
<a href="" translate class="help-block" ng-style="{'visibility': logging.paused ? 'visible' : 'hidden'}" ng-click="logging.scrollToBottom()" style="text-decoration: none">Log tailing paused. Scroll to the bottom to continue.</a>
|
||||
</div>
|
||||
|
||||
<div id="log-viewer-facilities" class="tab-pane">
|
||||
|
@ -1430,6 +1430,11 @@ angular.module('syncthing.core')
|
||||
// Browser events do not cause redraw, trigger manually.
|
||||
$scope.$apply();
|
||||
},
|
||||
scrollToBottom: function () {
|
||||
var textArea = $('#logViewerText');
|
||||
var scrollHeight = textArea.prop('scrollHeight');
|
||||
textArea.prop('scrollTop', scrollHeight);
|
||||
},
|
||||
timer: null,
|
||||
entries: [],
|
||||
paused: false,
|
||||
|
Loading…
Reference in New Issue
Block a user