@cshah18/sdk 4.6.0 → 4.8.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/dist/cobuy-sdk.esm.js
CHANGED
|
@@ -1852,9 +1852,10 @@ class LobbyModal {
|
|
|
1852
1852
|
// Top section
|
|
1853
1853
|
const topSection = this.createTopSection();
|
|
1854
1854
|
mainContent.appendChild(topSection);
|
|
1855
|
-
// Activity section (hidden when offline redemption is present to keep layout compact)
|
|
1855
|
+
// Activity section (hidden when group is completed or offline redemption is present to keep layout compact)
|
|
1856
|
+
const isComplete = this.data.status === "complete";
|
|
1856
1857
|
const hasOfflineRedemption = this.data.offlineRedemption && isValidOfflineRedemption(this.data.offlineRedemption);
|
|
1857
|
-
if (!hasOfflineRedemption) {
|
|
1858
|
+
if (!isComplete && !hasOfflineRedemption) {
|
|
1858
1859
|
const activitySection = this.createActivitySection();
|
|
1859
1860
|
mainContent.appendChild(activitySection);
|
|
1860
1861
|
}
|
|
@@ -3056,6 +3057,10 @@ class LobbyModal {
|
|
|
3056
3057
|
if (data.offlineRedemption !== undefined || data.status !== undefined) {
|
|
3057
3058
|
this.updateOfflineRedemptionVisibility();
|
|
3058
3059
|
}
|
|
3060
|
+
// Update activity section visibility if status changed
|
|
3061
|
+
if (data.status !== undefined) {
|
|
3062
|
+
this.updateActivitySectionVisibility();
|
|
3063
|
+
}
|
|
3059
3064
|
// Update progress if changed
|
|
3060
3065
|
if (data.progress !== undefined) {
|
|
3061
3066
|
const progressFill = document.getElementById("progressFill");
|
|
@@ -3166,6 +3171,21 @@ class LobbyModal {
|
|
|
3166
3171
|
}
|
|
3167
3172
|
}
|
|
3168
3173
|
}
|
|
3174
|
+
/**
|
|
3175
|
+
* Update activity section visibility based on group status
|
|
3176
|
+
*/
|
|
3177
|
+
updateActivitySectionVisibility() {
|
|
3178
|
+
const activityWp = document.querySelector(".lobby-activity-wp");
|
|
3179
|
+
const isComplete = this.data.status === "complete";
|
|
3180
|
+
if (isComplete && activityWp) {
|
|
3181
|
+
// Hide activity section when group is complete
|
|
3182
|
+
activityWp.style.display = "none";
|
|
3183
|
+
}
|
|
3184
|
+
else if (!isComplete && activityWp) {
|
|
3185
|
+
// Show activity section when group is active
|
|
3186
|
+
activityWp.style.display = "";
|
|
3187
|
+
}
|
|
3188
|
+
}
|
|
3169
3189
|
/**
|
|
3170
3190
|
* Subscribe to socket events
|
|
3171
3191
|
*/
|