mirror of
https://github.com/gSpotx2f/ruantiblock_openwrt.git
synced 2026-05-15 07:00:59 +00:00
luci-app: updated log.
This commit is contained in:
@@ -875,6 +875,14 @@ return baseclass.extend({
|
||||
return this.reloadLog(Number(this.tailValue), true);
|
||||
},
|
||||
|
||||
scrollToTop() {
|
||||
this.logWrapper.scrollIntoView(true);
|
||||
},
|
||||
|
||||
scrollToBottom() {
|
||||
this.logWrapper.scrollIntoView(false);
|
||||
},
|
||||
|
||||
load() {
|
||||
this.restoreSettingsFromLocalStorage();
|
||||
if(typeof(this.getLogHash) != 'function') {
|
||||
@@ -1018,7 +1026,13 @@ return baseclass.extend({
|
||||
if(this.fastTailValue > 0) {
|
||||
this.fastTailValue += this.fastTailIncrement;
|
||||
};
|
||||
return this.reloadLog(this.fastTailValue);
|
||||
return this.reloadLog(this.fastTailValue)/*.then(() => {
|
||||
if(this.logSortingValue == 'desc') {
|
||||
this.scrollToBottom();
|
||||
} else {
|
||||
this.scrollToTop();
|
||||
};
|
||||
});*/
|
||||
}),
|
||||
}, `+${this.fastTailIncrement}`);
|
||||
|
||||
@@ -1060,7 +1074,7 @@ return baseclass.extend({
|
||||
'class': 'cbi-button btn log-side-btn',
|
||||
'style': 'margin-top:10px !important',
|
||||
'click': ev => {
|
||||
document.getElementById('logTitle').scrollIntoView(true);
|
||||
this.scrollToTop();
|
||||
ev.target.blur();
|
||||
},
|
||||
}, '↑'),
|
||||
@@ -1068,7 +1082,7 @@ return baseclass.extend({
|
||||
'class': 'cbi-button btn log-side-btn',
|
||||
'style': 'margin-top:1px !important',
|
||||
'click': ev => {
|
||||
this.logWrapper.scrollIntoView(false);
|
||||
this.scrollToBottom();
|
||||
ev.target.blur();
|
||||
},
|
||||
}, '↓'),
|
||||
|
||||
Reference in New Issue
Block a user