sound when pieces connect
This commit is contained in:
parent
472113ad74
commit
21d7db5677
14 changed files with 75 additions and 8 deletions
|
|
@ -70,12 +70,14 @@ export default defineComponent({
|
|||
background: '',
|
||||
color: '',
|
||||
name: '',
|
||||
soundsEnabled: false,
|
||||
},
|
||||
previewImageUrl: '',
|
||||
setHotkeys: (v: boolean) => {},
|
||||
onBgChange: (v: string) => {},
|
||||
onColorChange: (v: string) => {},
|
||||
onNameChange: (v: string) => {},
|
||||
onSoundsEnabledChange: (v: boolean) => {},
|
||||
disconnect: () => {},
|
||||
connect: () => {},
|
||||
},
|
||||
|
|
@ -94,6 +96,9 @@ export default defineComponent({
|
|||
this.$watch(() => this.g.player.name, (value: string) => {
|
||||
this.g.onNameChange(value)
|
||||
})
|
||||
this.$watch(() => this.g.player.soundsEnabled, (value: boolean) => {
|
||||
this.g.onSoundsEnabledChange(value)
|
||||
})
|
||||
this.g = await main(
|
||||
`${this.$route.params.id}`,
|
||||
// @ts-ignore
|
||||
|
|
@ -111,6 +116,7 @@ export default defineComponent({
|
|||
setPiecesTotal: (v: number) => { this.piecesTotal = v },
|
||||
setConnectionState: (v: number) => { this.connectionState = v },
|
||||
togglePreview: () => { this.toggle('preview', false) },
|
||||
toggleSoundsEnabled: () => { this.g.player.soundsEnabled = !this.g.player.soundsEnabled },
|
||||
}
|
||||
)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -69,12 +69,14 @@ export default defineComponent({
|
|||
background: '',
|
||||
color: '',
|
||||
name: '',
|
||||
soundsEnabled: false,
|
||||
},
|
||||
previewImageUrl: '',
|
||||
setHotkeys: (v: boolean) => {},
|
||||
onBgChange: (v: string) => {},
|
||||
onColorChange: (v: string) => {},
|
||||
onNameChange: (v: string) => {},
|
||||
onSoundsEnabledChange: (v: boolean) => {},
|
||||
replayOnSpeedUp: () => {},
|
||||
replayOnSpeedDown: () => {},
|
||||
replayOnPauseToggle: () => {},
|
||||
|
|
@ -100,6 +102,9 @@ export default defineComponent({
|
|||
this.$watch(() => this.g.player.name, (value: string) => {
|
||||
this.g.onNameChange(value)
|
||||
})
|
||||
this.$watch(() => this.g.player.soundsEnabled, (value: boolean) => {
|
||||
this.g.onSoundsEnabledChange(value)
|
||||
})
|
||||
this.g = await main(
|
||||
`${this.$route.params.id}`,
|
||||
// @ts-ignore
|
||||
|
|
@ -119,6 +124,7 @@ export default defineComponent({
|
|||
setConnectionState: (v: number) => { this.connectionState = v },
|
||||
setReplaySpeed: (v: number) => { this.replay.speed = v },
|
||||
setReplayPaused: (v: boolean) => { this.replay.paused = v },
|
||||
toggleSoundsEnabled: () => { this.g.player.soundsEnabled = !this.g.player.soundsEnabled },
|
||||
}
|
||||
)
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue