mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-07 21:03:00 -05:00
[settings] add webinterface.recently_added_limit
This commit is contained in:
@@ -80,6 +80,18 @@
|
||||
</settings-textfield>
|
||||
</template>
|
||||
</content-with-heading>
|
||||
|
||||
<content-with-heading>
|
||||
<template slot="heading-left">
|
||||
<div class="title is-4">Recently Added</div>
|
||||
</template>
|
||||
|
||||
<template slot="content">
|
||||
<settings-intfield category_name="webinterface" option_name="recently_added_limit">
|
||||
<template slot="label"> Limit on number of albums to show on 'Recently Added' page</template>
|
||||
</settings-intfield>
|
||||
</template>
|
||||
</content-with-heading>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -88,10 +100,11 @@ import ContentWithHeading from '@/templates/ContentWithHeading'
|
||||
import TabsSettings from '@/components/TabsSettings'
|
||||
import SettingsCheckbox from '@/components/SettingsCheckbox'
|
||||
import SettingsTextfield from '@/components/SettingsTextfield'
|
||||
import SettingsIntfield from '@/components/SettingsIntfield'
|
||||
|
||||
export default {
|
||||
name: 'SettingsPageWebinterface',
|
||||
components: { ContentWithHeading, TabsSettings, SettingsCheckbox, SettingsTextfield },
|
||||
components: { ContentWithHeading, TabsSettings, SettingsCheckbox, SettingsTextfield, SettingsIntfield },
|
||||
|
||||
computed: {
|
||||
settings_option_show_composer_now_playing () {
|
||||
|
||||
@@ -77,6 +77,16 @@ export default new Vuex.Store({
|
||||
return null
|
||||
},
|
||||
|
||||
settings_option_recently_added_limit: (state, getters) => {
|
||||
if (getters.settings_webinterface) {
|
||||
const option = getters.settings_webinterface.options.find(elem => elem.name === 'recently_added_limit')
|
||||
if (option) {
|
||||
return option.value
|
||||
}
|
||||
}
|
||||
return 100
|
||||
},
|
||||
|
||||
settings_option_show_composer_now_playing: (state, getters) => {
|
||||
if (getters.settings_webinterface) {
|
||||
const option = getters.settings_webinterface.options.find(elem => elem.name === 'show_composer_now_playing')
|
||||
|
||||
Reference in New Issue
Block a user