Skip to content

Commit

Permalink
add watermark to activate anura
Browse files Browse the repository at this point in the history
  • Loading branch information
BomberFish committed Sep 9, 2024
1 parent 635a0d8 commit 6d16ac6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Boot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,15 @@ window.addEventListener("load", async () => {
]);
};
document.body.appendChild(TNMark);
} else if (anura.settings.get("product-key") == undefined) {
const ActivateMark = document.createElement("span");
ActivateMark.setAttribute(
"style",
"position: absolute; bottom: 70px; right: 30px; color: white; opacity: 0.8",
);
ActivateMark.innerHTML =
"<h2>Activate AnuraOS</h2><p>Enter your product key to activate AnuraOS.</p>";
document.body.appendChild(ActivateMark);
}
}

Expand Down Expand Up @@ -613,6 +622,7 @@ document.addEventListener("anura-login-completed", async () => {
document.body.appendChild(quickSettings.notificationCenterElement);
document.body.appendChild(taskbar.element);
document.body.appendChild(alttab.element);

anura.systray = new Systray();
AnuradHelpers.setReady("anura.systray");

Expand Down
19 changes: 19 additions & 0 deletions src/oobe/OobeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,18 @@ class OobeView {
filter: brightness(1.1);
}
.screen .unpreferredButton {
background-color: transparent;
border: 1px solid rgb(26, 115, 232);
border-radius: 16px;
border-style: none;
color: white;
height: 2em;
padding-left: 1em;
padding-right: 1em;
transition: 0s;
}
.screen button {
background-color: var(--oobe-bg);
border-radius: 16px;
Expand Down Expand Up @@ -231,6 +243,9 @@ class OobeView {
</div>
</div>
<div id="bottomButtons">
<button on:click={() => this.nextStep()}>
I don't have a key
</button>
<button
on:click={() => {
try {
Expand Down Expand Up @@ -270,6 +285,10 @@ class OobeView {

// The sum of the digits should be divisible by 7
if (sum % 7 === 0) {
anura.settings.set(
"product-key",
this.state.productKey,
);
this.nextStep();
} else {
throw "Invalid key! Does not divide by 7";
Expand Down

0 comments on commit 6d16ac6

Please sign in to comment.