22 * Copyright (c) Red Hat, Inc. All rights reserved.
33 * Licensed under the MIT License. See LICENSE file in the project root for license information.
44 *-----------------------------------------------------------------------------------------------*/
5- import { env , InputBox , QuickInputButton , QuickInputButtons , ThemeIcon , window } from 'vscode' ;
5+ import { env , InputBox , QuickInputButton , QuickInputButtons , ThemeIcon , Uri , window } from 'vscode' ;
6+ import * as path from 'path' ;
67
78export class quickBtn implements QuickInputButton {
8- constructor ( public iconPath : ThemeIcon , public tooltip : string ) { }
9+ constructor ( public iconPath : Uri | { light : Uri ; dark : Uri } | ThemeIcon , public tooltip : string ) { }
910}
1011
1112/*
@@ -31,7 +32,11 @@ export function inputValue(prompt: string, initialValue: string, password: boole
3132 if ( placeHolder ) input . placeholder = placeHolder ;
3233 const enterBtn = new quickBtn ( new ThemeIcon ( 'check' ) , 'Enter' ) ;
3334 const cancelBtn = new quickBtn ( new ThemeIcon ( 'close' ) , 'Cancel' ) ;
34- const pasteBtn = new quickBtn ( new ThemeIcon ( 'output' ) , 'Paste from Clipboard' ) ;
35+ const pasteBtn = new quickBtn ( {
36+ light : Uri . file ( path . resolve ( __dirname , '../../../images/paste-light.svg' ) ) ,
37+ dark : Uri . file ( path . resolve ( __dirname , '../../../images/paste-dark.svg' ) )
38+ } ,
39+ 'Paste from Clipboard' ) ;
3540 const hideBtn = new quickBtn ( new ThemeIcon ( 'eye' ) , 'Hide value' ) ;
3641 const showBtn = new quickBtn ( new ThemeIcon ( 'eye-closed' ) , 'Show value' ) ;
3742 let isHidden = password ;
0 commit comments