|
@@ -631,13 +631,11 @@
|
|
</span>
|
|
</span>
|
|
</template>
|
|
</template>
|
|
</floating-box>
|
|
</floating-box>
|
|
- <confirm v-if="modals.editSongConfirm" @confirmed="handleConfirmed()" />
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { mapState, mapGetters, mapActions } from "vuex";
|
|
import { mapState, mapGetters, mapActions } from "vuex";
|
|
-import { defineAsyncComponent } from "vue";
|
|
|
|
import Toast from "toasters";
|
|
import Toast from "toasters";
|
|
|
|
|
|
import aw from "@/aw";
|
|
import aw from "@/aw";
|
|
@@ -662,10 +660,7 @@ export default {
|
|
Discogs,
|
|
Discogs,
|
|
Reports,
|
|
Reports,
|
|
Youtube,
|
|
Youtube,
|
|
- MusareSongs,
|
|
|
|
- Confirm: defineAsyncComponent(() =>
|
|
|
|
- import("@/components/modals/Confirm.vue")
|
|
|
|
- )
|
|
|
|
|
|
+ MusareSongs
|
|
},
|
|
},
|
|
props: {
|
|
props: {
|
|
// songId: { type: String, default: null },
|
|
// songId: { type: String, default: null },
|
|
@@ -701,11 +696,6 @@ export default {
|
|
activityWatchVideoDataInterval: null,
|
|
activityWatchVideoDataInterval: null,
|
|
activityWatchVideoLastStatus: "",
|
|
activityWatchVideoLastStatus: "",
|
|
activityWatchVideoLastStartDuration: "",
|
|
activityWatchVideoLastStartDuration: "",
|
|
- confirm: {
|
|
|
|
- message: "",
|
|
|
|
- action: "",
|
|
|
|
- params: null
|
|
|
|
- },
|
|
|
|
recommendedGenres: [
|
|
recommendedGenres: [
|
|
"Blues",
|
|
"Blues",
|
|
"Country",
|
|
"Country",
|
|
@@ -1769,22 +1759,22 @@ export default {
|
|
new Toast(res.message);
|
|
new Toast(res.message);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- confirmAction(confirm) {
|
|
|
|
- this.confirm = confirm;
|
|
|
|
- this.updateConfirmMessage(confirm.message);
|
|
|
|
- this.openModal("editSongConfirm");
|
|
|
|
|
|
+ confirmAction({ message, action, params }) {
|
|
|
|
+ this.openModal({
|
|
|
|
+ modal: "confirm",
|
|
|
|
+ data: {
|
|
|
|
+ message,
|
|
|
|
+ action,
|
|
|
|
+ params,
|
|
|
|
+ onCompleted: this.handleConfirmed
|
|
|
|
+ }
|
|
|
|
+ });
|
|
},
|
|
},
|
|
- handleConfirmed() {
|
|
|
|
- const { action, params } = this.confirm;
|
|
|
|
|
|
+ handleConfirmed({ action, params }) {
|
|
if (typeof this[action] === "function") {
|
|
if (typeof this[action] === "function") {
|
|
if (params) this[action](params);
|
|
if (params) this[action](params);
|
|
else this[action]();
|
|
else this[action]();
|
|
}
|
|
}
|
|
- this.confirm = {
|
|
|
|
- message: "",
|
|
|
|
- action: "",
|
|
|
|
- params: null
|
|
|
|
- };
|
|
|
|
},
|
|
},
|
|
onCloseModal() {
|
|
onCloseModal() {
|
|
const songStringified = JSON.stringify({
|
|
const songStringified = JSON.stringify({
|
|
@@ -1833,7 +1823,6 @@ export default {
|
|
"updateReports",
|
|
"updateReports",
|
|
"setPlaybackRate"
|
|
"setPlaybackRate"
|
|
]),
|
|
]),
|
|
- ...mapActions("modals/confirm", ["updateConfirmMessage"]),
|
|
|
|
...mapActions("modalVisibility", ["closeModal", "openModal"])
|
|
...mapActions("modalVisibility", ["closeModal", "openModal"])
|
|
}
|
|
}
|
|
};
|
|
};
|