Skip to content

Commit

Permalink
Merge pull request #1084 from jonnius/non-send-backend
Browse files Browse the repository at this point in the history
Relieve backend from the need of being `Send`
  • Loading branch information
nanu-c authored Sep 20, 2023
2 parents 1de6683 + e47aea7 commit b10e614
Show file tree
Hide file tree
Showing 6 changed files with 327 additions and 387 deletions.
3 changes: 3 additions & 0 deletions axolotl-web/src/pages/Verification.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,12 @@ export default {
this.code = code
},
sendCode() {
console.log("send code", this.code)
if (this.code.length === 6) {
this.$store.dispatch("sendCode", this.code);
this.inProgress = true;
} else {
console.error("code not 6 digits")
}
},
sendPin() {
Expand Down
6 changes: 6 additions & 0 deletions axolotl-web/src/store/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { validateUUID } from "@/helpers/uuidCheck";
import app from "../main";

function socketSend(message) {
console.log("socketSend", message);
app.config.globalProperties.$socket.send(JSON.stringify(message));
}

Expand Down Expand Up @@ -808,12 +809,17 @@ export default createStore({
}
},
sendCode(state, code) {
console.log("store: sendCode", code);
if (this.state.socket.isConnected) {
const message = {
request: "sendCode",
data: code,
};
console.log("store: sendCode", message);
socketSend(message);
} else {
console.error("socket not connected");
// reconnect socket
}
},
setUsername(state, username) {
Expand Down
5 changes: 2 additions & 3 deletions clickable.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
clickable_minimum_required: 7.10.0

builder: rust
rust_channel: 1.66.1
rust_channel: 1.71.1
env_vars:
CC: ""
CXX: ""
PKG_CONFIG_ALLOW_CROSS: "1"
prebuild:
- mkdir -p ${BUILD_DIR}/axolotl-web
- cp ${SRC_DIR}/axolotl-web/dist ${BUILD_DIR}/axolotl-web/ -R
Expand All @@ -14,8 +15,6 @@ dependencies_host:

dependencies_target:
- libdbus-1-dev
env_vars:
PKG_CONFIG_ALLOW_CROSS: "1"

build_args: --features ut
kill: axolotl
Expand Down
Loading

0 comments on commit b10e614

Please sign in to comment.