mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2024-08-14 23:57:27 +00:00 
			
		
		
		
	Merge pull request #2630 from Bnyro/new-playlist-shortcut
Add shortcut to create new playlist from playlist add modal
This commit is contained in:
		
						commit
						0233befcf0
					
				
					 1 changed files with 10 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -4,7 +4,8 @@
 | 
			
		|||
        <select class="select w-full mt-3" v-model="selectedPlaylist">
 | 
			
		||||
            <option v-for="playlist in playlists" :value="playlist.id" :key="playlist.id" v-text="playlist.name" />
 | 
			
		||||
        </select>
 | 
			
		||||
        <div class="flex justify-end mt-3">
 | 
			
		||||
        <div class="flex justify-between w-full mt-3">
 | 
			
		||||
            <button class="btn" @click="onCreatePlaylist" ref="addButton" v-t="'actions.create_playlist'" />
 | 
			
		||||
            <button
 | 
			
		||||
                class="btn"
 | 
			
		||||
                @click="handleClick(selectedPlaylist)"
 | 
			
		||||
| 
						 | 
				
			
			@ -77,6 +78,14 @@ export default {
 | 
			
		|||
                this.playlists = json;
 | 
			
		||||
            });
 | 
			
		||||
        },
 | 
			
		||||
        onCreatePlaylist() {
 | 
			
		||||
            const name = prompt(this.$t("actions.create_playlist"));
 | 
			
		||||
            if (!name) return;
 | 
			
		||||
            this.createPlaylist(name).then(json => {
 | 
			
		||||
                if (json.error) alert(json.error);
 | 
			
		||||
                else this.fetchPlaylists();
 | 
			
		||||
            });
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue