OctoPrint-Wrapped 1.1.1__py3-none-any.whl → 1.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- octoprint_wrapped/static/js/wrapped.js +13 -2
- octoprint_wrapped/templates/wrapped_about.jinja2 +18 -1
- {octoprint_wrapped-1.1.1.dist-info → octoprint_wrapped-1.2.0.dist-info}/METADATA +1 -1
- {octoprint_wrapped-1.1.1.dist-info → octoprint_wrapped-1.2.0.dist-info}/RECORD +7 -7
- {octoprint_wrapped-1.1.1.dist-info → octoprint_wrapped-1.2.0.dist-info}/WHEEL +1 -1
- {octoprint_wrapped-1.1.1.dist-info → octoprint_wrapped-1.2.0.dist-info}/entry_points.txt +0 -0
- {octoprint_wrapped-1.1.1.dist-info → octoprint_wrapped-1.2.0.dist-info}/top_level.txt +0 -0
|
@@ -47,7 +47,7 @@ $(function () {
|
|
|
47
47
|
: now.getFullYear() - 1; // already January
|
|
48
48
|
const years = self.availableYears();
|
|
49
49
|
|
|
50
|
-
if (years.indexOf(year) !== -1
|
|
50
|
+
if (years.indexOf(year) !== -1) {
|
|
51
51
|
return year;
|
|
52
52
|
} else {
|
|
53
53
|
return false;
|
|
@@ -62,7 +62,14 @@ $(function () {
|
|
|
62
62
|
const year = self.currentWrapped();
|
|
63
63
|
if (!year) return false;
|
|
64
64
|
|
|
65
|
-
return
|
|
65
|
+
return self.svgUrlForYear(year);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
self.pastYears = ko.pureComputed(() => {
|
|
69
|
+
const now = new Date();
|
|
70
|
+
const year = now.getFullYear();
|
|
71
|
+
const years = self.availableYears();
|
|
72
|
+
return years.filter((y) => y < year).sort((a, b) => b - a);
|
|
66
73
|
});
|
|
67
74
|
|
|
68
75
|
self.withinWrappedSeason = ko.pureComputed(() => {
|
|
@@ -74,6 +81,10 @@ $(function () {
|
|
|
74
81
|
);
|
|
75
82
|
});
|
|
76
83
|
|
|
84
|
+
self.svgUrlForYear = (year) => {
|
|
85
|
+
return OctoPrint.plugins.wrapped.getYearSvgUrl(year);
|
|
86
|
+
};
|
|
87
|
+
|
|
77
88
|
self.requestData = () => {
|
|
78
89
|
if (
|
|
79
90
|
!self.loginState.hasPermission(
|
|
@@ -19,6 +19,23 @@
|
|
|
19
19
|
</div>
|
|
20
20
|
<p data-bind="visible: !withinWrappedSeason()">
|
|
21
21
|
{% trans %}
|
|
22
|
-
Nothing to see
|
|
22
|
+
Nothing to see for this year yet! Come back between December 1st and January 10th!
|
|
23
23
|
{% endtrans %}
|
|
24
24
|
</p>
|
|
25
|
+
|
|
26
|
+
<div id="plugin_wrapped_pastyears"
|
|
27
|
+
data-bind="visible: pastYears().length > 0">
|
|
28
|
+
<h4>
|
|
29
|
+
<a href="javascript:void()"
|
|
30
|
+
data-bind="toggleContent: { class: 'fa-caret-right fa-caret-down', parent: '#plugin_wrapped_pastyears', container: '.hide' }"><i class="fas fa-caret-right"></i> {{ _("Past years") }}</a>
|
|
31
|
+
</h4>
|
|
32
|
+
|
|
33
|
+
<div class="hide" data-bind="foreach: pastYears">
|
|
34
|
+
<h5 data-bind="text: $data"></h5>
|
|
35
|
+
<img data-bind="src.svgtopng: $root.svgUrlForYear($data)"
|
|
36
|
+
alt="OctoPrint Wrapped sharepic"
|
|
37
|
+
width="400"
|
|
38
|
+
height="400" />
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
</div>
|
|
@@ -3,16 +3,16 @@ octoprint_wrapped/static/clientjs/wrapped.js,sha256=yoEmqSkmLrwBB7K6iZjicpUuQEBd
|
|
|
3
3
|
octoprint_wrapped/static/fonts/LICENSE,sha256=f5BiM895nR-rA7OfeuvzJeV0ekRUf6OnGCc6Gp-K_W0,4328
|
|
4
4
|
octoprint_wrapped/static/fonts/open-sans-v15-latin-700.woff,sha256=XgPgx2aCZkhsq5UpcCAZ11whn87CsegqfBF5e6m3hQY,18476
|
|
5
5
|
octoprint_wrapped/static/js/ko.src.svgtopng.js,sha256=ubZUiCymWWNR43LsFx7J85PJmD2vB8QOjksFy0ppffU,1183
|
|
6
|
-
octoprint_wrapped/static/js/wrapped.js,sha256=
|
|
6
|
+
octoprint_wrapped/static/js/wrapped.js,sha256=oL1ZdZc-6VZQNilk2zYW6jJiWOa5Viv3EP9iKpDk454,6272
|
|
7
7
|
octoprint_wrapped/static/pure-snow/LICENSE,sha256=nDNbOMh1fRHtkKdPc97ofGj9M2u1ys5AgQ2CtE8d0RY,1111
|
|
8
8
|
octoprint_wrapped/static/pure-snow/pure-snow.css,sha256=qGV-V91mFKVyS8PASBZWb2PJuZlvj7KZMzcn8mR9DhE,431
|
|
9
9
|
octoprint_wrapped/static/pure-snow/pure-snow.js,sha256=ft0wCYZ7BpZSwmtAPmGY3osAYv7m4x1ZVj53rselqa4,4498
|
|
10
10
|
octoprint_wrapped/templates/wrapped.svg.jinja2,sha256=YKbvwlko4tLOodmEwTv7JfEkoGmLXpQh2vkW8Ism1ns,173369
|
|
11
|
-
octoprint_wrapped/templates/wrapped_about.jinja2,sha256=
|
|
11
|
+
octoprint_wrapped/templates/wrapped_about.jinja2,sha256=MneQa9h_gQ_Hm3qL9R-nmNR5EU-UklFUgW-1GAWSQEQ,1545
|
|
12
12
|
octoprint_wrapped/templates/wrapped_navbar_snowfall.jinja2,sha256=ln8wqiYJUMWJo6SyblBnlmm3BOxVbxr6iO8yLtmFZtk,275
|
|
13
13
|
octoprint_wrapped/templates/wrapped_navbar_wrapped.jinja2,sha256=F8qqcr4__cV3MFK2aJE6MeNvvyzAYsRki4HHaPVoswU,279
|
|
14
|
-
octoprint_wrapped-1.
|
|
15
|
-
octoprint_wrapped-1.
|
|
16
|
-
octoprint_wrapped-1.
|
|
17
|
-
octoprint_wrapped-1.
|
|
18
|
-
octoprint_wrapped-1.
|
|
14
|
+
octoprint_wrapped-1.2.0.dist-info/METADATA,sha256=8j6fdGy3dkMQ_vRXZadXjEItS7p7VS9mOnGAuotjbfE,2222
|
|
15
|
+
octoprint_wrapped-1.2.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
16
|
+
octoprint_wrapped-1.2.0.dist-info/entry_points.txt,sha256=xQ62aUD0yPRRLufT5CfMKvXl-VDGQag1s6ooOXI6psc,47
|
|
17
|
+
octoprint_wrapped-1.2.0.dist-info/top_level.txt,sha256=d6Rw7m_ZQ3UXfvhgx6Czeb-0xY50nPbvd4so-WrGJGo,18
|
|
18
|
+
octoprint_wrapped-1.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|