mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	ts: Pull in static assets via import.
This commit is contained in:
		
				
					committed by
					
						
						Alex Vandiver
					
				
			
			
				
	
			
			
			
						parent
						
							ea2a0a7632
						
					
				
				
					commit
					e0a7658db7
				
			
							
								
								
									
										4
									
								
								static/js/assets.d.ts
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								static/js/assets.d.ts
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
declare module "*.svg" {
 | 
			
		||||
    const url: string;
 | 
			
		||||
    export default url;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,5 +1,7 @@
 | 
			
		||||
import $ from "jquery";
 | 
			
		||||
 | 
			
		||||
import loading_black_image from "../images/loading/loader-black.svg";
 | 
			
		||||
import loading_white_image from "../images/loading/loader-white.svg";
 | 
			
		||||
import render_loader from "../templates/loader.hbs";
 | 
			
		||||
 | 
			
		||||
export function make_indicator(
 | 
			
		||||
@@ -84,9 +86,9 @@ export function destroy_indicator($container: JQuery): void {
 | 
			
		||||
 | 
			
		||||
export function show_button_spinner($elt: JQuery, using_dark_theme: boolean): void {
 | 
			
		||||
    if (!using_dark_theme) {
 | 
			
		||||
        $elt.attr("src", "/static/images/loading/loader-black.svg");
 | 
			
		||||
        $elt.attr("src", loading_black_image);
 | 
			
		||||
    } else {
 | 
			
		||||
        $elt.attr("src", "/static/images/loading/loader-white.svg");
 | 
			
		||||
        $elt.attr("src", loading_white_image);
 | 
			
		||||
    }
 | 
			
		||||
    $elt.css("display", "inline-block");
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -52,6 +52,7 @@ EXEMPT_FILES = make_set(
 | 
			
		||||
        "static/js/alert_popup.ts",
 | 
			
		||||
        "static/js/alert_words_ui.js",
 | 
			
		||||
        "static/js/archive.js",
 | 
			
		||||
        "static/js/assets.d.ts",
 | 
			
		||||
        "static/js/attachments_ui.js",
 | 
			
		||||
        "static/js/avatar.js",
 | 
			
		||||
        "static/js/billing/event_status.js",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user