Display the list of uploaded disk images
This commit is contained in:
		
							
								
								
									
										13
									
								
								virtweb_frontend/src/widgets/DateWidget.tsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								virtweb_frontend/src/widgets/DateWidget.tsx
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
export function DateWidget(p: { time: number }): React.ReactElement {
 | 
			
		||||
  const date = new Date(p.time * 1000);
 | 
			
		||||
 | 
			
		||||
  return (
 | 
			
		||||
    <>
 | 
			
		||||
      {pad(date.getDate())}/{pad(date.getMonth() + 1)}/{date.getFullYear()}
 | 
			
		||||
    </>
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function pad(num: number): string {
 | 
			
		||||
  return num.toString().padStart(2, "0");
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user