Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
fix: update status code websocket close
Browse files Browse the repository at this point in the history
  • Loading branch information
hibig committed Mar 7, 2024
1 parent b0233e3 commit a57605a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/vite.config.dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default mergeConfig(
},
https: true,
port: 5050,
proxy: createProxyTable('https://lmkcc.site')
proxy: createProxyTable()
},
plugins: [
basicSsl(),
Expand Down
5 changes: 3 additions & 2 deletions src/components/x-terminal/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
command.value = '';
};
const closeRealTerminal = (data) => {
statusCode.value = get(data, 'code');
conReadyState.value = terminalSocket.value.readyState;
clearCommand();
if ([1011, 1006, 1000].includes(statusCode.value)) {
Expand All @@ -98,12 +99,12 @@
term.value?.reset?.();
}
if (!loading.value) {
term.value.write(setData(`${data.reason}\r\n`));
term.value.write(setData(`(${statusCode.value})${data.reason}\r\n`));
term.value.write(setErrorData(`\r${RECONNECT_MSG}`));
}
first.value = true;
} else if (data.reason) {
term.value.write(setData(`${data.reason}\r\n`));
term.value.write(setData(`(${statusCode.value})${data.reason}\r\n`));
}
loading.value = false;
};
Expand Down
2 changes: 1 addition & 1 deletion src/views/login/components/modify-password.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
</a-form-item>
</div>
</div>
<div style="margin-top: 50px">
<div style="margin-top: 30px">
<a-button type="primary" html-type="submit" long size="large">{{
$t('common.button.submit')
}}</a-button>
Expand Down

0 comments on commit a57605a

Please sign in to comment.