pixflow-upgrade-planning 1.3.7 → 1.4.0
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.
- package/index.js +57 -6
- package/package.json +1 -1
- package/style.css +15 -1
- package/style.css.map +1 -1
- package/style.scss +15 -1
- package/template.html +4 -4
package/index.js
CHANGED
|
@@ -8,6 +8,22 @@ class PixflowUpgradePlanning extends HTMLElement {
|
|
|
8
8
|
super();
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
set title(value){
|
|
12
|
+
this.querySelector("div > window-element > div").innerHTML = value;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
get title(){
|
|
16
|
+
this.querySelector("div > window-element > div").innerHTML
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
set caption(text){
|
|
20
|
+
this.querySelector("div > window-element > div.go-premium-btn").innerHTML = text;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
get caption(){
|
|
24
|
+
return this.querySelector("div > window-element > div.go-premium-btn").innerHTML;
|
|
25
|
+
}
|
|
26
|
+
|
|
11
27
|
async connectedCallback(){
|
|
12
28
|
const content = fs.readFileSync(path.join(__dirname, "style.css"));
|
|
13
29
|
let style = document.head.querySelector("style");
|
|
@@ -18,17 +34,57 @@ class PixflowUpgradePlanning extends HTMLElement {
|
|
|
18
34
|
style.innerHTML = content;
|
|
19
35
|
document.head.appendChild(style);
|
|
20
36
|
}
|
|
37
|
+
const userData = JSON.parse(localStorage.getItem("init-data")).userData;
|
|
38
|
+
this.url = userData.upgrade_subscription_url;
|
|
21
39
|
|
|
22
40
|
this.template = parse.parseFromString(fs.readFileSync(path.join(__dirname, "template.html")).toString("utf8"), "text/html");
|
|
23
41
|
this.appendChild(this.template.querySelector("div"));
|
|
24
42
|
|
|
25
43
|
this.querySelector("img.close").addEventListener("click", this.close_click);
|
|
26
44
|
|
|
27
|
-
this.querySelector("
|
|
45
|
+
this.querySelector("div.go-premium-btn").addEventListener("click", e => {
|
|
46
|
+
window.cep.util.openURLInDefaultBrowser(this.url);
|
|
47
|
+
})
|
|
28
48
|
|
|
29
49
|
this.querySelector("div.block").addEventListener("click", this.close_click);
|
|
50
|
+
|
|
51
|
+
this.addEventListener("title", e => {
|
|
52
|
+
this.title = e.detail.text;
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
this.addEventListener("url", e => {
|
|
56
|
+
this.url = e.detail.url;
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
this.addEventListener("caption", e => {
|
|
60
|
+
this.caption = e.detail.text;
|
|
61
|
+
})
|
|
30
62
|
}
|
|
31
63
|
|
|
64
|
+
setUrl(url){
|
|
65
|
+
this.dispatchEvent(new CustomEvent("url", {
|
|
66
|
+
detail: {
|
|
67
|
+
url: url
|
|
68
|
+
}
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
setTitle(text){
|
|
73
|
+
this.dispatchEvent(new CustomEvent("title", {
|
|
74
|
+
detail: {
|
|
75
|
+
text: text
|
|
76
|
+
}
|
|
77
|
+
}));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
setCaption(text){
|
|
81
|
+
this.dispatchEvent(new CustomEvent("caption", {
|
|
82
|
+
detail: {
|
|
83
|
+
text: text
|
|
84
|
+
}
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
|
|
32
88
|
close_click(e){
|
|
33
89
|
let window = e.target.parentNode;
|
|
34
90
|
if(window.tagName != "WINDOW-ELEMENT")
|
|
@@ -43,11 +99,6 @@ class PixflowUpgradePlanning extends HTMLElement {
|
|
|
43
99
|
this.classList.add("active");
|
|
44
100
|
}
|
|
45
101
|
|
|
46
|
-
go_premium_click(e){
|
|
47
|
-
const url = JSON.parse(localStorage.getItem("init-data")).userData.upgrade_subscription_url;
|
|
48
|
-
window.cep.util.openURLInDefaultBrowser(url);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
102
|
}
|
|
52
103
|
|
|
53
104
|
customElements.define("pixflow-upgrade-planning", PixflowUpgradePlanning);
|
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -42,6 +42,7 @@ pixflow-upgrade-planning div window-element div.title {
|
|
|
42
42
|
margin: 25px 0;
|
|
43
43
|
}
|
|
44
44
|
pixflow-upgrade-planning div window-element img.close {
|
|
45
|
+
cursor: pointer;
|
|
45
46
|
width: 36px;
|
|
46
47
|
height: 36px;
|
|
47
48
|
position: absolute;
|
|
@@ -68,9 +69,22 @@ pixflow-upgrade-planning div window-element ul li {
|
|
|
68
69
|
pixflow-upgrade-planning div window-element ul li > img {
|
|
69
70
|
margin-right: 10px;
|
|
70
71
|
}
|
|
71
|
-
pixflow-upgrade-planning div window-element
|
|
72
|
+
pixflow-upgrade-planning div window-element div.go-premium-btn {
|
|
72
73
|
cursor: pointer;
|
|
73
74
|
margin-bottom: 30px;
|
|
75
|
+
width: 332;
|
|
76
|
+
height: 55;
|
|
77
|
+
border-radius: 49px;
|
|
78
|
+
padding-top: 10.21px;
|
|
79
|
+
padding-right: 17.02px;
|
|
80
|
+
padding-bottom: 10.21px;
|
|
81
|
+
padding-left: 17.02px;
|
|
82
|
+
background-color: #FFFFFF;
|
|
83
|
+
color: #08090B;
|
|
84
|
+
font-family: Inter;
|
|
85
|
+
font-weight: 600;
|
|
86
|
+
font-size: 15px;
|
|
87
|
+
text-align: center;
|
|
74
88
|
}
|
|
75
89
|
|
|
76
90
|
/*# sourceMappingURL=style.css.map */
|
package/style.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["style.scss"],"names":[],"mappings":"AAAA;EACI;;AACA;EACI;;AAGA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;;AAEJ;EACI;EACA;;AAGA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;;AAIZ;EACI;EACA","file":"style.css"}
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["style.scss"],"names":[],"mappings":"AAAA;EACI;;AACA;EACI;;AAGA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;;AAEJ;EACI;EACA;;AAGA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;;AAIZ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA","file":"style.css"}
|
package/style.scss
CHANGED
|
@@ -41,6 +41,7 @@ pixflow-upgrade-planning {
|
|
|
41
41
|
margin: 25px 0;
|
|
42
42
|
}
|
|
43
43
|
img.close {
|
|
44
|
+
cursor: pointer;
|
|
44
45
|
width: 36px;
|
|
45
46
|
height: 36px;
|
|
46
47
|
position: absolute;
|
|
@@ -69,9 +70,22 @@ pixflow-upgrade-planning {
|
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
|
-
|
|
73
|
+
div.go-premium-btn {
|
|
73
74
|
cursor: pointer;
|
|
74
75
|
margin-bottom: 30px;
|
|
76
|
+
width: 332;
|
|
77
|
+
height: 55;
|
|
78
|
+
border-radius: 49px;
|
|
79
|
+
padding-top: 10.21px;
|
|
80
|
+
padding-right: 17.02px;
|
|
81
|
+
padding-bottom: 10.21px;
|
|
82
|
+
padding-left: 17.02px;
|
|
83
|
+
background-color: #FFFFFF;
|
|
84
|
+
color: #08090B;
|
|
85
|
+
font-family: Inter;
|
|
86
|
+
font-weight: 600;
|
|
87
|
+
font-size: 15px;
|
|
88
|
+
text-align: center;
|
|
75
89
|
}
|
|
76
90
|
}
|
|
77
91
|
}
|
package/template.html
CHANGED
|
@@ -11,20 +11,20 @@
|
|
|
11
11
|
</li>
|
|
12
12
|
<li>
|
|
13
13
|
<img src="./node_modules/pixflow-upgrade-planning/images/item-style.svg">
|
|
14
|
-
<div>
|
|
14
|
+
<div>Up to 25,000 AI Credits/Mo</div></li>
|
|
15
15
|
<li>
|
|
16
16
|
<img src="./node_modules/pixflow-upgrade-planning/images/item-style.svg">
|
|
17
|
-
<div>
|
|
17
|
+
<div>Full Access to Graphic templates</div>
|
|
18
18
|
</li>
|
|
19
19
|
<li>
|
|
20
20
|
<img src="./node_modules/pixflow-upgrade-planning/images/item-style.svg">
|
|
21
|
-
<div>
|
|
21
|
+
<div>Full Access to Video Templates</div>
|
|
22
22
|
</li>
|
|
23
23
|
<li>
|
|
24
24
|
<img src="./node_modules/pixflow-upgrade-planning/images/item-style.svg">
|
|
25
25
|
<div>License With Worldwide Coverage</div>
|
|
26
26
|
</li>
|
|
27
27
|
</ul>
|
|
28
|
-
<
|
|
28
|
+
<div class="go-premium-btn">Go Unlimited from $14.99/mo</div>
|
|
29
29
|
</window-element>
|
|
30
30
|
</div>
|