Apply suggestions from code review
Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
This commit is contained in:
		
							parent
							
								
									a61da5e486
								
							
						
					
					
						commit
						87b38c651f
					
				
					 3 changed files with 5 additions and 6 deletions
				
			
		|  | @ -109,6 +109,5 @@ | |||
| 		"eslint-plugin-import": "2.26.0", | ||||
| 		"eslint-plugin-vue": "9.2.0", | ||||
| 		"start-server-and-test": "1.14.0" | ||||
| 	}, | ||||
| 	"packageManager": "yarn@3.2.1" | ||||
| 	} | ||||
| } | ||||
|  |  | |||
|  | @ -7,7 +7,6 @@ | |||
| 	</div> | ||||
| 	<div v-else-if="media.type.startsWith('audio') && media.type !== 'audio/midi'" class="audio"> | ||||
| 		<audio | ||||
| 			id="player" | ||||
| 			ref="audioEl" | ||||
| 			class="audio vlite-js" | ||||
| 			:src="media.url" | ||||
|  | @ -49,7 +48,7 @@ function volumechange() { | |||
| onMounted(() => { | ||||
| 	if (audioEl) { | ||||
| 		audioEl.volume = ColdDeviceStorage.get('mediaVolume'); | ||||
| 		new Vlitejs('#player'); | ||||
| 		new Vlitejs(audioEl); | ||||
| 	} | ||||
| }); | ||||
| </script> | ||||
|  |  | |||
|  | @ -7,7 +7,6 @@ | |||
| </div> | ||||
| <div v-else class="kkjnbbplepmiyuadieoenjgutgcmtsvu"> | ||||
| 	<video | ||||
| 		id="player" | ||||
| 		ref="videoEl" | ||||
| 		:poster="video.thumbnailUrl" | ||||
| 		:title="video.comment" | ||||
|  | @ -34,8 +33,10 @@ const props = defineProps<{ | |||
| 	video: misskey.entities.DriveFile; | ||||
| }>(); | ||||
| 
 | ||||
| const videoEl = $ref(null); | ||||
| 
 | ||||
| onMounted(() => { | ||||
| 	new Vlitejs('#player'); | ||||
| 	new Vlitejs(videoEl); | ||||
| }); | ||||
| 
 | ||||
| const hide = ref((defaultStore.state.nsfw === 'force') ? true : props.video.isSensitive && (defaultStore.state.nsfw !== 'ignore')); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue