Skip to content

Commit

Permalink
Landing page localization
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Jan 16, 2022
1 parent e2d690c commit 30b33c5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
26 changes: 11 additions & 15 deletions app/landing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,11 @@ <h5 class="mx-3 flex flex-row m-0 font-bold build-content text-center">You are r
<div class="bg-gray-700 w-3/5 m-auto mt-40 mb-60 rounded-2xl relative text-center p-1">
<h1>Authme</h1>
<div class="mx-auto rounded-2xl bg-gray-800 w-2/3 mb-16" id="choose">
<h3 class="pt-3">Welcome to Authme!</h3>
<h4 id="text">
Please create a password to encrypt your 2FA codes!
<br />
If you don't want to type in a password every time you launch Authme choose More options and Don't require password.
</h4>
<h3 data-loc class="pt-3">Create password</h3>
<h4 data-loc id="text">Create a strong password to encrypt your 2FA codes!</h4>
<div class="flex flex-row flex-wrap justify-center gap-3 pb-5 select-none">
<div class="flex flex-col">
<label class="mb-1" id="password_label1">Password</label>
<label data-loc class="mb-1" id="password_label1">Password</label>
<input class="input" type="password" id="password_input1" spellcheck="false" />
<svg tabindex="0" xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 relative top-[-45px] cursor-pointer left-[250px]" fill="none" viewBox="0 0 24 24" stroke="black" id="show_pass_0">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
Expand All @@ -43,7 +39,7 @@ <h4 id="text">
</svg>
</div>
<div class="flex flex-col">
<label class="mb-1" id="password_label2">Confirm password</label>
<label data-loc class="mb-1" id="password_label2">Confirm password</label>
<input class="input" type="password" id="password_input2" spellcheck="false" />
<svg tabindex="0" xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 relative top-[-45px] cursor-pointer left-[250px]" fill="none" viewBox="0 0 24 24" stroke="black" id="show_pass_1">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
Expand All @@ -58,28 +54,28 @@ <h4 id="text">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg>
Confirm
<span data-loc>Confirm</span>
</button>

<div class="mx-auto pb-3">
<details class="details mb-5 transform ease-in duration-200" onclick="showMoreOptions()">
<summary class="summary font-bold mb-3 cursor-pointer">More options</summary>
<summary data-loc class="summary font-bold mb-3 cursor-pointer">More options</summary>
</details>
</div>
</div>
<div>
<div id="more_options" class="mx-auto rounded-2xl bg-gray-800 w-2/3 mt-20 mb-20 pb-10 animation invisible hidden">
<h3 class="pt-5">Don't require password</h3>
<h4>If you don't want to type in your password every time you launch Authme.</h4>
<h3 data-loc class="pt-5">Don't require password</h3>
<h4 data-loc>If you don't want to type in your password every time you launch Authme.</h4>
<button onclick="noPassword()" class="buttoni mb-7">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg>
Confirm
<span data-loc>Confirm</span>
</button>
<hr />
<h3>Window capture</h3>
<h4>Allows screenshots and screen capture. You can record or screenshot the app until you restart Authme.</h4>
<h3 data-loc>Window capture</h3>
<h4 data-loc>Allows screenshots and screen capture. You can record or screenshot the app until you restart Authme.</h4>
<div class="flex justify-center items-center w-72 h-[68px] bg-white mx-auto rounded-full">
<div class="relative inline-block w-10 mr-2 align-middle select-none bg-gray-900 border-2 border-gray-900 rounded-full">
<input onclick="toggleWindowCapture()" id="tgl0" type="checkbox" class="toggle checked:bg-white outline-none focus:outline-none right-5 duration-200 ease-in absolute block w-4 h-4 rounded-full top-1 bg-black appearance-none cursor-pointer" />
Expand Down
7 changes: 6 additions & 1 deletion app/landing/src/js/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { aes, password } = require("@levminer/lib")
const { aes, password, localization } = require("@levminer/lib")
const logger = require("@levminer/lib/logger/renderer")
const { app, dialog } = require("@electron/remote")
const { ipcRenderer: ipc } = require("electron")
Expand All @@ -18,6 +18,11 @@ window.onerror = (error) => {
*/
logger.getWindow("landing")

/**
* Localization
*/
localization.localize("landing")

/**
* If running in development
*/
Expand Down

0 comments on commit 30b33c5

Please sign in to comment.