Сделаны иконки даты/времени «Доступно с» в стиле генерации пароля.
devops-tools/wrapped/wrapped-build/pipeline/head This commit looks good

This commit is contained in:
Sergey Antropoff
2026-07-29 21:58:32 +03:00
parent eef8c4ec57
commit d410b3c224
4 changed files with 55 additions and 3 deletions
+19
View File
@@ -18,6 +18,8 @@
maxOpens: document.getElementById("max-opens"),
availableFromDate: document.getElementById("available-from-date"),
availableFromTime: document.getElementById("available-from-time"),
availableFromDateBtn: document.getElementById("available-from-date-btn"),
availableFromTimeBtn: document.getElementById("available-from-time-btn"),
password: document.getElementById("password"),
generatePassword: document.getElementById("generate-password"),
dropzone: document.getElementById("dropzone"),
@@ -595,6 +597,23 @@
els.password.select();
});
function openPicker(input) {
if (!input) return;
try {
if (typeof input.showPicker === "function") {
input.showPicker();
return;
}
} catch {
/* ignore */
}
input.focus();
input.click();
}
els.availableFromDateBtn?.addEventListener("click", () => openPicker(els.availableFromDate));
els.availableFromTimeBtn?.addEventListener("click", () => openPicker(els.availableFromTime));
if (window.WrappedI18n.onChange) {
window.WrappedI18n.onChange(() => {
fillTtl();
+2
View File
@@ -72,6 +72,8 @@
"create.maxOpensInvalid": "Invalid number of opens.",
"create.availableFrom": "Available from (optional)",
"create.availableFromHint": "Empty = available immediately",
"create.availableFromDate": "Pick date",
"create.availableFromTime": "Pick time",
"create.availableFromPast": "Available-from must not be in the past.",
"create.availableFromAfterExpiry": "Available-from must be before expiry.",
"create.opensBadge": "{n} opens",