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