mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-10-29 08:05:03 +00:00
[client] update modal to take props
This commit is contained in:
1 parent
e8994ce9ae
commit
9ada6c9058
2 files changed
+9
-2
No files matched your search
+7
-1
@@ -1,5 +1,5 @@
|
||||
import { defineStore } from "pinia";
|
||||
|
||||
import { Track } from "../interfaces";
|
||||
enum ModalOptions {
|
||||
newPlaylist = "newPlaylist",
|
||||
editPlaylist = "editPlaylist",
|
||||
@@ -10,6 +10,7 @@ export default defineStore("newModal", {
|
||||
title: "",
|
||||
options: ModalOptions,
|
||||
component: "",
|
||||
props: {},
|
||||
visible: false,
|
||||
}),
|
||||
actions: {
|
||||
@@ -17,6 +18,11 @@ export default defineStore("newModal", {
|
||||
this.component = modalOption;
|
||||
this.visible = true;
|
||||
},
|
||||
showNewPlaylistModal(track: Track) {
|
||||
this.component = ModalOptions.newPlaylist;
|
||||
this.props.track = track;
|
||||
this.visible = true;
|
||||
},
|
||||
hideModal() {
|
||||
this.visible = false;
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user