Skip to content

Commit

Permalink
Add a debug text box with the url
Browse files Browse the repository at this point in the history
Signed-off-by: Lucas ONeil <[email protected]>
  • Loading branch information
loneil committed Feb 15, 2024
1 parent cd141f4 commit f47e6eb
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion demo/vue/app/frontend/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default function getRouter(basePath = '/') {
document.title = to.meta.title
? to.meta.title
: process.env.VUE_APP_TITLE;
} else document.title = 'Demo VC-Authn-OIDC App'; // default title
} else document.title = 'Demo VC-Authn-OIDC App'; // default title

if (to.query.r && isFirstTransition) {
router.replace({
Expand Down
38 changes: 38 additions & 0 deletions oidc-controller/api/templates/verified_credentials.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,21 @@
.header-desc a {
line-height: 1rem;
}
.text-link {
display: none;
margin-top: 1rem;
margin-bottom: 1rem;
}
.text-link textarea {
border-radius: 5px;
display: block;
max-width: 100%;
resize: none;
width: 100%;
}
.text-link label {
display: block;
}
</style>
</head>
<body>
Expand Down Expand Up @@ -260,6 +275,17 @@ <h1>Scan with a Digital Wallet</h1>
/>
</div>

<!-- Add a input box with the url_to_message data -->
<div class="text-link">
<label for="url_to_message">Presentation Exchange URL:</label>
<textarea
id="url_to_message"
rows="3"
disabed
value="{{url_to_message}}"
>{{url_to_message}}</textarea>
</div>

<div>
<b>Don't have a digital wallet?</b>
</div>
Expand Down Expand Up @@ -380,5 +406,17 @@ <h1>Scan with a Digital Wallet</h1>
timer = setInterval(() => {
checkStatus();
}, 2000);

/**
* If the BC_ID is clicked on 10 times in a row, the QR code will be refreshed
*/
let counter = 0;
const textLinkDiv = document.querySelector(".text-link");
document.querySelector("#BC_ID").addEventListener("click", () => {
counter++;
if (counter === 10) {
textLinkDiv.style.display = "block";
}
});
</script>
</html>

0 comments on commit f47e6eb

Please sign in to comment.