Release Nouri 1.3.3 with shopping articles
This commit is contained in:
@@ -1491,6 +1491,31 @@ h3 {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.shopping-create-actions {
|
||||
grid-column: 1 / -1;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
padding: 0.65rem;
|
||||
border-radius: 18px;
|
||||
background: color-mix(in srgb, var(--surface-soft) 76%, transparent 24%);
|
||||
border: 1px solid color-mix(in srgb, var(--line) 78%, transparent 22%);
|
||||
}
|
||||
|
||||
.shopping-create-actions[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.shopping-create-actions p {
|
||||
flex: 1 1 16rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.shopping-create-actions button {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.shopping-add-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
|
||||
@@ -1746,6 +1771,11 @@ h3 {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.shopping-create-actions {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.shopping-entry-row {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto auto;
|
||||
|
||||
@@ -219,6 +219,25 @@
|
||||
});
|
||||
};
|
||||
|
||||
const initCreateFromSearch = () => {
|
||||
document.querySelectorAll("[data-create-from]").forEach((container) => {
|
||||
const inputSelector = container.getAttribute("data-create-from");
|
||||
if (!inputSelector) return;
|
||||
const input = document.querySelector(inputSelector);
|
||||
const hiddenName = container.querySelector("[data-create-name]");
|
||||
if (!(input instanceof HTMLInputElement) || !(hiddenName instanceof HTMLInputElement)) return;
|
||||
|
||||
const sync = () => {
|
||||
const value = input.value.trim().replace(/\s+/g, " ");
|
||||
hiddenName.value = value;
|
||||
container.hidden = value.length === 0;
|
||||
};
|
||||
|
||||
input.addEventListener("input", sync);
|
||||
sync();
|
||||
});
|
||||
};
|
||||
|
||||
const initIosPullToRefresh = () => {
|
||||
const isAppleTouchDevice = /iP(ad|hone|od)/.test(navigator.userAgent)
|
||||
|| (navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1);
|
||||
@@ -323,6 +342,7 @@
|
||||
initMobileSheet();
|
||||
initFilterInputs();
|
||||
initSelectedPreviews();
|
||||
initCreateFromSearch();
|
||||
initIosPullToRefresh();
|
||||
initDialogs();
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const CACHE_NAME = "nouri-v1-3-2";
|
||||
const CACHE_NAME = "nouri-v1-3-3";
|
||||
const OFFLINE_URL = "/static/pwa/offline.html";
|
||||
const STATIC_ASSETS = [
|
||||
"/static/css/styles.css",
|
||||
|
||||
Reference in New Issue
Block a user