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

Function renderRules

public/js/sharedDropView.js:227–257  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

225 }
226
227 function renderRules() {
228 if (!rulesEl) return;
229 rulesEl.textContent = '';
230
231 const parts = [];
232 if (maxFileSizeMb > 0) {
233 parts.push(tx('share_drop_rule_max_file_size', { mb: maxFileSizeMb }, 'Max file size: ' + maxFileSizeMb + ' MB'));
234 }
235 if (allowedTypes.length) {
236 const joined = allowedTypes.join(', ');
237 parts.push(tx('share_drop_rule_allowed_types', { types: joined }, 'Allowed types: ' + joined));
238 }
239 if (dailyFileLimit > 0) {
240 parts.push(tx('share_drop_rule_daily_file_limit', { count: dailyFileLimit }, 'Daily file limit: ' + dailyFileLimit));
241 }
242 if (maxTotalMbPerDay > 0) {
243 parts.push(tx('share_drop_rule_daily_size_limit', { mb: maxTotalMbPerDay }, 'Daily size limit: ' + maxTotalMbPerDay + ' MB'));
244 }
245 if (preserveFolderStructure) {
246 parts.push(tx('share_drop_rule_preserve_structure', null, 'Folder structure is preserved when available.'));
247 }
248
249 if (!parts.length) return;
250
251 parts.forEach((msg) => {
252 const tag = document.createElement('span');
253 tag.className = 'fr-share-rule-pill';
254 tag.textContent = msg;
255 rulesEl.appendChild(tag);
256 });
257 }
258
259 function getExt(name) {
260 const idx = name.lastIndexOf('.');

Callers 1

sharedDropView.jsFile · 0.85

Calls 1

txFunction · 0.70

Tested by

no test coverage detected