[web] Reorder methods and attributes

This commit is contained in:
Alain Nussbaumer 2024-04-26 23:09:45 +02:00
parent ea947df50a
commit de847a6711
5 changed files with 26 additions and 26 deletions

View File

@ -265,17 +265,6 @@ export default {
document.querySelector('html').classList.remove('is-clipped')
}
},
update_outputs() {
webapi.outputs().then(({ data }) => {
this.$store.commit(types.UPDATE_OUTPUTS, data.outputs)
})
},
update_player_status() {
webapi.player_status().then(({ data }) => {
this.$store.commit(types.UPDATE_PLAYER_STATUS, data)
this.update_lyrics()
})
},
update_lastfm() {
webapi.lastfm().then(({ data }) => {
this.$store.commit(types.UPDATE_LASTFM, data)
@ -299,12 +288,23 @@ export default {
this.$store.commit(types.UPDATE_LYRICS)
}
},
update_outputs() {
webapi.outputs().then(({ data }) => {
this.$store.commit(types.UPDATE_OUTPUTS, data.outputs)
})
},
update_pairing() {
webapi.pairing().then(({ data }) => {
this.$store.commit(types.UPDATE_PAIRING, data)
this.pairing_active = data.active
})
},
update_player_status() {
webapi.player_status().then(({ data }) => {
this.$store.commit(types.UPDATE_PLAYER_STATUS, data)
this.update_lyrics()
})
},
update_queue() {
webapi.queue().then(({ data }) => {
this.$store.commit(types.UPDATE_QUEUE, data)

View File

@ -74,8 +74,8 @@ export default {
data() {
return {
disabled: true,
playlist_name: '',
loading: false
loading: false,
playlist_name: ''
}
},

View File

@ -125,7 +125,7 @@ export default {
webapi.player_play_expression(this.play_expression, false)
},
transform(path) {
return { path, name: path.slice(path.lastIndexOf('/') + 1) }
return { name: path.slice(path.lastIndexOf('/') + 1), path }
}
}
}

View File

@ -76,8 +76,8 @@ export default {
data() {
return {
cursor: mdiCancel,
INTERVAL,
cursor: mdiCancel,
interval_id: 0,
is_dragged: false,
selected_item: {},

View File

@ -12,23 +12,23 @@ import vue from '@vitejs/plugin-vue'
const owntoneUrl = process.env.VITE_OWNTONE_URL ?? 'http://localhost:3689'
export default defineConfig({
resolve: { alias: { '@': '/src' } },
build: {
outDir: '../htdocs',
rollupOptions: {
output: {
assetFileNames: `assets/[name].[ext]`,
chunkFileNames: `assets/[name].js`,
entryFileNames: `assets/[name].js`
}
}
},
plugins: [
vue(),
i18n({
include: path.resolve(__dirname, './src/i18n/**.json')
})
],
build: {
outDir: '../htdocs',
rollupOptions: {
output: {
entryFileNames: `assets/[name].js`,
chunkFileNames: `assets/[name].js`,
assetFileNames: `assets/[name].[ext]`
}
}
},
resolve: { alias: { '@': '/src' } },
server: {
proxy: {
'/api': {