[web] Optionally Show FilePath on Now playing-Page

This commit is contained in:
lordmyschkin
2023-02-05 12:49:16 +01:00
committed by ejurgensen
parent c645d570ea
commit a4ae747b15
10 changed files with 86 additions and 40 deletions

View File

@@ -49,6 +49,11 @@
v-text="composer"
/>
<h3 class="subtitle is-6" v-text="now_playing.album" />
<h3
v-if="filepath"
class="subtitle is-6 has-text-grey "
v-text="filepath"
/>
</div>
</div>
</div>
@@ -131,9 +136,21 @@ export default {
}
}
return null
}
},
settings_option_show_filepath_now_playing() {
return this.$store.getters.settings_option_show_filepath_now_playing
},
filepath() {
if (this.settings_option_show_filepath_now_playing) {
return this.now_playing.path
}
return null
}
},
watch: {
state() {
if (this.interval_id > 0) {

View File

@@ -144,6 +144,14 @@
/>
</template>
</settings-textfield>
<settings-checkbox
category_name="webinterface"
option_name="show_filepath_now_playing"
>
<template #label>
<span v-text="$t('page.settings.general.show-path')" />
</template>
</settings-checkbox>
</template>
</content-with-heading>
<content-with-heading>
@@ -192,6 +200,11 @@ export default {
settings_option_show_composer_now_playing() {
return this.$store.getters.settings_option_show_composer_now_playing
},
settings_option_show_filepath_now_playing() {
return this.$store.getters.settings_option_show_filepath_now_playing
},
locale: {
get() {
let languages = this.$i18n.availableLocales