Pass the user's ID to the playlist export modal.
This commit is contained in:
parent
f5611e8b98
commit
12d7bc688d
2 changed files with 4 additions and 0 deletions
|
|
@ -183,6 +183,7 @@ export default {
|
||||||
// Set the Vue user object
|
// Set the Vue user object
|
||||||
this.user.name = data.display_name || data.id;
|
this.user.name = data.display_name || data.id;
|
||||||
this.user.image = data.images.length > 0 ? data.images[0].url : ``;
|
this.user.image = data.images.length > 0 ? data.images[0].url : ``;
|
||||||
|
this.$emit(`user_id`, data.id);
|
||||||
|
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
:data_exists="data.length !== 0"
|
:data_exists="data.length !== 0"
|
||||||
:is_track_data="config.type === 'Tracks'"
|
:is_track_data="config.type === 'Tracks'"
|
||||||
@playlist_export="playlist_export_modal = true"
|
@playlist_export="playlist_export_modal = true"
|
||||||
|
@user_id="user_id = $event"
|
||||||
@data_request="get_data"
|
@data_request="get_data"
|
||||||
/>
|
/>
|
||||||
<div v-if="error" class="error">{{ error }}</div>
|
<div v-if="error" class="error">{{ error }}</div>
|
||||||
|
|
@ -22,6 +23,7 @@
|
||||||
<PlaylistExport
|
<PlaylistExport
|
||||||
v-if="playlist_export_modal"
|
v-if="playlist_export_modal"
|
||||||
:config="config"
|
:config="config"
|
||||||
|
:user_id="user_id"
|
||||||
@close="playlist_export_modal = false"
|
@close="playlist_export_modal = false"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -57,6 +59,7 @@ export default {
|
||||||
data: [],
|
data: [],
|
||||||
error: ``,
|
error: ``,
|
||||||
playlist_export_modal: false,
|
playlist_export_modal: false,
|
||||||
|
user_id: null,
|
||||||
};},
|
};},
|
||||||
computed: {
|
computed: {
|
||||||
items() {
|
items() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue