appscms-tools-theme 3.6.7 → 3.6.9

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.
data/assets/js/batch.js CHANGED
@@ -94,7 +94,6 @@ const onSubmit = (files) => {
94
94
  document.querySelector('#download-zip').style.display = 'block'
95
95
  let zip = new JSZip()
96
96
  let zipFiles = zip.folder(`safeimagekit-batch-images`)
97
-
98
97
  blobList.map((item) => {
99
98
  zipFiles.file(
100
99
  `safeimagekit-batch-${item.fileName.name.split('.')[0]}.${zipFileType ? zipFileType : 'png'
@@ -1,5 +1,3 @@
1
- ---
2
- ---
3
1
  // Generate a unique ID for the user (if not already generated)
4
2
  const generateUserID = () => {
5
3
  // Check if the user ID is already stored in cookies or local storage
@@ -10,8 +8,9 @@ const generateUserID = () => {
10
8
  }
11
9
 
12
10
  // Example: Generating a random string
13
- const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
14
- let id = '';
11
+ const characters =
12
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
13
+ let id = "";
15
14
  for (let i = 0; i < 10; i++) {
16
15
  id += characters.charAt(Math.floor(Math.random() * characters.length));
17
16
  }
@@ -24,26 +23,24 @@ const generateUserID = () => {
24
23
 
25
24
  // Get the stored user ID from cookies or local storage
26
25
  const getStoredUserID = () => {
27
- return localStorage.getItem('userID');
26
+ return localStorage.getItem("userID");
28
27
  };
29
28
 
30
29
  // Store the user ID in cookies or local storage
31
30
  const storeUserID = (userID) => {
32
- localStorage.setItem('userID', userID);
31
+ localStorage.setItem("userID", userID);
33
32
  };
34
33
 
35
34
  // Get the current date in YYYY-MM-DD format
36
35
  const getCurrentDate = () => {
37
36
  const today = new Date();
38
37
  const year = today.getFullYear();
39
- const month = String(today.getMonth() + 1).padStart(2, '0');
40
- const day = String(today.getDate()).padStart(2, '0');
38
+ const month = String(today.getMonth() + 1).padStart(2, "0");
39
+ const day = String(today.getDate()).padStart(2, "0");
41
40
  return `${year}-${month}-${day}`;
42
41
  };
43
42
 
44
-
45
-
46
- let userTrackingCountLimit='{{site.userTrackingCount}}';
43
+ let userTrackingCountLimit = "20";
47
44
  const checkUsage = () => {
48
45
  const today = new Date().toDateString();
49
46
  const usageCount = getCookie("featureUsageCount");
@@ -61,17 +58,27 @@ const checkUsage = () => {
61
58
  }
62
59
  const userID = generateUserID();
63
60
  try {
64
-
65
- gtag('event', 'feature_used', {
61
+ if ((usageCount + 1) % 5 === 0) {
62
+ gtag("event", `feature_used_${usageCount + 1}_times`, {
66
63
  user_id: userID,
67
64
  userID: userID,
68
- feature: window.location.pathname + location.search
65
+ feature: window.location.pathname + location.search,
69
66
  });
67
+ }
70
68
  } catch (error) {
71
- console.log(error)
69
+ console.log(error);
72
70
  }
73
-
74
- }
71
+
72
+ try {
73
+ gtag("event", "feature_used", {
74
+ user_id: userID,
75
+ userID: userID,
76
+ feature: window.location.pathname + location.search,
77
+ });
78
+ } catch (error) {
79
+ console.log(error);
80
+ }
81
+ };
75
82
  const incrementUsageCount = (count) => {
76
83
  const today = new Date().toDateString();
77
84
 
@@ -90,18 +97,18 @@ const showShareModal = () => {
90
97
  const handleShare = () => {
91
98
  const usageCount = getCookie("featureUsageCount");
92
99
  if (usageCount) {
93
- setCookie("featureUsageCount", 0 , getExpirationDate());
100
+ setCookie("featureUsageCount", 0, getExpirationDate());
94
101
  }
95
102
  document.getElementById("shareModal").style.display = "none";
96
103
  try {
97
104
  const userID = generateUserID();
98
- gtag('event', 'feature_shared', {
99
- user_id: userID,
100
- userID: userID,
101
- feature: window.location.pathname + location.search
102
- });
105
+ gtag("event", "feature_shared", {
106
+ user_id: userID,
107
+ userID: userID,
108
+ feature: window.location.pathname + location.search,
109
+ });
103
110
  } catch (error) {
104
- console.log(error)
111
+ console.log(error);
105
112
  }
106
113
  };
107
114
 
@@ -125,13 +132,12 @@ const getExpirationDate = () => {
125
132
  date.setTime(date.getTime() + 24 * 60 * 60 * 1000); // 24 hours in milliseconds
126
133
  return date.toUTCString();
127
134
  };
128
- const socialShare=document.querySelectorAll('.social-share')
135
+ const socialShare = document.querySelectorAll(".social-share");
129
136
 
130
137
  if (socialShare) {
131
- Array.from(socialShare).map(item=>{
132
- item.addEventListener('click',()=>{
133
- handleShare()
134
- })
135
- })
136
-
137
- }
138
+ Array.from(socialShare).map((item) => {
139
+ item.addEventListener("click", () => {
140
+ handleShare();
141
+ });
142
+ });
143
+ }
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: 3.6.7
4
+ version: 3.6.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - vivek-appscms
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-14 00:00:00.000000000 Z
11
+ date: 2023-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -319,11 +319,18 @@ files:
319
319
  - assets/homeimages/3_shop_posters-main.png
320
320
  - assets/idea.svg
321
321
  - assets/images/.DS_Store
322
+ - assets/images/1.png
323
+ - assets/images/1.webp
324
+ - assets/images/2.png
325
+ - assets/images/2.webp
326
+ - assets/images/3.png
327
+ - assets/images/3.webp
322
328
  - assets/images/3_shop_posters.png
323
329
  - assets/images/Ankita.webp
324
330
  - assets/images/Anushka.webp
325
331
  - assets/images/Arjyahi.webp
326
332
  - assets/images/Nikita.webp
333
+ - 'assets/images/Resolve Conflicts · Pull Request #128 · Appscms-com_number-magic.html'
327
334
  - assets/images/abp.svg
328
335
  - assets/images/adblock.svg
329
336
  - assets/images/add-image.png
@@ -470,7 +477,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
470
477
  - !ruby/object:Gem::Version
471
478
  version: '0'
472
479
  requirements: []
473
- rubygems_version: 3.4.10
480
+ rubygems_version: 3.3.7
474
481
  signing_key:
475
482
  specification_version: 4
476
483
  summary: Appscms theme for all tools