Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: set create idOS key for create flow #216

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 23 additions & 15 deletions apps/idos-enclave/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
<html lang="en">

<head>
<meta charset="UTF-8"/>
<meta charset="UTF-8" />
<link rel="icon"
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🔐</text></svg>"/>
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🔐</text></svg>" />

<link rel="preconnect" href="https://fonts.googleapis.com"/>
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Urbanist:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
rel="stylesheet"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
href="https://fonts.googleapis.com/css2?family=Urbanist:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>idOS Secure Enclave</title>

<style>
Expand All @@ -31,6 +31,14 @@
content: "Unlocking...";
}

button#unlock.create::before {
content: "🔐 Create idOS Key";
}

button#unlock.create:disabled::before {
content: "Creating...";
}

button#confirm::before {
content: "👀 See request";
}
Expand All @@ -46,14 +54,14 @@
</head>

<body>
<div id="container" class="w-screen h-screen">
<button id="unlock"
class="w-full h-full px-[5%] py-[2%] bg-[#00ffb9] text-[43cqmin] transition-colors hover:bg-green-300 rounded-lg text-zinc-950 font-medium"></button>
<button id="confirm"
class="w-full h-full px-[5%] py-[2%] bg-[#00ffb9] text-[43cqmin] transition-colors hover:bg-green-300 rounded-lg text-zinc-950 font-medium"></button>
</div>

<script type="module" src="/src/main.ts"></script>
<div id="container" class="w-screen h-screen">
<button id="unlock"
class="w-full h-full px-[5%] py-[2%] bg-[#00ffb9] text-[41cqmin] transition-colors hover:bg-green-300 rounded-lg text-zinc-950 font-medium"></button>
<button id="confirm"
class="w-full h-full px-[5%] py-[2%] bg-[#00ffb9] text-[41cqmin] transition-colors hover:bg-green-300 rounded-lg text-zinc-950 font-medium"></button>
</div>

<script type="module" src="/src/main.ts"></script>
</body>

</html>
6 changes: 6 additions & 0 deletions apps/idos-enclave/src/lib/enclave.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,12 @@ export class Enclave {

async configure(mode, theme) {
this.configuration = { mode, theme };

if (mode === "new") {
this.unlockButton.classList.add("create");
} else {
this.unlockButton.classList.remove("create");
}
}

messageParent(message) {
Expand Down
2 changes: 1 addition & 1 deletion apps/idos-example-dapp/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ div#idos-wrapper::after {
}

div#idos-wrapper > #idos-container {
width: 140px;
width: 160px;
}

div#terminal {
Expand Down
Loading