mirror of
https://github.com/urbit/shrub.git
synced 2024-12-20 17:32:11 +03:00
webterm: fix broken api interactions
We hadn't adapted to the new subscription event callback yet, and were sending a slightly misshapen herm task for pokes.
This commit is contained in:
parent
4ccfae930c
commit
329ec8ef3f
@ -393,8 +393,6 @@ export default function TermApp(props: TermAppProps) {
|
||||
|
||||
// open subscription
|
||||
//
|
||||
// TODO start default session alongside other landscape subscriptions,
|
||||
// once subscription refactor is in.
|
||||
api.subscribe({ app: 'herm', path: '/session/'+selected,
|
||||
event: (e) => {
|
||||
const ses = useTermState.getState().sessions[selected];
|
||||
@ -402,7 +400,7 @@ export default function TermApp(props: TermAppProps) {
|
||||
console.log('on blit: no such session', selected, sessions, useTermState.getState().sessions);
|
||||
return;
|
||||
}
|
||||
showBlit(ses.term, e.data);
|
||||
showBlit(ses.term, e);
|
||||
},
|
||||
quit: () => { // quit
|
||||
// TODO show user a message
|
||||
|
@ -1,13 +1,13 @@
|
||||
import _ from 'lodash';
|
||||
|
||||
import { Scry } from '../lib'
|
||||
import { Enc, Path, Patp, PatpNoSig, Poke, Thread } from '../lib/types';
|
||||
import { Poke } from '../lib/types';
|
||||
import { Belt, Task, SessionTask } from './types';
|
||||
|
||||
export const pokeTask = (session: string, task: Task): Poke<SessionTask> => ({
|
||||
app: 'herm',
|
||||
mark: 'herm-task',
|
||||
json: { session, task }
|
||||
json: { session, ...task }
|
||||
});
|
||||
|
||||
export const pokeBelt = (
|
||||
|
@ -57,7 +57,4 @@ export type Task =
|
||||
| { hail: null }
|
||||
| { hook: null }
|
||||
|
||||
export type SessionTask = {
|
||||
session: string,
|
||||
task: Task
|
||||
}
|
||||
export type SessionTask = { session: string } & Task
|
||||
|
Loading…
Reference in New Issue
Block a user