Skip to content

Commit 0b307ce

Browse files
committed
💄 Add about dialog
1 parent 27fb416 commit 0b307ce

File tree

3 files changed

+76
-0
lines changed

3 files changed

+76
-0
lines changed

octoprint_wled/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class WLEDPlugin(
2121
wled: Optional[WLED]
2222
api: Optional[api.PluginAPI]
2323
events: Optional[events.PluginEventHandler]
24+
progress: Optional[progress.PluginProgressHandler]
2425
lights_on: bool = True
2526

2627
def initialize(self) -> None:
@@ -155,6 +156,12 @@ def get_assets(self) -> Dict[str, List[str]]:
155156
"css": ["dist/wled.css"],
156157
}
157158

159+
# TemplatePlugin
160+
def get_template_vars(self):
161+
return {
162+
"version": self._plugin_version,
163+
}
164+
158165
# Software Update hook
159166
def get_update_information(self) -> dict:
160167
return {
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<h5>About the plugin</h5>
2+
3+
<p><strong><i><i class="fas fa-tag text-success"></i> Version {{ plugin_wled_version }}</i></strong> - <a href="https://github.com/cp2004/OctoPrint-WLED/releases" target="_blank">Release notes</a></p>
4+
5+
<p>Some useful links for you:</p>
6+
<ul>
7+
<li>Found a bug? Report it! <a href="https://github.com/cp2004/OctoPrint-WLED/issues" target="_blank">Issue tracker <i class="fas fa-external-link-alt"></i></a></li>
8+
<li>Need support:
9+
<ul>
10+
<li>Open an issue as a <a href="https://github.com/cp2004/OctoPrint-WLED/issues/new" target="_blank"> question on the repository <i class="fas fa-external-link-alt"></i></a></li>
11+
<li>Get in contact on the <a href="https://discord.octoprint.org" target="_blank">OctoPrint Discord server <i class="fas fa-external-link-alt"></i></a> </li>
12+
<li>Get in contact on the <a href="https://community.octoprint.org" target="_blank">community forums <i class="fas fa-external-link-alt"></i></a></li>
13+
</ul>
14+
</li>
15+
</ul>
16+
17+
<h5>Enjoying the plugin? Support it's development!</h5>
18+
<p>A great way to say thanks, and encourage more great features. Sponsor what you want, one time or monthly!</p><br>
19+
<a class="btn btn-success" href="https://github.com/sponsors/cp2004/" target="_blank"><i class="fas fa-heart" aria-hidden="true"></i> Sponsor my projects</a>
20+
21+
<button class="btn btn-success" data-toggle="modal" data-target="#SponsorsModal">View sponsors</button>
22+
<div id="SponsorsModal" class="modal hide fade">
23+
<div class="modal-header">
24+
<a href="#" class="close" data-dismiss="modal" aria-hidden="true">&times;</a>
25+
<h3>Sponsors!</h3>
26+
</div>
27+
<div class="modal-body">
28+
<p>These wonderful people have sponsored development of this plugin. As a thank you, their names are here in the plugin.</p>
29+
<p>Want to see your name here? <a class="text-success" href="https://github.com/sponsors/cp2004" target="_blank">You can sponsor too!</a></p>
30+
<ul>
31+
<li>ssl-3</li>
32+
<li>Gina Häußge</li>
33+
<li>FlynHokie</li>
34+
<li>Ken Lucke</li>
35+
<li>erickstryck</li>
36+
<li>ReggieMDavis</li>
37+
<li>otaku13</li>
38+
<li>Matt Ockendon</li>
39+
<li>nigelboubert</li>
40+
<li>samwiseg0</li>
41+
<li>pRINTERnOODLE</li>
42+
</ul>
43+
</div>
44+
<div class="modal-footer">
45+
<a href="#" class="btn" data-dismiss="modal" aria-hidden="true">{{ _('Close') }}</a>
46+
</div>
47+
</div>
48+
<button class="btn btn-primary" data-toggle="modal" data-target="#ContributorModal">View contributors</button>
49+
<div id="ContributorModal" class="modal hide fade">
50+
<div class="modal-header">
51+
<a href="#" class="close" data-dismiss="modal" aria-hidden="true">&times;</a>
52+
<h3>Contributors!</h3>
53+
</div>
54+
<div class="modal-body">
55+
<p>These wonderful people have helped out in development of this plugin. Whether it's fixing bugs, improvements to the code, or new features, all are useful!</p>
56+
<p>Want to see your name here? Get involved over on the repo. Any help is always appreciated!</p>
57+
<ul>
58+
<li><a href="https://github.com/jappyjan">@jappyjan</a></li>
59+
</ul>
60+
</div>
61+
<div class="modal-footer">
62+
<a href="#" class="btn" data-dismiss="modal" aria-hidden="true">{{ _('Close') }}</a>
63+
</div>
64+
</div>

octoprint_wled/templates/wled_settings.jinja2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@
3232
</button>
3333
</div>
3434
</div>
35+
<hr>
3536
<div class="tabbable">
3637
<ul class="nav nav-pills">
3738
<li class="active"><a href="#wledPrinter" data-toggle="tab">Printing effects</a></li>
3839
<li><a href="#wledProgress" data-toggle="tab">Progress effects</a></li>
40+
<li><a href="#wledAbout" data-toggle="tab">About</a></li>
3941
</ul>
4042
<div class="tab-content">
4143
<div class="tab-pane active" id="wledPrinter">
@@ -44,6 +46,9 @@
4446
<div class="tab-pane" id="wledProgress">
4547
{% include 'settings/progress.jinja2' %}
4648
</div>
49+
<div class="tab-pane" id="wledAbout">
50+
{% include "settings/about.jinja2" %}
51+
</div>
4752
</div>
4853
</div>
4954

0 commit comments

Comments
 (0)