mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 05:23:56 -07:00
refactor typescript wiring
This commit is contained in:
parent
cea9ae62d8
commit
c62c336a11
286 changed files with 2999 additions and 3053 deletions
|
|
@ -1,10 +1,11 @@
|
|||
import { create } from '@bufbuild/protobuf';
|
||||
import webClient from '../../WebClient';
|
||||
import { Command_AccountImage_ext, Command_AccountImageSchema } from 'generated/proto/session_commands_pb';
|
||||
|
||||
import { SessionPersistence } from '../../persistence';
|
||||
import { Data } from '@app/types';
|
||||
|
||||
export function accountImage(image: Uint8Array): void {
|
||||
webClient.protobuf.sendSessionCommand(Command_AccountImage_ext, create(Command_AccountImageSchema, { image }), {
|
||||
webClient.protobuf.sendSessionCommand(Data.Command_AccountImage_ext, create(Data.Command_AccountImageSchema, { image }), {
|
||||
onSuccess: () => {
|
||||
SessionPersistence.accountImageChanged(image);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue