mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-07 21:03:00 -05:00
[web] Fix camel case for some elements
This commit is contained in:
@@ -31,7 +31,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
old_volume: 0
|
||||
volume: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -42,7 +42,7 @@ export default {
|
||||
watch: {
|
||||
'player.volume'() {
|
||||
if (this.player.volume > 0) {
|
||||
this.old_volume = this.player.volume
|
||||
this.volume = this.player.volume
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -51,7 +51,7 @@ export default {
|
||||
webapi.player_volume(this.player.volume)
|
||||
},
|
||||
toggle() {
|
||||
this.player.volume = this.player.volume > 0 ? 0 : this.old_volume
|
||||
this.player.volume = this.player.volume > 0 ? 0 : this.volume
|
||||
this.changeVolume()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ export default {
|
||||
return this.timerId >= 0
|
||||
},
|
||||
setting() {
|
||||
return this.settingsStore.setting(this.category, this.name)
|
||||
return this.settingsStore.get(this.category, this.name)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -52,7 +52,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
image(item) {
|
||||
if (this.settingsStore.show_cover_artwork_in_album_lists) {
|
||||
if (this.settingsStore.showCoverArtworkInAlbumLists) {
|
||||
return { url: item.item.artwork_url, caption: item.item.name }
|
||||
}
|
||||
return null
|
||||
|
||||
@@ -43,7 +43,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
image(item) {
|
||||
if (this.settingsStore.show_cover_artwork_in_album_lists) {
|
||||
if (this.settingsStore.showCoverArtworkInAlbumLists) {
|
||||
return { url: item.images?.[0]?.url ?? '', caption: item.name }
|
||||
}
|
||||
return null
|
||||
|
||||
@@ -81,13 +81,13 @@ export default {
|
||||
icon: 'music-box-multiple',
|
||||
key: 'navigation.playlists',
|
||||
name: 'playlists',
|
||||
show: this.settingsStore.show_menu_item_playlists
|
||||
show: this.settingsStore.showMenuItemPlaylists
|
||||
},
|
||||
{
|
||||
icon: 'music',
|
||||
key: 'navigation.music',
|
||||
name: 'music',
|
||||
show: this.settingsStore.show_menu_item_music
|
||||
show: this.settingsStore.showMenuItemMusic
|
||||
},
|
||||
{
|
||||
key: 'navigation.artists',
|
||||
@@ -123,31 +123,31 @@ export default {
|
||||
icon: 'microphone',
|
||||
key: 'navigation.podcasts',
|
||||
name: 'podcasts',
|
||||
show: this.settingsStore.show_menu_item_podcasts
|
||||
show: this.settingsStore.showMenuItemPodcasts
|
||||
},
|
||||
{
|
||||
icon: 'book-open-variant',
|
||||
key: 'navigation.audiobooks',
|
||||
name: 'audiobooks',
|
||||
show: this.settingsStore.show_menu_item_audiobooks
|
||||
show: this.settingsStore.showMenuItemAudiobooks
|
||||
},
|
||||
{
|
||||
icon: 'radio',
|
||||
key: 'navigation.radio',
|
||||
name: 'radio',
|
||||
show: this.settingsStore.show_menu_item_radio
|
||||
show: this.settingsStore.showMenuItemRadio
|
||||
},
|
||||
{
|
||||
icon: 'folder-open',
|
||||
key: 'navigation.files',
|
||||
name: 'files',
|
||||
show: this.settingsStore.show_menu_item_files
|
||||
show: this.settingsStore.showMenuItemFiles
|
||||
},
|
||||
{
|
||||
icon: 'magnify',
|
||||
key: 'navigation.search',
|
||||
name: this.searchStore.source,
|
||||
show: this.settingsStore.show_menu_item_search
|
||||
show: this.settingsStore.showMenuItemSearch
|
||||
},
|
||||
{ separator: true, show: true },
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
/>
|
||||
<p v-if="track.album" class="subtitle is-6" v-text="track.album" />
|
||||
<p
|
||||
v-if="settingsStore.show_filepath_now_playing"
|
||||
v-if="settingsStore.showFilepathNowPlaying"
|
||||
class="subtitle is-6 has-text-grey"
|
||||
v-text="track.path"
|
||||
/>
|
||||
@@ -90,8 +90,8 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
composer() {
|
||||
if (this.settingsStore.show_composer_now_playing) {
|
||||
const genres = this.settingsStore.show_composer_for_genre
|
||||
if (this.settingsStore.showComposerNowPlaying) {
|
||||
const genres = this.settingsStore.showComposerForGenre
|
||||
if (
|
||||
!genres ||
|
||||
(this.track.genre &&
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
<control-setting-text-field
|
||||
category="webinterface"
|
||||
name="show_composer_for_genre"
|
||||
:disabled="!settingsStore.show_composer_now_playing"
|
||||
:disabled="!settingsStore.showComposerNowPlaying"
|
||||
:placeholder="$t('page.settings.general.genres')"
|
||||
>
|
||||
<template #label>
|
||||
|
||||
@@ -5,7 +5,7 @@ const { t, availableLocales } = i18n.global
|
||||
|
||||
export const useSettingsStore = defineStore('SettingsStore', {
|
||||
actions: {
|
||||
setting(categoryName, optionName) {
|
||||
get(categoryName, optionName) {
|
||||
return (
|
||||
this.categories
|
||||
.find((category) => category.name === categoryName)
|
||||
@@ -34,34 +34,30 @@ export const useSettingsStore = defineStore('SettingsStore', {
|
||||
name: t(`language.${item}`)
|
||||
}))
|
||||
},
|
||||
recently_added_limit: (state) =>
|
||||
state.setting('webinterface', 'recently_added_limit')?.value ?? 100,
|
||||
show_composer_for_genre: (state) =>
|
||||
state.setting('webinterface', 'show_composer_for_genre')?.value ?? null,
|
||||
show_composer_now_playing: (state) =>
|
||||
state.setting('webinterface', 'show_composer_now_playing')?.value ??
|
||||
false,
|
||||
show_cover_artwork_in_album_lists: (state) =>
|
||||
state.setting('artwork', 'show_cover_artwork_in_album_lists')?.value ??
|
||||
false,
|
||||
show_filepath_now_playing: (state) =>
|
||||
state.setting('webinterface', 'show_filepath_now_playing')?.value ??
|
||||
false,
|
||||
show_menu_item_audiobooks: (state) =>
|
||||
state.setting('webinterface', 'show_menu_item_audiobooks')?.value ??
|
||||
false,
|
||||
show_menu_item_files: (state) =>
|
||||
state.setting('webinterface', 'show_menu_item_files')?.value ?? false,
|
||||
show_menu_item_music: (state) =>
|
||||
state.setting('webinterface', 'show_menu_item_music')?.value ?? false,
|
||||
show_menu_item_playlists: (state) =>
|
||||
state.setting('webinterface', 'show_menu_item_playlists')?.value ?? false,
|
||||
show_menu_item_podcasts: (state) =>
|
||||
state.setting('webinterface', 'show_menu_item_podcasts')?.value ?? false,
|
||||
show_menu_item_radio: (state) =>
|
||||
state.setting('webinterface', 'show_menu_item_radio')?.value ?? false,
|
||||
show_menu_item_search: (state) =>
|
||||
state.setting('webinterface', 'show_menu_item_search')?.value ?? false
|
||||
recentlyAddedLimit: (state) =>
|
||||
state.get('webinterface', 'recently_added_limit')?.value ?? 100,
|
||||
showComposerForGenre: (state) =>
|
||||
state.get('webinterface', 'show_composer_for_genre')?.value ?? null,
|
||||
showComposerNowPlaying: (state) =>
|
||||
state.get('webinterface', 'show_composer_now_playing')?.value ?? false,
|
||||
showCoverArtworkInAlbumLists: (state) =>
|
||||
state.get('artwork', 'show_cover_artwork_in_album_lists')?.value ?? false,
|
||||
showFilepathNowPlaying: (state) =>
|
||||
state.get('webinterface', 'show_filepath_now_playing')?.value ?? false,
|
||||
showMenuItemAudiobooks: (state) =>
|
||||
state.get('webinterface', 'show_menu_item_audiobooks')?.value ?? false,
|
||||
showMenuItemFiles: (state) =>
|
||||
state.get('webinterface', 'show_menu_item_files')?.value ?? false,
|
||||
showMenuItemMusic: (state) =>
|
||||
state.get('webinterface', 'show_menu_item_music')?.value ?? false,
|
||||
showMenuItemPlaylists: (state) =>
|
||||
state.get('webinterface', 'show_menu_item_playlists')?.value ?? false,
|
||||
showMenuItemPodcasts: (state) =>
|
||||
state.get('webinterface', 'show_menu_item_podcasts')?.value ?? false,
|
||||
showMenuItemRadio: (state) =>
|
||||
state.get('webinterface', 'show_menu_item_radio')?.value ?? false,
|
||||
showMenuItemSearch: (state) =>
|
||||
state.get('webinterface', 'show_menu_item_search')?.value ?? false
|
||||
},
|
||||
state: () => ({
|
||||
categories: []
|
||||
|
||||
@@ -59,8 +59,8 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
library_albums(media_kind) {
|
||||
return axios.get('./api/library/albums', { params: { media_kind } })
|
||||
library_albums(mediaKind) {
|
||||
return axios.get('./api/library/albums', { params: { mediaKind } })
|
||||
},
|
||||
|
||||
library_artist(artistId) {
|
||||
@@ -80,8 +80,8 @@ export default {
|
||||
return data.tracks
|
||||
},
|
||||
|
||||
library_artists(media_kind) {
|
||||
return axios.get('./api/library/artists', { params: { media_kind } })
|
||||
library_artists(mediaKind) {
|
||||
return axios.get('./api/library/artists', { params: { mediaKind } })
|
||||
},
|
||||
|
||||
library_composer(composer) {
|
||||
@@ -106,8 +106,8 @@ export default {
|
||||
return data.tracks
|
||||
},
|
||||
|
||||
library_composers(media_kind) {
|
||||
return axios.get('./api/library/composers', { params: { media_kind } })
|
||||
library_composers(mediaKind) {
|
||||
return axios.get('./api/library/composers', { params: { mediaKind } })
|
||||
},
|
||||
|
||||
library_count(expression) {
|
||||
@@ -118,36 +118,36 @@ export default {
|
||||
return axios.get('./api/library/files', { params: { directory } })
|
||||
},
|
||||
|
||||
async library_genre(genre, media_kind) {
|
||||
async library_genre(genre, mediaKind) {
|
||||
const params = {
|
||||
expression: `genre is "${genre}" and media_kind is ${media_kind}`,
|
||||
expression: `genre is "${genre}" and media_kind is ${mediaKind}`,
|
||||
type: 'genres'
|
||||
}
|
||||
const data = await axios.get('./api/search', { params })
|
||||
return data.genres
|
||||
},
|
||||
|
||||
async library_genre_albums(genre, media_kind) {
|
||||
async library_genre_albums(genre, mediaKind) {
|
||||
const params = {
|
||||
expression: `genre is "${genre}" and media_kind is ${media_kind}`,
|
||||
expression: `genre is "${genre}" and media_kind is ${mediaKind}`,
|
||||
type: 'albums'
|
||||
}
|
||||
const data = await axios.get('./api/search', { params })
|
||||
return data.albums
|
||||
},
|
||||
|
||||
async library_genre_tracks(genre, media_kind) {
|
||||
async library_genre_tracks(genre, mediaKind) {
|
||||
const params = {
|
||||
expression: `genre is "${genre}" and media_kind is ${media_kind}`,
|
||||
expression: `genre is "${genre}" and media_kind is ${mediaKind}`,
|
||||
type: 'tracks'
|
||||
}
|
||||
const data = await axios.get('./api/search', { params })
|
||||
return data.tracks
|
||||
},
|
||||
|
||||
async library_genres(media_kind) {
|
||||
async library_genres(mediaKind) {
|
||||
const params = {
|
||||
expression: `media_kind is ${media_kind}`,
|
||||
expression: `media_kind is ${mediaKind}`,
|
||||
type: 'genres'
|
||||
}
|
||||
const data = await axios.get('./api/search', { params })
|
||||
@@ -199,8 +199,8 @@ export default {
|
||||
return data.tracks
|
||||
},
|
||||
|
||||
library_rescan(scan_kind) {
|
||||
return axios.put('./api/rescan', null, { params: { scan_kind } })
|
||||
library_rescan(scanKind) {
|
||||
return axios.put('./api/rescan', null, { params: { scanKind } })
|
||||
},
|
||||
|
||||
library_stats() {
|
||||
@@ -221,8 +221,8 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
library_update(scan_kind) {
|
||||
return axios.put('./api/update', null, { params: { scan_kind } })
|
||||
library_update(scanKind) {
|
||||
return axios.put('./api/update', null, { params: { scanKind } })
|
||||
},
|
||||
|
||||
output_toggle(outputId) {
|
||||
|
||||
Reference in New Issue
Block a user