From 17769df13d3e3709bb18c7b1c9544da79499a895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C5=91rik=20Levente?= <33373714+Levminer@users.noreply.github.com> Date: Tue, 14 Jun 2022 14:58:41 +0200 Subject: [PATCH] authme 3.3.1 --- .gitignore | 1 + .tailwindrc.js | 3 + CHANGELOG.md | 1 + README.md | 14 +- app/{application/src/css => codes}/index.css | 0 app/{application => codes}/index.html | 4 +- app/{application/src/js => codes}/index.js | 68 +- app/edit/index.html | 2 +- app/edit/{src/js => }/index.js | 0 app/export/index.html | 27 +- app/export/{src/js => }/index.js | 0 app/import/{src/js => functions}/images.js | 0 app/import/{src/js => functions}/manual.js | 0 app/import/{src/js => functions}/screen.js | 0 app/import/{src/js => functions}/webcam.js | 0 app/import/index.html | 4 +- app/import/index.js | 8 +- app/landing/index.html | 12 +- app/settings/{src/css => }/index.css | 0 app/settings/index.html | 14 +- app/settings/index.js | 341 ---- crowdin.yml | 3 - img/traymenu.png | Bin 461 -> 0 bytes languages/en.js | 15 +- languages/hu.js | 9 +- lib/aes.js | 2 + lib/logger/main/index.js | 25 +- lib/logger/renderer/index.js | 1 - lib/types.d.ts | 92 + lib/types.js | 91 - main.js | 176 +- package-lock.json | 1495 ++++++----------- package.json | 39 +- screenshots/application.png | Bin 53598 -> 53232 bytes screenshots/export.png | Bin 108773 -> 72434 bytes screenshots/old/screenshot-2.1.2.png | Bin 28701 -> 0 bytes screenshots/old/screenshot-2.4.2.png | Bin 22623 -> 0 bytes screenshots/old/screenshot-2.5.0.png | Bin 14862 -> 0 bytes screenshots/old/screenshot-2.7.1.png | Bin 18520 -> 0 bytes screenshots/old/screenshot-2.7.2.png | Bin 16429 -> 0 bytes screenshots/old/screenshot-2.7.4.png | Bin 15538 -> 0 bytes screenshots/old/screenshot-3.1.1.png | Bin 16368 -> 0 bytes styles/global.css | 5 +- styles/global.scss | 4 - styles/{tailwind.scss => index.css} | 4 + .../{layout/animation.scss => animation.css} | 0 .../components.scss => components.css} | 31 +- .../{layout/layout.scss => layout.css} | 0 .../{layout/titlebar.scss => titlebar.css} | 0 styles/tailwind.css | 2 +- tests/main.test.js | 81 + 51 files changed, 905 insertions(+), 1669 deletions(-) rename app/{application/src/css => codes}/index.css (100%) rename app/{application => codes}/index.html (99%) rename app/{application/src/js => codes}/index.js (90%) rename app/edit/{src/js => }/index.js (100%) rename app/export/{src/js => }/index.js (100%) rename app/import/{src/js => functions}/images.js (100%) rename app/import/{src/js => functions}/manual.js (100%) rename app/import/{src/js => functions}/screen.js (100%) rename app/import/{src/js => functions}/webcam.js (100%) rename app/settings/{src/css => }/index.css (100%) delete mode 100644 crowdin.yml delete mode 100644 img/traymenu.png delete mode 100644 lib/types.js delete mode 100644 screenshots/old/screenshot-2.1.2.png delete mode 100644 screenshots/old/screenshot-2.4.2.png delete mode 100644 screenshots/old/screenshot-2.5.0.png delete mode 100644 screenshots/old/screenshot-2.7.1.png delete mode 100644 screenshots/old/screenshot-2.7.2.png delete mode 100644 screenshots/old/screenshot-2.7.4.png delete mode 100644 screenshots/old/screenshot-3.1.1.png delete mode 100644 styles/global.scss rename styles/{tailwind.scss => index.css} (96%) rename styles/partials/{layout/animation.scss => animation.css} (100%) rename styles/partials/{components/components.scss => components.css} (85%) rename styles/partials/{layout/layout.scss => layout.css} (100%) rename styles/partials/{layout/titlebar.scss => titlebar.css} (100%) create mode 100644 tests/main.test.js diff --git a/.gitignore b/.gitignore index a464d3a8..a23ef686 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ build dist build.json log.txt +tests/**.png diff --git a/.tailwindrc.js b/.tailwindrc.js index fac90862..fd11c8ce 100644 --- a/.tailwindrc.js +++ b/.tailwindrc.js @@ -34,6 +34,9 @@ module.exports = { screens: { lg: "1400px", md: "200px", + "3xl": "2000px", + + small: { max: "1650px" }, }, stroke: (theme) => ({ diff --git a/CHANGELOG.md b/CHANGELOG.md index eb40efe0..4a5c973c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### Authme 3.3.0 (2022. May 10.) +- [[ff1fcbf](https://github.com/Levminer/authme/commit/ff1fcbf)] Update changelog (2022-05-08) - [[27aa58b](https://github.com/Levminer/authme/commit/27aa58b)] Settings cleanup (2022-05-07) - [[b887d04](https://github.com/Levminer/authme/commit/b887d04)] Don't send analytics in dev mode #209 (2022-05-07) - [[f3a3909](https://github.com/Levminer/authme/commit/f3a3909)] Request from main process #208 (2022-05-07) diff --git a/README.md b/README.md index 96bf9df6..036f4ff0 100644 --- a/README.md +++ b/README.md @@ -24,26 +24,22 @@ -## Latest Release +## Downloads (Release) - Latest release version for users that want a stable and polished experience. [![Latest release](https://img.shields.io/github/package-json/v/levminer/authme/main?label=Release)](https://tooomm.github.io/github-release-stats/?username=Levminer&repository=authme) -[![Windows Download](https://img.shields.io/badge/Windows-download-brightgreen)](https://api.levminer.com/api/v1/authme/release/windows) -[![Linux Download](https://img.shields.io/badge/Linux-download-brightgreen)](https://api.levminer.com/api/v1/authme/release/linux) -[![Mac Download](https://img.shields.io/badge/Mac-download-brightgreen)](https://api.levminer.com/api/v1/authme/release/mac) +[![Download](https://img.shields.io/badge/Windows,%20Linux,%20macOS-download-brightgreen)](https://authme.levminer.com/#downloads) [![Updated](https://img.shields.io/github/last-commit/levminer/authme/main?color=yellowgreen&label=Updated)](https://github.com/Levminer/authme/releases) -- Also available on: [Microsoft Store](https://link.levminer.com/authme-ms-store), [winget](https://winstall.app/apps/Levminer.Authme) +- Also available on: [Microsoft Store](https://link.levminer.com/authme-ms-store), [Snapcraft](https://snapcraft.io/authme), [winget](https://winstall.app/apps/Levminer.Authme) -## Latest Alpha +## Downloads (Alpha) - Latest alpha version for users that want to try out new features early. [![Latest alpha](https://img.shields.io/github/package-json/v/levminer/authme/dev?label=Alpha&color=blue)](https://tooomm.github.io/github-release-stats/?username=Levminer&repository=authme) -[![Windows Download](https://img.shields.io/badge/Windows-download-brightgreen)](https://api.levminer.com/api/v1/authme/alpha/windows) -[![Linux Download](https://img.shields.io/badge/Linux-download-brightgreen)](https://api.levminer.com/api/v1/authme/alpha/linux) -[![Mac Download](https://img.shields.io/badge/Mac-download-brightgreen)](https://api.levminer.com/api/v1/authme/alpha/mac) +[![Download](https://img.shields.io/badge/Windows,%20Linux,%20macOS-download-brightgreen)](https://authme.levminer.com/#downloads-alpha) [![Updated](https://img.shields.io/github/last-commit/levminer/authme/dev?color=yellowgreen&label=Updated)](https://github.com/Levminer/authme/actions/workflows/alpha-artifacts.yml) ## Translating diff --git a/app/application/src/css/index.css b/app/codes/index.css similarity index 100% rename from app/application/src/css/index.css rename to app/codes/index.css diff --git a/app/application/index.html b/app/codes/index.html similarity index 99% rename from app/application/index.html rename to app/codes/index.html index 0e04c3cb..2862cec2 100644 --- a/app/application/index.html +++ b/app/codes/index.html @@ -5,11 +5,11 @@ - + + - diff --git a/app/application/src/js/index.js b/app/codes/index.js similarity index 90% rename from app/application/src/js/index.js rename to app/codes/index.js index 6b648ed0..02fcacc8 100644 --- a/app/application/src/js/index.js +++ b/app/codes/index.js @@ -211,23 +211,24 @@ const generateCodeElements = (data) => { if (codes_description === false) { element.innerHTML = ` -
-
-
-

${lang.text.name}

-

${lang.text.name}

+
+
+
+

${lang.text.name}

-
-

${lang.text.code}

-

${lang.text.code}

+
+

${lang.text.code}

-
-

${lang.text.time}

-

${lang.text.time}

+
+

${lang.text.time}

-
-
- ` + ` } // set div in html @@ -284,6 +286,7 @@ const generateCodeElements = (data) => { const code = document.querySelector(`#code${i}`) const time = document.querySelector(`#time${i}`) const description = document.querySelector(`#description${i}`) + const progress = document.querySelector(`#progress${i}`) // add to query query.push(`${issuers[i].toLowerCase().trim()} ${names[i].toLowerCase().trim()}`) @@ -304,6 +307,10 @@ const generateCodeElements = (data) => { // remaining time const remaining_time = 30 - Math.floor((new Date(Date.now()).getTime() / 1000.0) % 30) + // progress bar + const value = remaining_time * (100 / 30) + progress.style.width = `${value}%` + // set content name.textContent = issuers[i] code.textContent = token @@ -346,6 +353,7 @@ const refreshCodes = (secrets) => { for (let i = 0; i < secrets.length; i++) { const code = document.querySelector(`#code${i}`) const time = document.querySelector(`#time${i}`) + const progress = document.querySelector(`#progress${i}`) // generate token const token = speakeasy.totp({ @@ -356,6 +364,10 @@ const refreshCodes = (secrets) => { // generate time const remaining = 30 - Math.floor((new Date(Date.now()).getTime() / 1000.0) % 30) + // progress bar + const value = remaining * (100 / 30) + progress.style.width = `${value}%` + // set content code.textContent = token time.textContent = remaining.toString() diff --git a/app/edit/index.html b/app/edit/index.html index e752662d..722cdc4c 100644 --- a/app/edit/index.html +++ b/app/edit/index.html @@ -5,7 +5,7 @@ - + diff --git a/app/edit/src/js/index.js b/app/edit/index.js similarity index 100% rename from app/edit/src/js/index.js rename to app/edit/index.js diff --git a/app/export/index.html b/app/export/index.html index 2b3f6967..89487d4e 100644 --- a/app/export/index.html +++ b/app/export/index.html @@ -5,7 +5,7 @@ - + @@ -48,31 +48,36 @@

Your saved codes can be exported here. Ideal if you want to use you