File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,6 +185,31 @@ function createSheet(
185185 return container ;
186186}
187187
188+ function showLoading ( container : HTMLElement ) {
189+ const content = container . querySelector ( ".sheet-content" ) as HTMLElement ;
190+ if ( ! content ) return ;
191+
192+ // Find and replace the explanation text with loading skeleton
193+ const explanationText = content . querySelector (
194+ ".text-sm.text-\\[var\\(--sl-color-gray-2\\)\\].p-4" ,
195+ ) as HTMLElement ;
196+ if ( ! explanationText ) return ;
197+
198+ explanationText . innerHTML = `
199+ <div class="space-y-3 animate-pulse">
200+ <div class="h-4 bg-[var(--sl-color-gray-5)] rounded w-full"></div>
201+ <div class="h-4 bg-[var(--sl-color-gray-5)] rounded w-5/6"></div>
202+ <div class="h-4 bg-[var(--sl-color-gray-5)] rounded w-4/6"></div>
203+ <div class="h-4 bg-[var(--sl-color-gray-5)] rounded w-full mt-6"></div>
204+ <div class="h-4 bg-[var(--sl-color-gray-5)] rounded w-3/4"></div>
205+ <div class="h-4 bg-[var(--sl-color-gray-5)] rounded w-5/6"></div>
206+ <div class="h-4 bg-[var(--sl-color-gray-5)] rounded w-2/3 mt-6"></div>
207+ <div class="h-4 bg-[var(--sl-color-gray-5)] rounded w-full"></div>
208+ <div class="h-4 bg-[var(--sl-color-gray-5)] rounded w-4/5"></div>
209+ </div>
210+ ` ;
211+ }
212+
188213function showError ( container : HTMLElement , errorMessage : string ) {
189214 const content = container . querySelector ( ".sheet-content" ) as HTMLElement ;
190215 if ( ! content ) return ;
You can’t perform that action at this time.
0 commit comments