diff --git a/images/paste-dark.svg b/images/paste-dark.svg new file mode 100644 index 000000000..ee24dd53c --- /dev/null +++ b/images/paste-dark.svg @@ -0,0 +1,37 @@ + + + + + + + diff --git a/images/paste-light.svg b/images/paste-light.svg new file mode 100644 index 000000000..1fc7a9b03 --- /dev/null +++ b/images/paste-light.svg @@ -0,0 +1,37 @@ + + + + + + + diff --git a/src/util/inputValue.ts b/src/util/inputValue.ts index b9392e635..ec7df0e80 100644 --- a/src/util/inputValue.ts +++ b/src/util/inputValue.ts @@ -2,10 +2,11 @@ * Copyright (c) Red Hat, Inc. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for license information. *-----------------------------------------------------------------------------------------------*/ -import { env, InputBox, QuickInputButton, QuickInputButtons, ThemeIcon, window } from 'vscode'; +import { env, InputBox, QuickInputButton, QuickInputButtons, ThemeIcon, Uri, window } from 'vscode'; +import * as path from 'path'; export class quickBtn implements QuickInputButton { - constructor(public iconPath: ThemeIcon, public tooltip: string) { } + constructor(public iconPath: Uri | { light: Uri; dark: Uri } | ThemeIcon, public tooltip: string) { } } /* @@ -31,7 +32,11 @@ export function inputValue(prompt: string, initialValue: string, password: boole if (placeHolder) input.placeholder = placeHolder; const enterBtn = new quickBtn(new ThemeIcon('check'), 'Enter'); const cancelBtn = new quickBtn(new ThemeIcon('close'), 'Cancel'); - const pasteBtn = new quickBtn(new ThemeIcon('output'), 'Paste from Clipboard'); + const pasteBtn = new quickBtn({ + light: Uri.file(path.resolve(__dirname, '../../../images/paste-light.svg')), + dark: Uri.file(path.resolve(__dirname, '../../../images/paste-dark.svg')) + }, + 'Paste from Clipboard'); const hideBtn = new quickBtn(new ThemeIcon('eye'), 'Hide value'); const showBtn = new quickBtn(new ThemeIcon('eye-closed'), 'Show value'); let isHidden = password;