webterm: simpler TermState

Extending BaseState has fallen out of fashion.
This commit is contained in:
Fang 2021-08-13 00:23:12 +02:00
parent da85ee2e38
commit 8b6b51b4da
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972

View File

@ -1,12 +1,12 @@
import { Terminal } from 'xterm';
import { FitAddon } from 'xterm-addon-fit';
import { BaseState, createState } from "./base";
import { createState } from "./base";
type Session = { term: Terminal, fit: FitAddon };
type Sessions = { [id: string]: Session; }
export interface TermState extends BaseState<TermState> {
export interface TermState {
sessions: Sessions,
selected: string,
slogstream: null | EventSource,