mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2024-08-14 23:57:27 +00:00 
			
		
		
		
	Add better upload date formatting.
This commit is contained in:
		
							parent
							
								
									e8f8930932
								
							
						
					
					
						commit
						41ac97ed92
					
				
					 1 changed files with 12 additions and 2 deletions
				
			
		| 
						 | 
					@ -27,7 +27,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <div class="uk-flex uk-flex-middle">
 | 
					            <div class="uk-flex uk-flex-middle">
 | 
				
			||||||
                <div class="uk-margin-small-right">{{ addCommas(video.views) }} views</div>
 | 
					                <div class="uk-margin-small-right">{{ addCommas(video.views) }} views</div>
 | 
				
			||||||
                <div class="uk-margin-small-right">{{ video.uploadDate }}</div>
 | 
					                <div class="uk-margin-small-right">{{ uploadDate }}</div>
 | 
				
			||||||
                <div class="uk-flex-1"></div>
 | 
					                <div class="uk-flex-1"></div>
 | 
				
			||||||
                <div class="uk-margin-small-left">
 | 
					                <div class="uk-margin-small-left">
 | 
				
			||||||
                    <font-awesome-icon class="uk-margin-small-right" icon="thumbs-up"></font-awesome-icon>
 | 
					                    <font-awesome-icon class="uk-margin-small-right" icon="thumbs-up"></font-awesome-icon>
 | 
				
			||||||
| 
						 | 
					@ -318,14 +318,24 @@ export default {
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    computed: {
 | 
					    computed: {
 | 
				
			||||||
 | 
					        isListening(_this) {
 | 
				
			||||||
 | 
					            return _this.getPreferenceBoolean("listen", false);
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        toggleListenUrl(_this) {
 | 
					        toggleListenUrl(_this) {
 | 
				
			||||||
            const url = new URL(window.location.href);
 | 
					            const url = new URL(window.location.href);
 | 
				
			||||||
            url.searchParams.set("listen", _this.getPreferenceBoolean("listen", false) ? "0" : "1");
 | 
					            url.searchParams.set("listen", _this.isListening ? "0" : "1");
 | 
				
			||||||
            return url.href;
 | 
					            return url.href;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        isEmbed(_this) {
 | 
					        isEmbed(_this) {
 | 
				
			||||||
            return String(_this.$route.path).indexOf("/embed/") == 0;
 | 
					            return String(_this.$route.path).indexOf("/embed/") == 0;
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					        uploadDate(_this) {
 | 
				
			||||||
 | 
					            return new Date(_this.video.uploadDate).toLocaleString(undefined, {
 | 
				
			||||||
 | 
					                month: "short",
 | 
				
			||||||
 | 
					                day: "numeric",
 | 
				
			||||||
 | 
					                year: "numeric",
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    components: {
 | 
					    components: {
 | 
				
			||||||
        Player,
 | 
					        Player,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue