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