@raketa-cloud/admin 1.7.9 → 1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raketa-cloud/admin",
3
- "version": "1.7.9",
3
+ "version": "1.8.0",
4
4
  "main": "src/index.js",
5
5
  "files": [
6
6
  "src/",
@@ -1,31 +1,34 @@
1
- <div class="mb-4">
2
- <label for="" class="font-semibold hover:cursor-pointer body-3">Translations</label>
3
- <div class="checkbox-group mb-4">
4
- <% translations.filter(item => item.code !== _context.locale).forEach((item,idx)=> { %>
5
- <div class="flex items-center gap-1">
6
- <% if (utils.includedInCollection(item.code, _context.query["f:translations"])) { %>
7
- <input type="checkbox" name="f:translations" id='locale-<%= item.code %>' checked value="<%= item.code %>" class="hover:cursor-pointer">
8
- <% } else { %>
9
- <input type="checkbox" name="f:translations" id='locale-<%= item.code %>' value="<%= item.code %>" class="hover:cursor-pointer">
10
- <% } %>
11
- <label for='locale-<%= item.code %>' class="body-2 hover:cursor-pointer"><%= item.name %></label>
1
+ <% if (translations.length > 0) { %>
2
+
3
+ <div class="mb-4">
4
+ <label for="" class="font-semibold hover:cursor-pointer body-3">Translations</label>
5
+ <div class="checkbox-group mb-4">
6
+ <% translations.filter(item => item.code !== _context.locale).forEach((item,idx)=> { %>
7
+ <div class="flex items-center gap-1">
8
+ <% if (utils.includedInCollection(item.code, _context.query["f:translations"])) { %>
9
+ <input type="checkbox" name="f:translations" id='locale-<%= item.code %>' checked value="<%= item.code %>" class="hover:cursor-pointer">
10
+ <% } else { %>
11
+ <input type="checkbox" name="f:translations" id='locale-<%= item.code %>' value="<%= item.code %>" class="hover:cursor-pointer">
12
+ <% } %>
13
+ <label for='locale-<%= item.code %>' class="body-2 hover:cursor-pointer"><%= item.name %></label>
14
+ </div>
15
+ <% }); %>
12
16
  </div>
13
- <% }); %>
14
17
  </div>
15
- </div>
16
18
 
17
- <div class="mb-4">
18
- <label for="" class="font-semibold hover:cursor-pointer body-3">Without translations</label>
19
- <div class="checkbox-group mb-4">
20
- <% translations.filter(item => item.code !== _context.locale).forEach((item,idx)=> { %>
21
- <div class="flex items-center gap-1">
22
- <% if (utils.includedInCollection(item.code, _context.query["f:without_translations"])) { %>
23
- <input type="checkbox" name="f:without_translations" id='n-locale-<%= item.code %>' checked value="<%= item.code %>" class="hover:cursor-pointer">
24
- <% } else { %>
25
- <input type="checkbox" name="f:without_translations" id='n-locale-<%= item.code %>' value="<%= item.code %>" class="hover:cursor-pointer">
26
- <% } %>
27
- <label for='n-locale-<%= item.code %>' class="body-2 hover:cursor-pointer"><%= item.name %></label>
19
+ <div class="mb-4">
20
+ <label for="" class="font-semibold hover:cursor-pointer body-3">Without translations</label>
21
+ <div class="checkbox-group mb-4">
22
+ <% translations.filter(item => item.code !== _context.locale).forEach((item,idx)=> { %>
23
+ <div class="flex items-center gap-1">
24
+ <% if (utils.includedInCollection(item.code, _context.query["f:without_translations"])) { %>
25
+ <input type="checkbox" name="f:without_translations" id='n-locale-<%= item.code %>' checked value="<%= item.code %>" class="hover:cursor-pointer">
26
+ <% } else { %>
27
+ <input type="checkbox" name="f:without_translations" id='n-locale-<%= item.code %>' value="<%= item.code %>" class="hover:cursor-pointer">
28
+ <% } %>
29
+ <label for='n-locale-<%= item.code %>' class="body-2 hover:cursor-pointer"><%= item.name %></label>
30
+ </div>
31
+ <% }); %>
28
32
  </div>
29
- <% }); %>
30
33
  </div>
31
- </div>
34
+ <% } %>
@@ -153,12 +153,12 @@
153
153
 
154
154
  <div class="mb-4">
155
155
  <label for="last_updated_from" class="font-semibold hover:cursor-pointer body-3">Last Updated from</label>
156
- <input type="datetime-local" name="f:last_updated_from" value="<%= _context.query["f:last_updated_from"] %>" data-no-hints="true" />
156
+ <input type="datetime-local" name="f:last_updated_from" value="<%= _context.query["f:last_updated_from"] %>" />
157
157
  </div>
158
158
 
159
159
  <div class="mb-4">
160
160
  <label for="last_updated_to" class="font-semibold hover:cursor-pointer body-3">Last Updated to</label>
161
- <input type="datetime-local" name="f:last_updated_to" value="<%= _context.query["f:last_updated_to"] %>" data-no-hints="true" />
161
+ <input type="datetime-local" name="f:last_updated_to" value="<%= _context.query["f:last_updated_to"] %>" />
162
162
  </div>
163
163
 
164
164
  <%- include('./../_shared/_translations_search_input.ejs') %>
@@ -182,11 +182,16 @@
182
182
  const hint = document.createElement("div");
183
183
 
184
184
  hint.classList.add('hint')
185
- hint.innerText = `In your local time: ${strTime}`;
185
+ hint.innerText = `Your local time: ${strTime}`;
186
186
  hint.dataset.auto = "1";
187
187
 
188
188
  parent.appendChild(hint)
189
189
 
190
+ if (!input.value) {
191
+ hint.innerHTML = '';
192
+ return;
193
+ }
194
+
190
195
  TIMEZONES.forEach(timeZone => {
191
196
  const strTime = fakeUTCDate.toLocaleString(TIME_LOCALE, {
192
197
  timeZone: `${timeZone.value}`