Skip to content

Commit

Permalink
Remove popups from settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Mar 29, 2022
1 parent 9ba5ed1 commit 710f2c4
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 190 deletions.
107 changes: 0 additions & 107 deletions app/settings/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,113 +92,6 @@ <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">
<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>

<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>
Manual 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>
</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>

<!-- auto update -->
<div class="bg-popup-blue autoupdate 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>

<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>

<!-- info -->
<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>

<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>
</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>

<!-- header -->
<div id="header" class="mx-auto mt-40 w-3/5 rounded-2xl bg-gray-700 text-center">
<img src="../../img/header.png" class="relative top-5 h-16 w-16" />
Expand Down
69 changes: 0 additions & 69 deletions app/settings/src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -718,38 +718,13 @@ const save = () => {
fs.writeFileSync(path.join(folder_path, "settings", "settings.json"), convert.fromJSON(settings))
}

/**
* Feedback buttons
*/
const rateAuthme = () => {
ipc.send("rateAuthme")
}

const starAuthme = () => {
ipc.send("starAuthme")
}

/**
* Send feedback
*/
const provideFeedback = () => {
ipc.send("provideFeedback")
}

/**
* Hide info dialog
*/
const showInfo = () => {
document.querySelector(".info").style.display = "block"
}

/**
* Hide update dialog
*/
const showUpdate = () => {
document.querySelector(".update").style.display = "block"
}

/**
* Open Authme folder
*/
Expand Down Expand Up @@ -968,50 +943,6 @@ window.addEventListener("click", (event) => {
}
})

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

/**
* Download manual update
*/
const manualUpdate = () => {
ipc.send("manualUpdate")
}

/**
* Display auto update download info
*/
ipc.on("updateInfo", (event, info) => {
document.querySelector("#updateText").textContent = `${lang.popup.downloading_update} ${info.download_percent}% - ${info.download_speed}MB/s (${info.download_transferred}MB/${info.download_total}MB)`
})

/**
* Display auto update popup if update available
*/
const updateAvailable = () => {
document.querySelector(".autoupdate").style.display = "block"
}

/**
* Display restart button if download finished
*/
const updateDownloaded = () => {
document.querySelector("#updateText").textContent = lang.popup.update_downloaded
document.querySelector("#updateButton").style.display = "block"
document.querySelector("#updateClose").style.display = "block"
}

/**
* Restart app after the download finished
*/
const updateRestart = () => {
ipc.send("updateRestart")
}

/**
* Toggle import screen capture
*/
Expand Down
7 changes: 0 additions & 7 deletions languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,6 @@ module.exports = {
"Experimental",
"Feedback",
"Version",
"New Authme version available. Starting the update...",
"Restart",
"Release notes",
"Enjoying Authme?",
"Rate on Microsoft Store",
"Star on GitHub",
"Provide feedback",
"Settings",
"You can configure the app settings here.",
"Close window",
Expand Down
7 changes: 0 additions & 7 deletions languages/hu.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,6 @@ module.exports = {
"Kísérletek",
"Visszajelzés",
"Verzió",
"Új Authme verzió elérhető. Frissítés kezdése...",
"Újraindítás",
"Újdonságok",
"Tetszik az Authme?",
"Értékelés a Microsoft Store-on",
"Csillagozás a GitHub-on",
"Visszajelzés",
"Beállítások",
"Itt tudod szerkeszteni a beállításokat.",
"Ablak bezárása",
Expand Down

0 comments on commit 710f2c4

Please sign in to comment.