Merge branch 'main' into enhancement/lastfm
This commit is contained in:
commit
6157470f0a
18 changed files with 341 additions and 274 deletions
|
@ -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
|
||||
|
|
20
src/renderer/main/components/svg-icon.js
Normal file
20
src/renderer/main/components/svg-icon.js
Normal 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"
|
||||
}
|
||||
}
|
||||
})
|
|
@ -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}`;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue