Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9ec9f39

Browse files
committed
move notification into status bar
1 parenta0973df commit9ec9f39

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

‎src/editor/commands.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import*asTfrom'typings'
22
import*asvscodefrom'vscode'
3+
importnotifyfrom'../services/notify'
34
importcreateTestRunner,{Payload}from'../services/testRunner'
45
importcreateWebViewfrom'../webview'
56

@@ -56,13 +57,13 @@ export const createCommands = ({ extensionPath, workspaceState, workspaceRoot }:
5657
testRunner=createTestRunner(config,{
5758
onSuccess:(payload:Payload)=>{
5859
// send test pass message back to client
59-
vscode.window.showInformationMessage('PASS')
60+
notify({message:'PASS'})
6061
webview.send({type:'TEST_PASS', payload})
6162
// update local storage
6263
},
6364
onFail:(payload:Payload,message:string)=>{
6465
// send test fail message back to client
65-
vscode.window.showWarningMessage(`FAIL${message}`)
66+
notify({message:`FAIL${message}`})
6667
webview.send({type:'TEST_FAIL', payload})
6768
},
6869
onError:(payload:Payload)=>{

‎src/services/notify/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import*asvscodefrom'vscode'
2+
3+
interfaceProps{
4+
message:string
5+
}
6+
7+
constnotify=({ message}:Props)=>{
8+
vscode.window.setStatusBarMessage(message,15000)
9+
}
10+
11+
exportdefaultnotify

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp