appscms-tools-theme 5.1.1 → 5.1.2
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.
- checksums.yaml +4 -4
- data/_includes/.DS_Store +0 -0
- data/_includes/appscms/scripts/script.html +2 -0
- data/assets/.DS_Store +0 -0
- data/assets/js/appscms-login.js +52 -0
- data/assets/js/userUsageCount.js +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ccfd2a0e7a7883de1def423d8263d16a0ccb093b049204fc8ca875e55ad1674
|
4
|
+
data.tar.gz: 6559ca02f88da6f256e2fc3d5ab4891d71f2b54cc95faf8c82a16f1ea9d8e8c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a98fdb08a6cda39181f91508ef1625dd9d26416ba1d5a7b55cd43dc80f9880cbbac5b6086205195f53aeaa129537846666f5f0224032332c5578a2bcc0d69f06
|
7
|
+
data.tar.gz: 02072d78d32423bcfe7e395cf511cc5da7aacdfa5bcd0ac28537183152c6233fd0fa005fa747da108235ce3d38480db6dc83a801448212489d751fb0921b4d86
|
data/_includes/.DS_Store
CHANGED
Binary file
|
@@ -152,4 +152,6 @@ if page.layout == "appscms-feature" -%}
|
|
152
152
|
<script src="https://www.gstatic.com/firebasejs/9.22.0/firebase-app-compat.js"></script>
|
153
153
|
<script src="https://www.gstatic.com/firebasejs/9.22.0/firebase-auth-compat.js"></script>
|
154
154
|
<script src="/assets/js/appscms-login.js"></script>
|
155
|
+
<script src="/assets/js/userUsageCount.js"></script>
|
156
|
+
|
155
157
|
{%- endif -%}
|
data/assets/.DS_Store
CHANGED
Binary file
|
data/assets/js/appscms-login.js
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
---
|
2
|
+
---
|
1
3
|
const profileButton = document.getElementById("profileButton");
|
2
4
|
const userModal = document.getElementById("userModal");
|
3
5
|
let isModalOpen = false;
|
@@ -486,6 +488,55 @@ function setupAuthListeners() {
|
|
486
488
|
if (forgotPasswordForm) forgotPasswordForm.style.display = "none";
|
487
489
|
}
|
488
490
|
});
|
491
|
+
const OPERATION_LIMIT = "{{ site.OPERATION_LIMIT }}"; // Set based on site config
|
492
|
+
const STORAGE_KEY = "user_operations";
|
493
|
+
|
494
|
+
function getOperationCount() {
|
495
|
+
const storedCount = localStorage.getItem(STORAGE_KEY);
|
496
|
+
return storedCount ? parseInt(storedCount, 10) : 0;
|
497
|
+
}
|
498
|
+
|
499
|
+
function incrementOperationCount() {
|
500
|
+
let currentCount = getOperationCount();
|
501
|
+
|
502
|
+
if (currentCount >= OPERATION_LIMIT) {
|
503
|
+
showSignupPopup();
|
504
|
+
return false; // Prevent further uploads
|
505
|
+
}
|
506
|
+
|
507
|
+
localStorage.setItem(STORAGE_KEY, currentCount + 1);
|
508
|
+
return true;
|
509
|
+
}
|
510
|
+
|
511
|
+
function showSignupPopup() {
|
512
|
+
auth.onAuthStateChanged((user) => {
|
513
|
+
if (user) {
|
514
|
+
console.log(user);
|
515
|
+
}
|
516
|
+
else{
|
517
|
+
openModal()
|
518
|
+
document.querySelector('.close-modal-btn').style.display="none"
|
519
|
+
}
|
520
|
+
})
|
521
|
+
|
522
|
+
}
|
523
|
+
|
524
|
+
function hideSignupPopup() {
|
525
|
+
closeModal()
|
526
|
+
}
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
// Attach event listener to all file inputs
|
531
|
+
document.querySelectorAll("input[type='file']").forEach(input => {
|
532
|
+
input.addEventListener("change", function () {
|
533
|
+
if (incrementOperationCount()) {
|
534
|
+
console.log("File uploaded in:", this);
|
535
|
+
} else {
|
536
|
+
this.value = ""; // Reset the input field
|
537
|
+
}
|
538
|
+
});
|
539
|
+
});
|
489
540
|
}
|
490
541
|
|
491
542
|
// Initialize the app
|
@@ -494,3 +545,4 @@ if (document.readyState === "loading") {
|
|
494
545
|
} else {
|
495
546
|
loadFirebaseConfig();
|
496
547
|
}
|
548
|
+
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appscms-tools-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.1.
|
4
|
+
version: 5.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vivek-appscms
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-04-
|
11
|
+
date: 2025-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -596,6 +596,7 @@ files:
|
|
596
596
|
- assets/js/theme.js
|
597
597
|
- assets/js/usageTracking.js
|
598
598
|
- assets/js/usageTrackingEvents.js
|
599
|
+
- assets/js/userUsageCount.js
|
599
600
|
- assets/js/webvitals.js
|
600
601
|
- assets/like.svg
|
601
602
|
- assets/linkdin.svg
|