-
-
Notifications
You must be signed in to change notification settings - Fork 289
Expand file tree
/
Copy pathfeature-pro-dialog.html
More file actions
43 lines (39 loc) · 1.14 KB
/
feature-pro-dialog.html
File metadata and controls
43 lines (39 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<template id="feature-pro-template">
<style>
@import "css/style.css";
</style>
<div id="feature-pro">
<h3>This Feature is Available in TinyPilot Pro</h3>
<a
href="https://tinypilotkvm.com/products/tinypilot-pro?ref=tinypilot-app"
class="btn btn-action btn-external-link"
target="_blank"
rel="noopener noreferer"
>
Learn More
</a>
<button id="cancel-upgrade-to-pro" type="button">Close</button>
</div>
</template>
<script type="module">
import { DialogClosedEvent } from "/js/events.js";
const template = document.querySelector("#feature-pro-template");
customElements.define(
"feature-pro-dialog",
class extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: "open" }).appendChild(
template.content.cloneNode(true)
);
this._elements = {
cancelUpgradeToPro: this.shadowRoot.getElementById(
"cancel-upgrade-to-pro"
),
};
this._elements.cancelUpgradeToPro.addEventListener("click", () => {
this.dispatchEvent(new DialogClosedEvent());
});
}
}
);
</script>