Skip to content

Commit 0be06cc

Browse files
committed
feat: add introduction dialog
1 parent 84be750 commit 0be06cc

File tree

7 files changed

+67
-4
lines changed

7 files changed

+67
-4
lines changed
268 KB
Loading

database/Seeders/BlueprintSeeder.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ class BlueprintSeeder extends Seeder
3131
],
3232
'flags' => [
3333
'disable_attribution' => [
34+
'default' => false,
35+
'type' => 'boolean',
36+
'hidden' => true,
37+
],
38+
'introduction_dismissed' => [
3439
'default' => false,
3540
'type' => 'boolean',
3641
'hidden' => false,

resources/views/admin/extensions.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
<span class="text-bold h4">Blueprint</span>
6868
</p>
6969
<span>
70-
Powerful, fast and developer-friendly extension framework for Pterodactyl. Utilize extension APIs, inject HTML, modify stylesheets, package extensions and so much more.
70+
Pterodactyl's favorite modding community. Develop, collaborate and install extensions with the extension platform that puts you first. Pterodactyl themes, plugin installers, player managers, admin tools and much more. There's a Blueprint extension for that.
7171
</span>
7272
</div>
7373
<div class="col-lg-4 col-md-3 col-sm-3 col-xs-12" style="padding-top: 3px; padding-bottom: 3px;">

resources/views/blueprint/admin/admin.blade.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@include("blueprint.admin.introduction")
2+
13
@section("blueprint.lib")
24
<?php
35
use Pterodactyl\BlueprintFramework\Libraries\ExtensionLibrary\Admin\BlueprintAdminLibrary as BlueprintExtensionLibrary;
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?php
2+
use Pterodactyl\BlueprintFramework\Libraries\ExtensionLibrary\Admin\BlueprintAdminLibrary as BlueprintExtensionLibrary;
3+
4+
$settings = app()->make('Pterodactyl\Contracts\Repository\SettingsRepositoryInterface');
5+
$blueprint = app()->make(BlueprintExtensionLibrary::class, ['settings' => $settings]);
6+
?>
7+
8+
@section("blueprint.introduction")
9+
@if(!$blueprint->dbGet("blueprint", "flags:introduction_dismissed"))
10+
<div class="modal fade" id="blueprintIntroductionModal" tabindex="-1" role="dialog">
11+
<div class="modal-dialog" role="document">
12+
<div class="modal-content" style="background: transparent;">
13+
<form action="/admin/extensions/blueprint" method="POST">
14+
<div style="overflow: hidden; border-radius: 15px 15px 0 0;">
15+
<img src="/assets/extensions/blueprint/welcomebanner.jpeg" style="width: 100%"/>
16+
</div>
17+
<div class="modal-body">
18+
<h3 class="modal-title">Welcome to Blueprint</h3>
19+
<p style="padding-top: 5px;">
20+
Blueprint is the industry-leading tool to build, manage and maintain extensions for the Pterodactyl panel. You are almost ready to manage extensions, this is the last step.
21+
</p>
22+
<div class="row" style="padding-top: 5px;">
23+
<div class="col-xs-12">
24+
<div style="background-color: #4C5A67; padding: 10px; border-radius: 8px;">
25+
<p style="margin: 0 !important; padding-bottom: 3px;"><strong>Join the Blueprint community</strong></p>
26+
<p style="margin: 0 !important;">
27+
Become part of the <a href="https://discord.com/servers/blueprint-1063548024825057451" target="_blank">Blueprint Discord community</a> and get notified when new extensions are released, participate with community events and more.
28+
</p>
29+
</div>
30+
</div>
31+
</div>
32+
</div>
33+
<div class="modal-footer" style="border-radius: 0 0 15px 15px;">
34+
<p class="small text-left">By using Blueprint you accept our <a href="https://blueprint.zip/legal/privacy" target="_blank">privacy policy</a>. You can disable anonymized telemetry data in the Blueprint settings menuh.</p>
35+
<input type="hidden" name="flags:introduction_dismissed" value="1">
36+
<input type="hidden" name="_method" value="PATCH">
37+
{!! csrf_field() !!}
38+
<button type="submit" class="btn btn-primary btn-sm" style="border-radius: 8px;">Take me to my extensions!</button>
39+
</div>
40+
</form>
41+
</div>
42+
</div>
43+
</div>
44+
45+
<script>
46+
document.addEventListener('DOMContentLoaded', () => {
47+
$('#blueprintIntroductionModal').modal({
48+
keyboard: false,
49+
backdrop: 'static',
50+
show: true
51+
})
52+
})
53+
</script>
54+
@endif
55+
@endsection

resources/views/blueprint/admin/template.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<i class="bi bi-gear-fill"></i>
66
</button>
77

8-
@if($EXTENSION_WEBSITE != "[website]")
8+
@if($EXTENSION_WEBSITE != "[website]")
99
<a href="{{ $EXTENSION_WEBSITE }}" target="_blank">
1010
<button class="btn btn-gray-alt pull-right" style="padding: 5px 10px">
1111
<i class="{{ $EXTENSION_WEBICON }}"></i>

resources/views/layouts/admin.blade.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@
135135
</aside>
136136
<div class="content-wrapper">
137137
<section class="content-header">
138+
@yield('blueprint.introduction')
138139
@yield('content-header')
139140
</section>
140141
<section class="content">
@@ -168,9 +169,9 @@
168169
<strong><i class="fa fa-fw fa-clock-o"></i></strong> {{ round(microtime(true) - LARAVEL_START, 3) }}s
169170
</div>
170171
@if(starts_with(Route::currentRouteName(), 'admin.extensions'))
171-
Copyright &copy; 2023 - {{ date('Y') }} <a href="https://blueprint.zip/">Blueprint</a>.
172+
Copyright &copy; 2023 - {{ date('Y') }} <a href="https://blueprint.zip/">Blueprint Framework</a>, Emma (<a href="https://prpl.wtf/">prpl.wtf</a>) and contributors.
172173
@else
173-
Copyright &copy; 2015 - {{ date('Y') }} <a href="https://pterodactyl.io/">Pterodactyl Software</a>.
174+
Copyright &copy; 2015 - {{ date('Y') }} <a href="https://pterodactyl.io/">Pterodactyl Software</a>
174175
@endif
175176
</footer>
176177
</div>

0 commit comments

Comments
 (0)