Implement notifications and back-end onboarding variables

This commit is contained in:
purple 2023-04-23 20:21:09 +02:00
parent 311b2b5e2b
commit d268c35f4d
6 changed files with 38 additions and 4 deletions

View file

@ -62,6 +62,7 @@ class BlueprintExtensionController extends Controller
$this->settings->set('blueprint::' . $key, $value);
}
shell_exec("cd /var/www/pterodactyl;echo \"Your changes have been saved.\" > .blueprint/.storage/notification.txt;");
return redirect()->route('admin.extensions.blueprint.index');
}
}

View file

@ -16,8 +16,8 @@ class BlueprintVariableService
// $bp->server()
// $bp->version()
// $bp->dbGet('db:record')
// $bp->dbSet('db:record', 'value')
// $bp->dbGet('db::record')
// $bp->dbSet('db::record', 'value')
// $bp->exec('arguments')
public function serve(): void {
return;

View file

@ -66,6 +66,9 @@ if [[ $1 != "-bash" ]]; then
clr_bright "chown -R www-data:www-data /var/www/pterodactyl/.*";
chown -R www-data:www-data /var/www/pterodactyl/.*;
echo "Blueprint has now been installed, click the extension icon to take a look." > .blueprint/.storage/notification.txt;
touch ".blueprint/.flags/flashicon.md";
clr_bright "php artisan up";
php artisan up;

View file

View file

@ -3,6 +3,29 @@
* All Rights Reserved.
*/
@keyframes notification {
0% {right:-300px;opacity:0;background-color: #2a3743;}
10% {right:12px;opacity:1;background-color: #1f2933;}
90% {right:12px;opacity:1;background-color: #1f2933;}
100% {right:-300px;opacity:0;background-color: #2a3743;}
}
.notification {
opacity:0;
position:fixed;
right:12px;
top:62px;
height:auto;
width:300px;
z-index:99999;
background-color:#1f2933;
color:#9aa5b1;
padding:10px;
border-radius:10px;
animation-name: notification;
animation-duration: 10s;
}
tag {
display:inline-block;
padding:3px;
@ -30,4 +53,4 @@ tag[blue] {background-color:#288afb;}
height:25px;
border-radius:3px;
margin-right:2px;
};
}

View file

@ -58,7 +58,8 @@
</a>
</li>
<li>
<li><a href="{{ route('admin.extensions') }}" data-toggle="tooltip" data-placement="bottom" title="Extensions"><i class="fa fa-puzzle-piece"></i></a></li>
<li><a href="{{ route('admin.extensions') }}" data-toggle="tooltip" data-placement="bottom" title="Extensions"><i class='fa fa-puzzle-piece <?php if(shell_exec("cd /var/www/pterodactyl;cat .blueprint/.flags/flashicon.md") == "*blueprint*"){ echo "bx-flashing"; } ?>'></i></a></li>
{{ `cd /var/www/pterodactyl;rm .blueprit/.flags/flashicon.md;` }}
</li>
<li>
<li><a href="{{ route('index') }}" data-toggle="tooltip" data-placement="bottom" title="Exit Admin Control"><i class="fa fa-server"></i></a></li>
@ -156,6 +157,12 @@
</div>
</div>
@yield('content')
@if(shell_exec("cd /var/www/pterodactyl;cat .blueprint/.storage/notification.txt;") != "")
<div class="notification">
<p>{{ `cd /var/www/pterodactyl;cat .blueprint/.storage/notification.txt` }}</p>
</div>
{{ `cd /var/www/pterodactyl;echo "" > .blueprint/.storage/notification.txt` }}
@endif
</section>
</div>
<footer class="main-footer">