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

Feature/tutorial setup#4

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 12 commits intomasterfromfeature/tutorial-setup
Jun 9, 2019
Merged
Show file tree
Hide file tree
Changes from1 commit
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
PrevPrevious commit
NextNext commit
update state in client
  • Loading branch information
@ShMcK
ShMcK committedJun 9, 2019
commit9c530c95b403e18b0ad0d7e1aaecea6abfee9ead
12 changes: 5 additions & 7 deletionssrc/editor/commands/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -54,8 +54,8 @@ export const createCommands = ({ context, machine, storage, git }: CreateCommand
initialProgress = progress
const canContinue = !!(tutorial && progress && hasGit && hasGitRemote)
console.log('canContinue', canContinue)
// if a tutorial exists,"CONTINUE"
// otherwise start from"NEW"
// if a tutorial exists,'CONTINUE'
// otherwise start from'NEW'
machine.send(canContinue ? 'CONTINUE' : 'NEW')
},
// open React webview
Expand All@@ -78,15 +78,13 @@ export const createCommands = ({ context, machine, storage, git }: CreateCommand
}
},
// send messages to webview
[COMMANDS.SEND_STATE]: (action: CR.Action) => {
console.log(`SEND ${JSON.stringify(action)}`)
console.log('webview')
console.log(webview)
[COMMANDS.SEND_STATE]: (payload: any) => {
console.log(`SEND ${JSON.stringify(payload)}`)
// console.log(webview.currentPanel)
// if (!webview || !webview.currentPanel) {
// throw new Error('No valid panel available')
// }
webview.postMessage(action)
webview.postMessage({ type: 'SET_STATE', payload })

}
})
1 change: 0 additions & 1 deletionweb-app/src/Routes.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,7 +8,6 @@ interface ReceivedEvent {
const Routes = () => {
const [state, setState] = React.useState({ SelectTutorial: 'Initial' })
const handleEvent = (event: ReceivedEvent): void => {
console.log('--- HANDLE EVENT ---')
const message = event.data
console.log(`RECEIVED: ${JSON.stringify(message)}`)
// messages from core
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp