MCPcopy Create free account
hub / github.com/error311/FileRise / buildGalleryControls

Function buildGalleryControls

public/js/fileListView.js:5800–5834  ·  view source on GitHub ↗
(host)

Source from the content-addressed store, hash-verified

5798}
5799
5800function buildGalleryControls(host) {
5801 const wrap = document.createElement("div");
5802 wrap.className = "vo-control";
5803
5804 const label = document.createElement("div");
5805 label.className = "vo-label";
5806 label.textContent = t("columns") || "Columns";
5807
5808 const sliderRow = document.createElement("div");
5809 sliderRow.className = "vo-slider-row";
5810
5811 const slider = document.createElement("input");
5812 slider.type = "range";
5813 slider.min = "1";
5814 slider.max = String(getGalleryMaxColumns());
5815 slider.value = clampGalleryColumns(localStorage.getItem("galleryColumns") || window.galleryColumns || 3);
5816 slider.id = "galleryColumnsSlider";
5817
5818 const value = document.createElement("span");
5819 value.id = "galleryColumnsValue";
5820 value.className = "vo-value";
5821 value.textContent = slider.value;
5822
5823 slider.addEventListener("input", () => {
5824 const cols = applyGalleryColumns(slider.value);
5825 value.textContent = cols;
5826 });
5827
5828 sliderRow.appendChild(slider);
5829 sliderRow.appendChild(value);
5830
5831 wrap.appendChild(label);
5832 wrap.appendChild(sliderRow);
5833 host.appendChild(wrap);
5834}
5835
5836function currentZoomPercent() {
5837 try {

Callers 1

showViewOptionsPopoverFunction · 0.85

Calls 4

tFunction · 0.85
getGalleryMaxColumnsFunction · 0.85
clampGalleryColumnsFunction · 0.85
applyGalleryColumnsFunction · 0.85

Tested by

no test coverage detected