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

Function showEditorLoading

public/js/fileEditor.js:142–176  ·  view source on GitHub ↗
(fileName, seq)

Source from the content-addressed store, hash-verified

140}
141
142function showEditorLoading(fileName, seq) {
143 if (!editorLoadingEl) {
144 const el = document.createElement('div');
145 el.id = 'editorLoadingIndicator';
146 Object.assign(el.style, {
147 position: 'fixed',
148 right: '16px',
149 bottom: '16px',
150 zIndex: '9999',
151 padding: '8px 12px',
152 borderRadius: '999px',
153 display: 'flex',
154 alignItems: 'center',
155 gap: '8px',
156 fontSize: '13px',
157 color: 'inherit',
158 background: 'rgba(0,0,0,0.08)',
159 backdropFilter: 'blur(2px)',
160 pointerEvents: 'none',
161 boxShadow: '0 1px 6px rgba(0,0,0,0.15)'
162 });
163 el.innerHTML = `
164 <span class="material-icons spinning" style="font-size:16px;">autorenew</span>
165 <span class="editor-loading-text"></span>
166 `;
167 document.body.appendChild(el);
168 editorLoadingEl = el;
169 }
170 editorLoadingEl.dataset.seq = String(seq);
171 const label = t('loading') || 'Loading...';
172 const text = fileName ? `${label} ${fileName}` : label;
173 const textEl = editorLoadingEl.querySelector('.editor-loading-text');
174 if (textEl) textEl.textContent = text;
175 editorLoadingEl.style.display = 'flex';
176}
177
178function hideEditorLoading(seq) {
179 if (!editorLoadingEl) return;

Callers 1

editFileFunction · 0.85

Calls 1

tFunction · 0.85

Tested by

no test coverage detected