Skip to content

Commit f98eb59

Browse files
committed
Merge branch 'develop' into feature/add-frontend-server-configuration
2 parents 97dc051 + 2f9e7bd commit f98eb59

File tree

6 files changed

+71
-9
lines changed

6 files changed

+71
-9
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ DB_DATABASE=homestead
1313
DB_USERNAME=homestead
1414
DB_PASSWORD=secret
1515

16-
CACHE_DRIVER=file
16+
CACHE_DRIVER=redis
1717
SESSION_DRIVER=database
1818

1919
HASHIDS_SALT=

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"ext-mbstring": "*",
1616
"ext-pdo_mysql": "*",
1717
"ext-zip": "*",
18+
"appstract/laravel-blade-directives": "^0.6.0",
1819
"aws/aws-sdk-php": "^3.29",
1920
"daneeveritt/login-notifications": "^1.0",
2021
"doctrine/dbal": "^2.5",

composer.lock

Lines changed: 54 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/app.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@
181181
Lord\Laroute\LarouteServiceProvider::class,
182182
Spatie\Fractal\FractalServiceProvider::class,
183183
Sofa\Eloquence\ServiceProvider::class,
184+
Appstract\BladeDirectives\BladeDirectivesServiceProvider::class,
184185
],
185186

186187
/*

public/themes/pterodactyl/css/terminal.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
opacity: .5;
6262
font-size: 16px;
6363
cursor: pointer;
64+
z-index: 10;
6465
}
6566

6667
.terminal-notify:hover {

public/themes/pterodactyl/js/frontend/console.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,15 @@ $(document).ready(function () {
116116
});
117117

118118
$terminal.on('scroll', function () {
119-
if ($(this).scrollTop() + $(this).innerHeight() + 50 < $(this)[0].scrollHeight) {
120-
$scrollNotify.removeClass('hidden');
121-
} else {
119+
if (isTerminalScrolledDown()) {
122120
$scrollNotify.addClass('hidden');
123121
}
124122
});
125123

124+
function isTerminalScrolledDown() {
125+
return $terminal.scrollTop() + $terminal.innerHeight() + 50 > $terminal[0].scrollHeight;
126+
}
127+
126128
window.scrollToBottom = function () {
127129
$terminal.scrollTop($terminal[0].scrollHeight);
128130
};
@@ -148,16 +150,20 @@ function pushToTerminal(string) {
148150
}
149151

150152
if (TerminalQueue.length > 0) {
153+
var scrolledDown = isTerminalScrolledDown();
154+
151155
for (var i = 0; i < CONSOLE_PUSH_COUNT && TerminalQueue.length > 0; i++) {
152156
pushToTerminal(TerminalQueue[0]);
153157

154-
if (! $scrollNotify.is(':visible')) {
155-
window.scrollToBottom();
156-
}
157-
158158
window.ConsoleElements++;
159159
TerminalQueue.shift();
160160
}
161+
162+
if (scrolledDown) {
163+
window.scrollToBottom();
164+
} else if ($scrollNotify.hasClass('hidden')) {
165+
$scrollNotify.removeClass('hidden');
166+
}
161167

162168
var removeElements = window.ConsoleElements - CONSOLE_OUTPUT_LIMIT;
163169
if (removeElements > 0) {

0 commit comments

Comments
 (0)