Merge branch 'main' into enhancement/lastfm

This commit is contained in:
Core 2022-06-29 00:20:35 +01:00
commit 6157470f0a
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6
18 changed files with 341 additions and 274 deletions

View file

@ -7,6 +7,7 @@ import {Events} from './events.js'
import { wsapi } from "./wsapi_interop.js"
import { MusicKitTools } from "./musickittools.js"
import { spawnMica } from "./mica.js"
import { svgIcon } from './components/svg-icon.js'
// Define window objects

View file

@ -0,0 +1,20 @@
export const svgIcon = Vue.component("svg-icon", {
template: `
<div class="_svg-icon" :class="classes" :svg-name="name" :style="{'--icon': 'url(' + url + ')'}"></div>
`,
props: {
name: {
type: String,
required: false
},
classes: {
type: String,
required: false
},
url: {
type: String,
required: true,
default: "./assets/repeat.svg"
}
}
})

View file

@ -245,6 +245,7 @@ const app = new Vue({
notyf: notyf,
idleTimer: null,
idleState: false,
appVisible: true
},
watch: {
cfg: {
@ -276,6 +277,12 @@ const app = new Vue({
}, false)
},
methods: {
hotReload() {
this.appVisible = false
setTimeout(() => {
this.appVisible = true
}, 1000)
},
setWindowHash(route = "") {
window.location.hash = `#${route}`;
},