Skip to content

Commit

Permalink
pass msg above qr code as prop to qrplaystore component
Browse files Browse the repository at this point in the history
  • Loading branch information
amiraabouhadid committed Dec 2, 2024
1 parent 3c327c0 commit 908f758
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
4 changes: 3 additions & 1 deletion packages/playground/src/components/deposit_dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
</v-col>
<v-divider class="mx-4" vertical></v-divider>
<v-col>
<QRPlayStore :qr="qrCodeText" />
<QRPlayStore :qr="qrCodeText" :msg="qrHeader" />
</v-col>
</v-row>
</v-container>
Expand Down Expand Up @@ -94,6 +94,8 @@ const props = defineProps({
openDepositDialog: Boolean,
twinId: Number,
});
const qrHeader = `<b> OR </b>
<p class="mb-3">Use ThreeFold Connect to scan this QRcode:</p>`;
function loadingDots() {
if (dots.value === "...") {
Expand Down
4 changes: 2 additions & 2 deletions packages/playground/src/components/qr_play_store.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<template>
<div class="d-flex flex-column text-center align-center">
<b> OR </b>
<p class="mb-3">Use ThreeFold Connect to scan this QRcode:</p>
<span v-html="msg"></span>
<div class="d-flex justify-center py-2">
<QrcodeGenerator :data="props.qr" />
</div>
Expand All @@ -22,6 +21,7 @@
<script setup lang="ts">
const props = defineProps({
qr: String,
msg: String,
});
const apps = [
Expand Down
7 changes: 6 additions & 1 deletion packages/playground/src/dashboard/twin_view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@
<v-col lg="4" md="12" sm="12" class="my-4" v-if="profileManager.profile">
<QRPlayStore
:qr="'TFT:' + bridge + '?message=twin_' + profileManager.profile.twinId + '&sender=me&amount=100'"
:msg="qrHeader"
/>
</v-col>
</v-row>
Expand All @@ -204,6 +205,8 @@ import { KycStatus } from "@threefold/grid_client";
import { generatePublicKey } from "@threefold/rmb_direct_client";
import { computed, onMounted, ref } from "vue";
import { manual } from "@/utils/manual";
import router from "../router";
import { useGrid, useProfileManager } from "../stores";
import type { FarmInterface } from "../types";
Expand Down Expand Up @@ -233,7 +236,9 @@ const kycDialogLoading = ref(false);
const profileManagerController = useProfileManagerController();
const balance = profileManagerController.balance;
const insufficientBalance = computed(() => balance.value?.free == undefined || balance.value?.free < 100);
const qrHeader = computed(() => {
return `Scan the QR code using <a class="app-link" href="${manual.tf_connect_app}" target="_blank">Threefold Connect</a> to fund your account.`;
});
onMounted(async () => {
const profile = profileManager.profile!;
if (!grid) {
Expand Down
4 changes: 4 additions & 0 deletions packages/playground/src/weblets/profile_manager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@
<section class="qr d-flex flex-column align-center">
<QRPlayStore
:qr="'TFT:' + bridge + '?message=twin_' + profileManager.profile.twinId + '&sender=me&amount=100'"
:msg="qrHeader"
/>
</section>
</v-col>
Expand Down Expand Up @@ -454,6 +455,9 @@ const props = defineProps({
type: Boolean,
},
});
const qrHeader = computed(() => {
return `Scan the QR code using <a class="app-link" href="${manual.tf_connect_app}" target="_blank">Threefold Connect</a> to fund your account.`;
});
const mnemonicRef = ref();
const emailRef = ref();
Expand Down

0 comments on commit 908f758

Please sign in to comment.