mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 08:53:48 +01:00
Apply suggestions from code review
Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
This commit is contained in:
parent
106800f0c5
commit
787047094c
@ -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…
Reference in New Issue
Block a user