|
@@ -260,7 +260,6 @@
|
|
<edit-song v-if="modals.editSong" song-type="songs" />
|
|
<edit-song v-if="modals.editSong" song-type="songs" />
|
|
<edit-songs v-if="modals.editSongs" />
|
|
<edit-songs v-if="modals.editSongs" />
|
|
<report v-if="modals.report" />
|
|
<report v-if="modals.report" />
|
|
- <bulk-actions v-if="modals.bulkActions" :type="bulkActionsType" />
|
|
|
|
<confirm v-if="modals.confirm" @confirmed="handleConfirmed()" />
|
|
<confirm v-if="modals.confirm" @confirmed="handleConfirmed()" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -288,9 +287,6 @@ export default {
|
|
ImportAlbum: defineAsyncComponent(() =>
|
|
ImportAlbum: defineAsyncComponent(() =>
|
|
import("@/components/modals/ImportAlbum.vue")
|
|
import("@/components/modals/ImportAlbum.vue")
|
|
),
|
|
),
|
|
- BulkActions: defineAsyncComponent(() =>
|
|
|
|
- import("@/components/modals/BulkActions.vue")
|
|
|
|
- ),
|
|
|
|
Confirm: defineAsyncComponent(() =>
|
|
Confirm: defineAsyncComponent(() =>
|
|
import("@/components/modals/Confirm.vue")
|
|
import("@/components/modals/Confirm.vue")
|
|
),
|
|
),
|
|
@@ -621,8 +617,7 @@ export default {
|
|
message: "",
|
|
message: "",
|
|
action: "",
|
|
action: "",
|
|
params: null
|
|
params: null
|
|
- },
|
|
|
|
- bulkActionsType: null
|
|
|
|
|
|
+ }
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -697,37 +692,49 @@ export default {
|
|
);
|
|
);
|
|
},
|
|
},
|
|
setTags(selectedRows) {
|
|
setTags(selectedRows) {
|
|
- this.bulkActionsType = {
|
|
|
|
- name: "tags",
|
|
|
|
- action: "songs.editTags",
|
|
|
|
- items: selectedRows.map(row => row._id),
|
|
|
|
- regex: /^[a-zA-Z0-9_]{1,64}$|^[a-zA-Z0-9_]{1,64}\[[a-zA-Z0-9_]{1,64}\]$/,
|
|
|
|
- autosuggest: true,
|
|
|
|
- autosuggestDataAction: "songs.getTags"
|
|
|
|
- };
|
|
|
|
- this.openModal("bulkActions");
|
|
|
|
|
|
+ this.openModal({
|
|
|
|
+ modal: "bulkActions",
|
|
|
|
+ data: {
|
|
|
|
+ type: {
|
|
|
|
+ name: "tags",
|
|
|
|
+ action: "songs.editTags",
|
|
|
|
+ items: selectedRows.map(row => row._id),
|
|
|
|
+ regex: /^[a-zA-Z0-9_]{1,64}$|^[a-zA-Z0-9_]{1,64}\[[a-zA-Z0-9_]{1,64}\]$/,
|
|
|
|
+ autosuggest: true,
|
|
|
|
+ autosuggestDataAction: "songs.getTags"
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
},
|
|
},
|
|
setArtists(selectedRows) {
|
|
setArtists(selectedRows) {
|
|
- this.bulkActionsType = {
|
|
|
|
- name: "artists",
|
|
|
|
- action: "songs.editArtists",
|
|
|
|
- items: selectedRows.map(row => row._id),
|
|
|
|
- regex: /^(?=.{1,64}$).*$/,
|
|
|
|
- autosuggest: true,
|
|
|
|
- autosuggestDataAction: "songs.getArtists"
|
|
|
|
- };
|
|
|
|
- this.openModal("bulkActions");
|
|
|
|
|
|
+ this.openModal({
|
|
|
|
+ modal: "bulkActions",
|
|
|
|
+ data: {
|
|
|
|
+ type: {
|
|
|
|
+ name: "artists",
|
|
|
|
+ action: "songs.editArtists",
|
|
|
|
+ items: selectedRows.map(row => row._id),
|
|
|
|
+ regex: /^(?=.{1,64}$).*$/,
|
|
|
|
+ autosuggest: true,
|
|
|
|
+ autosuggestDataAction: "songs.getArtists"
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
},
|
|
},
|
|
setGenres(selectedRows) {
|
|
setGenres(selectedRows) {
|
|
- this.bulkActionsType = {
|
|
|
|
- name: "genres",
|
|
|
|
- action: "songs.editGenres",
|
|
|
|
- items: selectedRows.map(row => row._id),
|
|
|
|
- regex: /^[\x00-\x7F]{1,32}$/,
|
|
|
|
- autosuggest: true,
|
|
|
|
- autosuggestDataAction: "songs.getGenres"
|
|
|
|
- };
|
|
|
|
- this.openModal("bulkActions");
|
|
|
|
|
|
+ this.openModal({
|
|
|
|
+ modal: "bulkActions",
|
|
|
|
+ data: {
|
|
|
|
+ type: {
|
|
|
|
+ name: "genres",
|
|
|
|
+ action: "songs.editGenres",
|
|
|
|
+ items: selectedRows.map(row => row._id),
|
|
|
|
+ regex: /^[\x00-\x7F]{1,32}$/,
|
|
|
|
+ autosuggest: true,
|
|
|
|
+ autosuggestDataAction: "songs.getGenres"
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
},
|
|
},
|
|
deleteOne(songId) {
|
|
deleteOne(songId) {
|
|
this.socket.dispatch("songs.remove", songId, res => {
|
|
this.socket.dispatch("songs.remove", songId, res => {
|