@@ -46,9 +46,7 @@ let deviceid_placeholder = "device ID";
46
46
*/
47
47
export function registerLoginCommand ( command : string ) {
48
48
vscode . commands . registerCommand ( command , ( ) => {
49
- vscode . window
50
- . showQuickPick ( loginMethods )
51
- . then ( handleLogin , loginError ) ;
49
+ vscode . window . showQuickPick ( loginMethods ) . then ( handleLogin , loginError ) ;
52
50
} ) ;
53
51
}
54
52
@@ -121,11 +119,7 @@ export function loginFromSavedState(saved_state: any) {
121
119
* @example
122
120
* getOrPrompt('email', 'Please enter your email', '[email protected] ')
123
121
*/
124
- function getOrPrompt (
125
- section : string ,
126
- prompt : string ,
127
- placeHolder ?: string
128
- ) {
122
+ function getOrPrompt ( section : string , prompt : string , placeHolder ?: string ) {
129
123
return new Promise < string | undefined > ( ( resolve , reject ) => {
130
124
let config = vscode . workspace . getConfiguration ( "notion" ) ;
131
125
let value : string = config . get ( section ) || "" ;
@@ -211,8 +205,7 @@ function handleLogin(method: vscode.QuickPickItem | undefined) {
211
205
function loginError ( error ?: string ) {
212
206
let message = "Error while selecting login method" ;
213
207
214
- if ( typeof error === "undefined" )
215
- vscode . window . showErrorMessage ( message ) ;
208
+ if ( typeof error === "undefined" ) vscode . window . showErrorMessage ( message ) ;
216
209
else vscode . window . showErrorMessage ( message + ": " + error ) ;
217
210
}
218
211
@@ -239,9 +232,7 @@ function sendLoginEmail() {
239
232
handleCodeInApp : true
240
233
} )
241
234
. then ( loginWithEmailCred )
242
- . catch ( ( ) =>
243
- vscode . window . showErrorMessage ( "Error sending login email" )
244
- ) ;
235
+ . catch ( ( ) => vscode . window . showErrorMessage ( "Error sending login email" ) ) ;
245
236
}
246
237
247
238
function loginWithEmailCred ( ) {
@@ -251,8 +242,7 @@ function loginWithEmailCred() {
251
242
252
243
vscode . window
253
244
. showInputBox ( {
254
- prompt :
255
- "Please enter the code obtained via the link in the email we sent you" ,
245
+ prompt : `Email sent to ${ email } . Please enter the code obtained via the link in the email we sent you` ,
256
246
ignoreFocusOut : true ,
257
247
placeHolder : "code"
258
248
} )
0 commit comments