@followgate/js 0.8.0 → 0.8.1

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/index.js CHANGED
@@ -307,6 +307,45 @@ var MODAL_STYLES = `
307
307
  height: 20px;
308
308
  color: #fbbf24;
309
309
  flex-shrink: 0;
310
+ }
311
+
312
+ .fg-verify-box {
313
+ background: rgba(59, 130, 246, 0.05);
314
+ border: 1px solid rgba(96, 165, 250, 0.5);
315
+ border-radius: 12px;
316
+ padding: 12px 16px;
317
+ margin-bottom: 8px;
318
+ display: flex;
319
+ align-items: center;
320
+ justify-content: space-between;
321
+ gap: 12px;
322
+ }
323
+
324
+ .fg-verify-box-left {
325
+ display: flex;
326
+ align-items: center;
327
+ gap: 8px;
328
+ }
329
+
330
+ .fg-verify-spinner {
331
+ width: 20px;
332
+ height: 20px;
333
+ border: 2px solid rgba(96, 165, 250, 0.3);
334
+ border-top-color: #60a5fa;
335
+ border-radius: 50%;
336
+ animation: fg-spin 1s linear infinite;
337
+ }
338
+
339
+ .fg-verify-text {
340
+ font-size: 14px;
341
+ color: #93c5fd;
342
+ }
343
+
344
+ .fg-verify-hint {
345
+ font-size: 12px;
346
+ color: #64748b;
347
+ text-align: center;
348
+ margin-bottom: 16px;
310
349
  margin-top: 2px;
311
350
  }
312
351
 
@@ -784,8 +823,22 @@ var FollowGateClient = class {
784
823
  renderConfirmStep() {
785
824
  const content = this.getContentElement();
786
825
  if (!content) return;
826
+ const username = this.currentUser?.username;
787
827
  content.innerHTML = `
788
828
  <h2 class="fg-title">Almost done!</h2>
829
+ <div class="fg-verify-box">
830
+ <div class="fg-verify-box-left">
831
+ <div class="fg-verify-spinner"></div>
832
+ <span class="fg-verify-text">Verifying follow & repost</span>
833
+ </div>
834
+ ${username ? `
835
+ <div class="fg-user-badge" style="margin: 0;">
836
+ <div class="fg-user-badge-dot" style="background: #facc15;"></div>
837
+ <span class="fg-user-badge-text">@${username}</span>
838
+ </div>
839
+ ` : ""}
840
+ </div>
841
+ <p class="fg-verify-hint">Verification may take some time</p>
789
842
  <div class="fg-warning-box">
790
843
  ${ICONS.warning}
791
844
  <p><strong>Note:</strong> Access may be revoked if actions are not completed.</p>
@@ -1018,7 +1071,10 @@ var FollowGateClient = class {
1018
1071
  );
1019
1072
  if (!response.ok) {
1020
1073
  if (this.config.debug) {
1021
- console.warn("[FollowGate] Verification check failed:", response.status);
1074
+ console.warn(
1075
+ "[FollowGate] Verification check failed:",
1076
+ response.status
1077
+ );
1022
1078
  }
1023
1079
  return false;
1024
1080
  }
@@ -1157,7 +1213,10 @@ var FollowGateClient = class {
1157
1213
  if (response.ok) {
1158
1214
  console.log("[FollowGate] Completion saved to server");
1159
1215
  } else {
1160
- console.warn("[FollowGate] Failed to save completion:", response.status);
1216
+ console.warn(
1217
+ "[FollowGate] Failed to save completion:",
1218
+ response.status
1219
+ );
1161
1220
  }
1162
1221
  }
1163
1222
  } catch (error) {
package/dist/index.mjs CHANGED
@@ -281,6 +281,45 @@ var MODAL_STYLES = `
281
281
  height: 20px;
282
282
  color: #fbbf24;
283
283
  flex-shrink: 0;
284
+ }
285
+
286
+ .fg-verify-box {
287
+ background: rgba(59, 130, 246, 0.05);
288
+ border: 1px solid rgba(96, 165, 250, 0.5);
289
+ border-radius: 12px;
290
+ padding: 12px 16px;
291
+ margin-bottom: 8px;
292
+ display: flex;
293
+ align-items: center;
294
+ justify-content: space-between;
295
+ gap: 12px;
296
+ }
297
+
298
+ .fg-verify-box-left {
299
+ display: flex;
300
+ align-items: center;
301
+ gap: 8px;
302
+ }
303
+
304
+ .fg-verify-spinner {
305
+ width: 20px;
306
+ height: 20px;
307
+ border: 2px solid rgba(96, 165, 250, 0.3);
308
+ border-top-color: #60a5fa;
309
+ border-radius: 50%;
310
+ animation: fg-spin 1s linear infinite;
311
+ }
312
+
313
+ .fg-verify-text {
314
+ font-size: 14px;
315
+ color: #93c5fd;
316
+ }
317
+
318
+ .fg-verify-hint {
319
+ font-size: 12px;
320
+ color: #64748b;
321
+ text-align: center;
322
+ margin-bottom: 16px;
284
323
  margin-top: 2px;
285
324
  }
286
325
 
@@ -758,8 +797,22 @@ var FollowGateClient = class {
758
797
  renderConfirmStep() {
759
798
  const content = this.getContentElement();
760
799
  if (!content) return;
800
+ const username = this.currentUser?.username;
761
801
  content.innerHTML = `
762
802
  <h2 class="fg-title">Almost done!</h2>
803
+ <div class="fg-verify-box">
804
+ <div class="fg-verify-box-left">
805
+ <div class="fg-verify-spinner"></div>
806
+ <span class="fg-verify-text">Verifying follow & repost</span>
807
+ </div>
808
+ ${username ? `
809
+ <div class="fg-user-badge" style="margin: 0;">
810
+ <div class="fg-user-badge-dot" style="background: #facc15;"></div>
811
+ <span class="fg-user-badge-text">@${username}</span>
812
+ </div>
813
+ ` : ""}
814
+ </div>
815
+ <p class="fg-verify-hint">Verification may take some time</p>
763
816
  <div class="fg-warning-box">
764
817
  ${ICONS.warning}
765
818
  <p><strong>Note:</strong> Access may be revoked if actions are not completed.</p>
@@ -992,7 +1045,10 @@ var FollowGateClient = class {
992
1045
  );
993
1046
  if (!response.ok) {
994
1047
  if (this.config.debug) {
995
- console.warn("[FollowGate] Verification check failed:", response.status);
1048
+ console.warn(
1049
+ "[FollowGate] Verification check failed:",
1050
+ response.status
1051
+ );
996
1052
  }
997
1053
  return false;
998
1054
  }
@@ -1131,7 +1187,10 @@ var FollowGateClient = class {
1131
1187
  if (response.ok) {
1132
1188
  console.log("[FollowGate] Completion saved to server");
1133
1189
  } else {
1134
- console.warn("[FollowGate] Failed to save completion:", response.status);
1190
+ console.warn(
1191
+ "[FollowGate] Failed to save completion:",
1192
+ response.status
1193
+ );
1135
1194
  }
1136
1195
  }
1137
1196
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@followgate/js",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "FollowGate SDK - Grow your audience with every download. Require social actions (follow, repost) before users can access your app.",
5
5
  "author": "FollowGate <hello@followgate.app>",
6
6
  "homepage": "https://followgate.app",