mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2024-08-14 23:57:27 +00:00 
			
		
		
		
	feat: auto focus CreatePlaylistModal input field
This commit is contained in:
		
							parent
							
								
									6311eb73de
								
							
						
					
					
						commit
						256cab83a0
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
    <ModalComponent @close="$emit('close')">
 | 
					    <ModalComponent @close="$emit('close')">
 | 
				
			||||||
        <div class="flex flex-col">
 | 
					        <div class="flex flex-col">
 | 
				
			||||||
            <h2 v-t="'actions.create_playlist'" />
 | 
					            <h2 v-t="'actions.create_playlist'" />
 | 
				
			||||||
            <input v-model="playlistName" type="text" class="input mt-2" />
 | 
					            <input ref="input" v-model="playlistName" type="text" class="input mt-2" />
 | 
				
			||||||
            <div class="ml-auto mt-3 w-min flex">
 | 
					            <div class="ml-auto mt-3 w-min flex">
 | 
				
			||||||
                <button v-t="'actions.cancel'" class="btn" @click="$emit('close')" />
 | 
					                <button v-t="'actions.cancel'" class="btn" @click="$emit('close')" />
 | 
				
			||||||
                <button v-t="'actions.okay'" class="btn ml-2" @click="onCreatePlaylist" />
 | 
					                <button v-t="'actions.okay'" class="btn ml-2" @click="onCreatePlaylist" />
 | 
				
			||||||
| 
						 | 
					@ -25,6 +25,7 @@ export default {
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    mounted() {
 | 
					    mounted() {
 | 
				
			||||||
 | 
					        this.$refs.input.focus();
 | 
				
			||||||
        window.addEventListener("keydown", this.handleKeyDown);
 | 
					        window.addEventListener("keydown", this.handleKeyDown);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    unmounted() {
 | 
					    unmounted() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue