refactored many events to use wails bindings, reducing boilerplate
This commit is contained in:
@@ -12,7 +12,7 @@ import { playerStore } from '../player-store';
|
||||
* render() {
|
||||
* return html`
|
||||
* <span>${this.player.currentTrack?.fileName}</span>
|
||||
* <button @click=${() => this.player.play()}>Play</button>
|
||||
* <button @click=${() => this.player.pause()}>Pause</button>
|
||||
* `;
|
||||
* }
|
||||
*/
|
||||
@@ -67,10 +67,6 @@ export class PlayerController implements ReactiveController {
|
||||
// Delegate to store (which delegates to backend)
|
||||
// ===================================================================
|
||||
|
||||
play(): void {
|
||||
playerStore.play();
|
||||
}
|
||||
|
||||
pause(): void {
|
||||
playerStore.pause();
|
||||
}
|
||||
|
||||
@@ -71,6 +71,10 @@ export class QueueController implements ReactiveController {
|
||||
// ACTIONS
|
||||
// ===================================================================
|
||||
|
||||
play(): void {
|
||||
queueStore.play();
|
||||
}
|
||||
|
||||
next(): void {
|
||||
queueStore.next();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user