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