Skip to content

Commit 23af011

Browse files
committed
refactor: change prompt type to autocomplete and enable clearFirst option for better user interaction
1 parent c99a1fd commit 23af011

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/frontend/menu.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,11 @@ async function populars(server: MangaServerInterface) {
224224

225225
while(true){
226226
const select = await prompts({
227-
type:'select',
227+
type:'autocomplete',
228228
message: 'Populares',
229229
name: 'select',
230-
choices
230+
choices,
231+
clearFirst: true
231232
})
232233

233234
if(!select.select){

src/frontend/prompts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const historyPrompt = (choices: Choice[]): PromptObject<'manga'> => {
3737
name: 'manga',
3838
message: 'Historial de lectura',
3939
choices,
40-
// clearFirst: true
40+
clearFirst: true
4141
}
4242
}
4343

0 commit comments

Comments
 (0)