Skip to content

Commit

Permalink
refactor(EVBackendConnection): access url property properly
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Mertens <[email protected]>
  • Loading branch information
lukas-mertens committed Oct 12, 2024
1 parent a4f5bd6 commit a21a87d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/modules/evbc/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ class EVBackendClient {
interfaces: null,
};

public get connection(): EVBackendConnection {
return this._cxn;
}

async connect(url: string): Promise<void> {
if (this._cxn) {
await this._cxn._disconnect();
Expand Down
4 changes: 4 additions & 0 deletions src/modules/evbc/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ class EVBackendConnection {
}
}

public get url(): string {
return this._url;
}

_connect_websocket_mode() {
this.rpc_issuer = new WebsocketRpcIssuer(this._url, this._publish_connection_state.bind(this));
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/MainPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default defineComponent({
}),
computed: {
connectionUrl() {
return evbc?._cxn?._url ?? "nothing";
return evbc?.connection.url ?? "nothing";
}
},
methods: {
Expand Down

0 comments on commit a21a87d

Please sign in to comment.