diff --git a/web/index.js b/web/index.js
index de1b791..3b7f2d4 100644
--- a/web/index.js
+++ b/web/index.js
@@ -481,13 +481,26 @@ const component_audio_player = {
return {
loop: true,
ffmpeg_config: {},
+ show_dialog: false,
}
},
props: ["file"],
template: `
-
{{ file.filename }} / {{ file.foldername }}
+
Player Status
+
+
+
+
+
+
+
`,
methods: {
+ dialog() {
+ this.show_dialog = this.show_dialog ? false : true
+ },
+ close_dialog() {
+ this.show_dialog = false
+ },
show_folder() {
this.$router.push({
path: '/search_folders',
@@ -510,6 +529,21 @@ const component_audio_player = {
},
},
computed: {
+ computed_readable_size() {
+ let filesize = this.file.filesize
+ if (filesize < 1024) {
+ return filesize
+ }
+ if (filesize < 1024 * 1024) {
+ return Math.round(filesize / 1024) + 'K'
+ }
+ if (filesize < 1024 * 1024 * 1024) {
+ return Math.round(filesize / 1024 / 1024) + 'M'
+ }
+ if (filesize < 1024 * 1024 * 1024 * 1024) {
+ return Math.round(filesize / 1024 / 1024 / 1024) + 'G'
+ }
+ },
computed_playing_audio_file_url() {
if (this.file.play_back_type === 'raw') {
return '/api/v1/get_file_direct?id=' + this.file.id