(folder)
| 122 | } |
| 123 | |
| 124 | export function openFolderShareModal(folder) { |
| 125 | // Remove any existing modal |
| 126 | const existing = document.getElementById("folderShareModal"); |
| 127 | if (existing) existing.remove(); |
| 128 | |
| 129 | // Build modal |
| 130 | const modal = document.createElement("div"); |
| 131 | modal.id = "folderShareModal"; |
| 132 | modal.classList.add("modal"); |
| 133 | modal.innerHTML = ` |
| 134 | <div class="modal-content share-modal-content"> |
| 135 | <div class="modal-header"> |
| 136 | <h3>${t("share_folder_and_request")}: ${escapeHTML(folder)}</h3> |
| 137 | <span id="closeFolderShareModal" title="${t("close")}" class="close-image-modal">×</span> |
| 138 | </div> |
| 139 | <div class="modal-body share-modal-body"> |
| 140 | <p class="share-modal-helper">${t("share_folder_and_request_helper")}</p> |
| 141 | |
| 142 | <div class="share-modal-section"> |
| 143 | <p class="share-section-title">${t("share_mode_heading")}</p> |
| 144 | <div class="share-mode-toggle" role="group" aria-label="${t("share_mode_heading")}"> |
| 145 | <button type="button" id="folderShareBrowseModeBtn" class="share-mode-btn is-active"> |
| 146 | <span class="share-mode-btn-title">${t("share_mode_browse_label")}</span> |
| 147 | <span class="share-mode-btn-desc">${t("share_mode_browse_desc")}</span> |
| 148 | </button> |
| 149 | <button type="button" id="folderShareRequestModeBtn" class="share-mode-btn"> |
| 150 | <span class="share-mode-btn-title">${t("share_mode_request_label")}</span> |
| 151 | <span class="share-mode-btn-desc">${t("share_mode_request_desc")}</span> |
| 152 | </button> |
| 153 | </div> |
| 154 | <p id="folderShareModeNotice" class="share-mode-notice"></p> |
| 155 | <input type="checkbox" id="folderShareDropMode" hidden /> |
| 156 | </div> |
| 157 | |
| 158 | <div class="share-modal-section"> |
| 159 | <p class="share-section-title">${t("share_link_settings")}</p> |
| 160 | <label class="share-field-label" for="folderShareExpiration">${t("set_expiration")}</label> |
| 161 | <select id="folderShareExpiration" class="share-field-input"> |
| 162 | <option value="30">30 ${t("minutes")}</option> |
| 163 | <option value="60" selected>60 ${t("minutes")}</option> |
| 164 | <option value="120">120 ${t("minutes")}</option> |
| 165 | <option value="180">180 ${t("minutes")}</option> |
| 166 | <option value="240">240 ${t("minutes")}</option> |
| 167 | <option value="1440">1 ${t("day")}</option> |
| 168 | <option value="custom">${t("custom")}…</option> |
| 169 | </select> |
| 170 | |
| 171 | <div id="customFolderExpirationContainer" class="share-custom-expiration" style="display:none;"> |
| 172 | <label for="customFolderExpirationValue">${t("duration")}:</label> |
| 173 | <input type="number" id="customFolderExpirationValue" min="1" value="1" /> |
| 174 | <select id="customFolderExpirationUnit"> |
| 175 | <option value="seconds">${t("seconds")}</option> |
| 176 | <option value="minutes" selected>${t("minutes")}</option> |
| 177 | <option value="hours">${t("hours")}</option> |
| 178 | <option value="days">${t("days")}</option> |
| 179 | </select> |
| 180 | <p class="share-warning"> |
| 181 | ${t("custom_duration_warning")} |
no test coverage detected