Skip to content

Commit

Permalink
fix: remove template string
Browse files Browse the repository at this point in the history
  • Loading branch information
HSunboy committed Sep 23, 2024
1 parent 32e72c9 commit 3ef2c68
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/page/Workspace/components/OBClientPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,38 +148,37 @@ class OBClient extends React.PureComponent<IOBClientProps, IOBClientState> {
this.ws = new WebSocket(url.href);
this.ws.onerror = (e) => {
this.xtermInstance.write(
`${
formatMessage({
id: 'odc.components.OBClientPage.NetworkException',
defaultMessage: '网络异常:',
}) + // 网络异常:
e.type
}` + '\r\n',
formatMessage({
id: 'odc.components.OBClientPage.NetworkException',
defaultMessage: '网络异常:',
}) +
e.type +
'\r\n',
);

console.log(e);
};
this.xtermInstance.write(
`${formatMessage({
formatMessage({
id: 'odc.components.OBClientPage.EstablishingConnection',
defaultMessage: '建立连接中....',
})}\r\n`, // 建立连接中....
}) + '\r\n',
);
this.ws.onclose = (e) => {
console.log(e);
this.xtermInstance.write(
`${formatMessage({
formatMessage({
id: 'odc.components.OBClientPage.ConnectionFailed',
defaultMessage: '***连接失败***',
})}\r\n`, //* **连接失败***
}) + '\r\n',
);
};
this.ws.onopen = (e) => {
this.xtermInstance.write(
`${formatMessage({
formatMessage({
id: 'odc.components.OBClientPage.ConnectionEstablished',
defaultMessage: '建立连接成功....',
})}\r\n`, // 建立连接成功....
}) + '\r\n',
);
console.log('ws opened!');
const warnMsg = [
Expand Down

0 comments on commit 3ef2c68

Please sign in to comment.