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

move notification into status bar#73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ShMcK merged 1 commit intomasterfromfeature/notify-status-bar
Jan 13, 2020
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletionssrc/editor/commands.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
import * as T from 'typings'
import * as vscode from 'vscode'
import notify from '../services/notify'
import createTestRunner, { Payload } from '../services/testRunner'
import createWebView from '../webview'

Expand DownExpand Up@@ -56,13 +57,13 @@ export const createCommands = ({ extensionPath, workspaceState, workspaceRoot }:
testRunner = createTestRunner(config, {
onSuccess: (payload: Payload) => {
// send test pass message back to client
vscode.window.showInformationMessage('PASS')
notify({ message:'PASS' })
webview.send({ type: 'TEST_PASS', payload })
// update local storage
},
onFail: (payload: Payload, message: string) => {
// send test fail message back to client
vscode.window.showWarningMessage(`FAIL ${message}`)
notify({ message:`FAIL ${message}` })
webview.send({ type: 'TEST_FAIL', payload })
},
onError: (payload: Payload) => {
Expand Down
11 changes: 11 additions & 0 deletionssrc/services/notify/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
import * as vscode from 'vscode'

interface Props {
message: string
}

const notify = ({ message }: Props) => {
vscode.window.setStatusBarMessage(message, 15000)
}

export default notify

[8]ページ先頭

©2009-2025 Movatter.jp