Skip to content

Commit

Permalink
Authme 3.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer authored Oct 11, 2022
1 parent 4233997 commit 6e83971
Show file tree
Hide file tree
Showing 7 changed files with 132 additions and 261 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
### Authme 3.3.3 (2022. August. 9.)
### Authme 3.3.4 (2022. September 13.)

- [[dff82af](https://github.com/Levminer/authme/commit/dff82af)] Update electron #230 (2022-09-12)
- [[94e0c5a](https://github.com/Levminer/authme/commit/94e0c5a)] Bump version and small updates (2022-09-09)
- [[8789b60](https://github.com/Levminer/authme/commit/8789b60)] Update packages and changelog (2022-08-31)

### Authme 3.3.3 (2022. August 9.)

- [[550d870](https://github.com/Levminer/authme/commit/550d870)] Update screenshots and translations (2022-08-08)
- [[f4044ed](https://github.com/Levminer/authme/commit/f4044ed)] Send settings file on crash (2022-08-08)
Expand Down
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,18 @@
[![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

- Help translate Authme: [Translation](https://github.com/Levminer/authme/blob/main/.github/CONTRIBUTING.md#translation)
- You can translate on Crowdin to: [Crowdin](https://crowdin.com/project/authme-2fa)
## Migration

Tutorial on how to migrate to Authme 4 from Authme 3:

1. Inside Authme: Top menu > Tools > Export.
1. Click confirm, and export the .authme file.
1. Go to the settings: Top menu > File > Settings.
1. Inside the general options: Click Clear data and confirm.
1. Now uninstall Authme from you computer.
1. Download [Authme 4](https://authme.levminer.com/#downloads) and install it.
1. Go through the getting started wizard.
1. In the codes page select Choose file and choose the .authme file you saved.

## Contributing and development

Expand Down
136 changes: 36 additions & 100 deletions app/codes/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,110 +21,60 @@ <h5 class="build-content m-0 mx-3 flex flex-row text-center font-bold">You are r
</div>
</div>

<!-- manual update -->
<div class="bg-popup-blue update hidden w-full font-bold text-white">
<div class="container mx-auto flex flex-row items-center justify-between px-6 py-4">
<!-- deprecation notice -->
<div class="bg-popup-magenta deprecationNotice w-full font-bold text-white">
<div class="container mx-auto mb-5 flex flex-row items-center justify-between px-6 py-4">
<div class="flex">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-2 h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 13l-3 3m0 0l-3-3m3 3V8m0 13a9 9 0 110-18 9 9 0 010 18z" />
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-2.5" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>

<p class="relative top-3 mx-3 flex flex-row">
New Authme version available. Please update your app!
<button type="button" onclick="manualUpdate()" class="relative -top-2.5 mr-2 ml-3 cursor-pointer rounded-full border-2 border-white bg-white py-1 px-3 text-center text-base font-bold text-black transition duration-200 ease-in hover:bg-transparent hover:text-white">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" />
</svg>
Download update
</button>
<button type="button" onclick="releaseNotes()" class="relative -top-2.5 cursor-pointer rounded-full border-2 border-white bg-white py-1 px-3 text-center text-base font-bold text-black transition duration-200 ease-in hover:bg-transparent hover:text-white">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z" />
</svg>
Release notes
</button>
</p>
<p class="relative mx-3 flex flex-row justify-center">Authme 4 is releasing on November 8., this means there is no update coming to Authme 3. You will see an upgrade banner soon.</p>
</div>
<a onclick="this.parentElement.style.display='none'" class="transform cursor-pointer rounded-md p-1 transition-colors duration-200 hover:text-gray-800">
<a onclick="this.parentElement.style.display='none'" class="relative transform cursor-pointer rounded-md p-1 transition-colors duration-200 hover:text-gray-800">
<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="M6 18L18 6M6 6l12 12" />
</svg>
</a>
</div>
</div>

<!-- auto update -->
<div class="bg-popup-blue autoupdate hidden w-full font-bold text-white">
<!-- deprecation -->
<div class="bg-popup-magenta deprecation hidden w-full font-bold text-white">
<div class="container mx-auto flex flex-row items-center justify-between px-6 py-4">
<div class="flex">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-2 h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 13l-3 3m0 0l-3-3m3 3V8m0 13a9 9 0 110-18 9 9 0 010 18z" />
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-7" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>

<div class="relative top-3 mx-3 flex flex-row">
<p id="updateText" class="mr-3" data-loc>New Authme version available. Starting the update...</p>
<button type="button" id="updateButton" onclick="updateRestart()" class="relative -top-2.5 mr-3 hidden cursor-pointer rounded-full border-2 border-white bg-white py-1 px-3 text-center text-base font-bold text-black transition duration-200 ease-in hover:bg-transparent hover:text-white">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
</svg>
<span data-loc>Restart</span>
</button>
<button type="button" onclick="releaseNotes()" class="relative -top-2.5 cursor-pointer rounded-full border-2 border-white bg-white py-1 px-3 text-center text-base font-bold text-black transition duration-200 ease-in hover:bg-transparent hover:text-white">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z" />
</svg>
<span data-loc>Release notes</span>
</button>
</div>
</div>
<a onclick="this.parentElement.style.display='none'" id="updateClose" class="hidden transform cursor-pointer rounded-md p-1 transition-colors duration-200 hover:text-gray-800">
<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="M6 18L18 6M6 6l12 12" />
</svg>
</a>
</div>
</div>
<div class="relative top-3 mx-3 mb-5 flex flex-row flex-wrap">
Authme 3 is deprecated. Please upgrade to Authme 4!<br />
This is a major release so there are some minor breaking changes, please follow the migration guide.<br />
These are the notable changes: New design, hardware authentication, faster and better app!
<div class="flex flex-wrap gap-1 pt-5 pl-5">
<button type="button" onclick="migrationGuide()" class="relative -top-1.5 mr-2 ml-3 cursor-pointer rounded-full border-2 border-white bg-white py-1 px-3 text-center text-base font-bold text-black transition duration-200 ease-in hover:bg-transparent hover:text-white">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
</svg>
Migration guide
</button>

<!-- rate authme -->
<div class="bg-popup-yellow info hidden w-full font-bold text-white">
<div class="container mx-auto flex flex-row items-center justify-between px-6 py-4">
<div class="flex">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-2 h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
<button type="button" onclick="downloadUpdate()" class="relative -top-1.5 mr-2 ml-3 cursor-pointer rounded-full border-2 border-white bg-white py-1 px-3 text-center text-base font-bold text-black transition duration-200 ease-in hover:bg-transparent hover:text-white">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" />
</svg>
Download
</button>

<p class="relative top-3 mx-3 flex flex-row">
<span data-loc>Enjoying Authme?</span>
<button type="button" onclick="rateAuthme()" class="relative -top-2.5 ml-3 cursor-pointer rounded-full border-2 border-white bg-white py-1 px-3 text-center text-base font-bold text-black transition duration-200 ease-in hover:bg-transparent hover:text-white">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" />
</svg>
<span data-loc>Rate on Microsoft Store</span>
</button>

<button type="button" onclick="starAuthme()" class="relative -top-2.5 mr-2 ml-3 cursor-pointer rounded-full border-2 border-white bg-white py-1 px-3 text-center text-base font-bold text-black transition duration-200 ease-in hover:bg-transparent hover:text-white">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z" />
</svg>
<span data-loc>Star on GitHub</span>
</button>

<button type="button" onclick="provideFeedback()" class="relative -top-2.5 cursor-pointer rounded-full border-2 border-white bg-white py-1 px-3 text-center text-base font-bold text-black transition duration-200 ease-in hover:bg-transparent hover:text-white">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M4 21v-13a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v6a3 3 0 0 1 -3 3h-9l-4 4"></path>
<line x1="8" y1="9" x2="16" y2="9"></line>
<line x1="8" y1="13" x2="14" y2="13"></line>
</svg>
<span data-loc>Provide feedback</span>
</button>
</p>
<button type="button" onclick="releaseNotes()" class="relative -top-1.5 mr-2 ml-3 cursor-pointer rounded-full border-2 border-white bg-white py-1 px-3 text-center text-base font-bold text-black transition duration-200 ease-in hover:bg-transparent hover:text-white">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z" />
</svg>
Release notes
</button>
</div>
</div>
</div>
<a onclick="this.parentElement.style.display='none'" class="transform cursor-pointer rounded-md p-1 transition-colors duration-200 hover:text-gray-800">
<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="M6 18L18 6M6 6l12 12" />
</svg>
</a>
</div>
</div>

Expand Down Expand Up @@ -220,19 +170,5 @@ <h4 data-loc>Save your 2FA codes to your computer for future use.</h4>
</div>
<!-- codes -->
</div>
<!-- info bar -->
<div class="infoBar sticky bottom-5 z-10 mx-auto hidden w-max">
<div class="bg-popup-magenta flex items-center justify-center rounded-2xl p-2 py-3 text-white shadow">
<svg xmlns="http://www.w3.org/2000/svg" class="mx-3 h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
<h5 class="m-0 text-center"><span class="bar">Thanks for using Authme!</span> <a class="barLink text-lg font-bold text-white duration-200 ease-in hover:text-black" href="#" onclick="barLink()">Feedback</a></h5>
<a onclick="this.parentElement.style.display='none'" class="relative top-0.5 mx-3 cursor-pointer rounded-md transition-colors duration-200 hover:text-gray-800">
<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="M6 18L18 6M6 6l12 12" />
</svg>
</a>
</div>
</div>
</body>
</html>
88 changes: 21 additions & 67 deletions app/codes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,6 @@ const copyCode = (id) => {
* Search codes
*/
const search = () => {
document.querySelector(".infoBar").style.display = "none"

const search = document.querySelector("#search")
const input = search.value.toLowerCase()
let i = 0
Expand Down Expand Up @@ -569,7 +567,7 @@ const showUpdate = () => {
* Show info popup
*/
const showInfo = () => {
document.querySelector(".info").style.display = "block"
return "Removed"
}

/**
Expand Down Expand Up @@ -807,13 +805,6 @@ window.addEventListener("click", (event) => {
}
})

/**
* Display release notes
*/
const releaseNotes = () => {
ipc.send("releaseNotes")
}

/**
* Download manual update
*/
Expand Down Expand Up @@ -851,67 +842,30 @@ const updateRestart = () => {
ipc.send("updateRestart")
}

/* info bar */
const random = Math.floor(Math.random() * 3)

const infoBar = async () => {
const { opens } = await ipc.invoke("statistics")
const bar = document.querySelector(".bar")
const bar_link = document.querySelector(".barLink")
const info_bar = document.querySelector(".infoBar")

if (opens % 4 === 0) {
switch (random) {
case 0:
info_bar.style.display = "flex"
bar.textContent = lang.info_bar.feedback
bar_link.textContent = lang.info_bar.feedback_link
break

case 1:
info_bar.style.display = "flex"
bar.textContent = lang.info_bar.rate
bar_link.textContent = lang.info_bar.rate_link
break

case 2:
info_bar.style.display = "flex"
bar.textContent = lang.info_bar.translate
bar_link.textContent = lang.info_bar.translate_link
break

default:
info_bar.style.display = "flex"
break
}
/* Focus search with ctrl+k */
document.addEventListener("keypress", (event) => {
if (event.ctrlKey === true && event.code === "KeyK") {
focusSearch()
}
}

infoBar()
})

const barLink = () => {
switch (random) {
case 0:
provideFeedback()
break
/* Deprecation notice */
const date = new Date()
const release = new Date("2022-11-10")

case 1:
rateAuthme()
break
if (date > release) {
document.querySelector(".deprecation").style.display = "block"
document.querySelector(".deprecationNotice").style.display = "none"
}

case 2:
shell.openExternal("https://github.com/Levminer/authme/blob/dev/.github/CONTRIBUTING.md#translation")
break
const downloadUpdate = () => {
shell.openExternal("https://authme.levminer.com/#downloads")
}

default:
provideFeedback()
break
}
const releaseNotes = () => {
shell.openExternal("https://github.com/Levminer/authme/releases/latest")
}

/* Focus search with ctrl+k */
document.addEventListener("keypress", (event) => {
if (event.ctrlKey === true && event.code === "KeyK") {
focusSearch()
}
})
const migrationGuide = () => {
shell.openExternal("https://github.com/Levminer/authme#migration")
}
Loading

0 comments on commit 6e83971

Please sign in to comment.