Сделаны иконки даты/времени «Доступно с» в стиле генерации пароля.
devops-tools/wrapped/wrapped-build/pipeline/head This commit looks good
devops-tools/wrapped/wrapped-build/pipeline/head This commit looks good
This commit is contained in:
+18
-1
@@ -300,8 +300,25 @@ html[data-theme="dark"] .icon-btn:hover {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 0.45rem;
|
||||
}
|
||||
.datetime-split input {
|
||||
.datetime-split .input-with-action > input[type="date"],
|
||||
.datetime-split .input-with-action > input[type="time"] {
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
padding-right: 2.75rem;
|
||||
color-scheme: dark;
|
||||
}
|
||||
html[data-theme="light"] .datetime-split .input-with-action > input[type="date"],
|
||||
html[data-theme="light"] .datetime-split .input-with-action > input[type="time"] {
|
||||
color-scheme: light;
|
||||
}
|
||||
.datetime-split .input-with-action > input[type="date"]::-webkit-calendar-picker-indicator,
|
||||
.datetime-split .input-with-action > input[type="time"]::-webkit-calendar-picker-indicator {
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
width: 2.5rem;
|
||||
height: 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
.field-label {
|
||||
display: block;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user