@flarehr/apollo-super-campaign 0.1.731 → 0.1.733
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/dist/apollo-super-campaign.js +7 -7
- package/dist/index.html +7 -23
- package/package.json +1 -1
package/dist/index.html
CHANGED
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
</style>
|
|
34
34
|
<body>
|
|
35
35
|
<fieldset>
|
|
36
|
-
<legend>
|
|
36
|
+
<legend>Choose an app:</legend>
|
|
37
37
|
<div>
|
|
38
38
|
<input type="radio" id="campaign-radio" name="app" value="campaign" checked />
|
|
39
39
|
<label for="campaign-radio">apollo-super-campaign</label>
|
|
40
|
-
<input type="radio"
|
|
40
|
+
<input type="radio" id="byof-radio" name="app" value="byof" />
|
|
41
41
|
<label for="byof-radio">apollo-super-byof-engagement</label>
|
|
42
42
|
</div>
|
|
43
43
|
<div style="padding-top: 1rem;">
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
</fieldset>
|
|
51
51
|
|
|
52
52
|
<div style="padding-top: 3rem;">
|
|
53
|
-
<button id="
|
|
53
|
+
<button id="returnButton" style="display: none">Return</button>
|
|
54
54
|
<div id="super-campaign">
|
|
55
55
|
<apollo-super-campaign
|
|
56
56
|
backend-url="%VITE_BACKEND_URL%"
|
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
/>
|
|
59
59
|
</div>
|
|
60
60
|
<div id="super-byof-engagement" style="display: none">
|
|
61
|
-
<button id="byofReturnButton" style="display: none">Return</button>
|
|
62
61
|
<apollo-super-byof-engagement
|
|
63
62
|
id="super-byof-engagement-element"
|
|
64
63
|
backend-url="%VITE_BACKEND_URL%"
|
|
@@ -105,24 +104,13 @@
|
|
|
105
104
|
</script>
|
|
106
105
|
<script>
|
|
107
106
|
// Setup button to recreate apollo-super-campaign
|
|
108
|
-
const
|
|
109
|
-
|
|
107
|
+
const returnButton = document.getElementById('returnButton');
|
|
108
|
+
returnButton.onclick = () => {
|
|
110
109
|
const el = document.createElement('apollo-super-campaign');
|
|
111
110
|
el.setAttribute('backend-url', '%VITE_BACKEND_URL%');
|
|
112
111
|
el.setAttribute('access-token', '%VITE_ACCESS_TOKEN%');
|
|
113
112
|
document.body.appendChild(el);
|
|
114
|
-
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
// Setup button to recreate apollo-super-byof-engagement
|
|
118
|
-
const byofReturnButton = document.getElementById('byofReturnButton');
|
|
119
|
-
byofReturnButton.onclick = () => {
|
|
120
|
-
const el = document.createElement('apollo-super-byof-engagement');
|
|
121
|
-
el.setAttribute('backend-url', '%VITE_BACKEND_URL%');
|
|
122
|
-
el.setAttribute('access-token', '%VITE_ACCESS_TOKEN%');
|
|
123
|
-
el.setAttribute('fund-usi', document.getElementById('fund-usi-dropdown').value);
|
|
124
|
-
document.body.appendChild(el);
|
|
125
|
-
byofReturnButton.style.display = 'none';
|
|
113
|
+
returnButton.style.display = 'none';
|
|
126
114
|
};
|
|
127
115
|
|
|
128
116
|
// Listen to events meant for apollo
|
|
@@ -137,7 +125,6 @@
|
|
|
137
125
|
'super-campaign-loaded',
|
|
138
126
|
'super-campaign-load-failed',
|
|
139
127
|
'super-campaign-failed',
|
|
140
|
-
'continue'
|
|
141
128
|
];
|
|
142
129
|
for (const event of events) {
|
|
143
130
|
document.addEventListener(event, (e) => {
|
|
@@ -149,10 +136,7 @@
|
|
|
149
136
|
e.type === 'promoted-fund-joined'
|
|
150
137
|
) {
|
|
151
138
|
document.getElementsByTagName('apollo-super-campaign')[0].remove();
|
|
152
|
-
|
|
153
|
-
} else if (e.type === 'continue') {
|
|
154
|
-
document.getElementsByTagName('apollo-super-byof-engagement')[0].remove();
|
|
155
|
-
byofReturnButton.style.display = 'block';
|
|
139
|
+
returnButton.style.display = 'block';
|
|
156
140
|
}
|
|
157
141
|
});
|
|
158
142
|
}
|