appscms-tools-theme 5.1.1 → 5.1.3
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/.DS_Store +0 -0
- data/_includes/appscms/extras/ratings.html +4 -4
- 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: 0f594fe1ce7368c96e6814ed21350845c526c7a30b708e6100cb53a55b95a2aa
|
4
|
+
data.tar.gz: 3ca27dc041e88ded1146ecdb948495c6960ead608ffe449b8aa697b7cd0e5948
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c34426f8cee57315e3f00180ed4a6898488064cbd4d6629dc97e5544d03a2bf77f05f0441a1d035fad90b1f3fa8bbd0666701b84f2b0a1558fadee86a96d2f0
|
7
|
+
data.tar.gz: f2f7f6aa6d0d0910f8ccfb8fa533dd23d1456f9e62388054472bef55e6f0388c2d79efa4719a7ffe2dcd6748ff3d57c6b9091ffe04c2590d2853c923de822096
|
data/_includes/.DS_Store
CHANGED
Binary file
|
data/_includes/appscms/.DS_Store
CHANGED
Binary file
|
@@ -110,7 +110,7 @@ site.data.rating.rating.tools -%} {%- for item in data -%} {%- if item.name
|
|
110
110
|
<div class="modal-body">
|
111
111
|
<form
|
112
112
|
id="feedbackForm"
|
113
|
-
action="https://script.google.com/macros/s/
|
113
|
+
action="https://script.google.com/macros/s/AKfycby4YvQokDItHtVEPqr6KtxG11rhz5aSqMuByToBbbFPb_PDyw0ooizHpb9m89Xgh3TU/exec"
|
114
114
|
method="POST"
|
115
115
|
target="hidden_iframe"
|
116
116
|
>
|
@@ -173,7 +173,7 @@ site.data.rating.rating.tools -%} {%- for item in data -%} {%- if item.name
|
|
173
173
|
const closeButton = document.querySelector(".close-button");
|
174
174
|
const thankYouMsg = document.querySelector(".thank-you");
|
175
175
|
const form = document.getElementById("feedbackForm");
|
176
|
-
const
|
176
|
+
const iframes = document.getElementById("hidden_iframe");
|
177
177
|
|
178
178
|
const setRating = async (rating) => {
|
179
179
|
const name = "{{site.name}}";
|
@@ -291,8 +291,8 @@ site.data.rating.rating.tools -%} {%- for item in data -%} {%- if item.name
|
|
291
291
|
}
|
292
292
|
});
|
293
293
|
|
294
|
-
// Set up
|
295
|
-
|
294
|
+
// Set up iframes onload handler
|
295
|
+
iframes.onload = function () {
|
296
296
|
// This function runs when the form submission completes
|
297
297
|
if (form.classList.contains("submitted")) {
|
298
298
|
// Reset the form
|
@@ -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.3
|
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-17 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
|