Skip to content

Commit

Permalink
Remove close window buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Jun 25, 2022
1 parent 970c728 commit 6277135
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 86 deletions.
8 changes: 1 addition & 7 deletions app/edit/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,10 @@ <h5 class="build-content m-0 mx-3 flex flex-row text-center font-bold">You are r
</div>

<!-- header -->
<div class="mx-auto mt-40 w-3/5 rounded-2xl bg-gray-700 text-center">
<div class="mx-auto mt-40 w-3/5 rounded-2xl bg-gray-700 pb-1 text-center">
<img src="../../img/header.png" class="relative top-5 h-16 w-16" />
<h2 data-loc>Edit codes</h2>
<h4 data-loc>You can edit or delete your existing codes and you can add more codes.</h4>
<button class="buttoni mb-6" onclick="hide()">
<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="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
<span data-loc>Close window</span>
</button>
</div>

<!-- content -->
Expand Down
7 changes: 0 additions & 7 deletions app/edit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -623,13 +623,6 @@ const loadCodes = async () => {
}
}

/**
* Hide window
*/
const hide = () => {
ipc.invoke("toggleToolsWindow")
}

/**
* Send reload events
*/
Expand Down
8 changes: 1 addition & 7 deletions app/export/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,10 @@ <h5 class="build-content m-0 mx-3 flex flex-row text-center font-bold">You are r
</div>

<!-- header -->
<div class="mx-auto mt-40 w-3/5 rounded-2xl bg-gray-700 text-center">
<div class="mx-auto mt-40 w-3/5 rounded-2xl bg-gray-700 pb-1 text-center">
<img src="../../img/header.png" class="relative top-5 h-16 w-16" />
<h2>Export</h2>
<h4 data-loc>You can export the 2FA codes you saved.</h4>
<button class="buttoni mb-6" onclick="hide()">
<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="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
<span data-loc>Close window</span>
</button>
</div>

<!-- content -->
Expand Down
7 changes: 0 additions & 7 deletions app/export/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,6 @@ const saveQrCodes = () => {
})
}

/**
* Hide window
*/
const hide = () => {
ipc.invoke("toggleToolsWindow")
}

/**
* No saved codes found
*/
Expand Down
8 changes: 1 addition & 7 deletions app/import/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,10 @@ <h5 class="build-content m-0 mx-3 flex flex-row text-center font-bold">You are r
</div>

<!-- header -->
<div class="mx-auto mt-40 w-3/5 rounded-2xl bg-gray-700 text-center">
<div class="mx-auto mt-40 w-3/5 rounded-2xl bg-gray-700 pb-1 text-center">
<img src="../../img/header.png" class="relative top-5 h-16 w-16" />
<h2>Import</h2>
<h4 data-loc>You can import your 2FA codes here, see supported QR codes for more information.</h4>
<button class="buttoni mb-6" onclick="hide()">
<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="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
<span data-loc>Close window</span>
</button>
</div>

<!-- content -->
Expand Down
7 changes: 0 additions & 7 deletions app/import/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,6 @@ const examplesLink = () => {
shell.openExternal("https://docs.authme.levminer.com/#/examples")
}

/**
* Hide window
*/
const hide = () => {
ipc.invoke("toggleToolsWindow")
}

/**
* Build number
*/
Expand Down
8 changes: 1 addition & 7 deletions app/settings/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,10 @@ <h5 class="build-content m-0 mx-3 flex flex-row text-center font-bold">You are r
</div>

<!-- header -->
<div id="header" class="mx-auto mt-40 w-3/5 rounded-2xl bg-gray-700 text-center">
<div id="header" class="mx-auto mt-40 w-3/5 rounded-2xl bg-gray-700 pb-1 text-center">
<img src="../../img/header.png" class="relative top-5 h-16 w-16" />
<h2 data-loc>Settings</h2>
<h4 data-loc>You can configure the app settings here.</h4>
<button class="buttoni mb-6" onclick="hide()">
<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="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
<span data-loc>Close window</span>
</button>
</div>

<!-- settings -->
Expand Down
7 changes: 0 additions & 7 deletions app/settings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -730,13 +730,6 @@ const githubIssues = () => {
shell.openExternal("https://github.com/Levminer/authme/issues")
}

/**
* Hide window
*/
const hide = () => {
ipc.send("toggleSettings")
}

/**
* Menu
*/
Expand Down
4 changes: 0 additions & 4 deletions languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ module.exports = {
"Version",
"Settings",
"You can configure the app settings here.",
"Close window",
"Launch on startup",
"Start Authme after your computer started. Authme will start on the system tray.",
"Close app to tray",
Expand Down Expand Up @@ -205,7 +204,6 @@ module.exports = {

"import": [
"You can import your 2FA codes here, see supported QR codes for more information.",
"Close window",
"Supported QR codes",
"List of the currently supported QR codes. You can import from more types at the same time.",
"Examples",
Expand Down Expand Up @@ -254,7 +252,6 @@ module.exports = {

"export": [
"You can export the 2FA codes you saved.",
"Close window",
"Export codes",
"Your saved codes can be exported here. Ideal if you want to use your codes elsewhere or for a security backup.",
"Confirm",
Expand All @@ -275,7 +272,6 @@ module.exports = {
"edit": [
"Edit codes",
"You can edit or delete your existing codes and you can add more codes.",
"Close window",
"Restore",
"You can restore the latest save. If you load your codes below it will overwrite the current save!",
"Restore",
Expand Down
4 changes: 0 additions & 4 deletions languages/hu.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ module.exports = {
"Verzió",
"Beállítások",
"Itt tudod szerkeszteni a beállításokat.",
"Ablak bezárása",
"Autómatikus indítás",
"Az Authme elindul a számítógépeddel együtt. Az alkalmazás a tálcán fog indulni.",
"Tálcára kicsinyítés",
Expand Down Expand Up @@ -205,7 +204,6 @@ module.exports = {

"import": [
"Itt tudod importálni a 2FA kódjaidat, több információért nézd meg a támogatott QR-kódokat.",
"Ablak bezárása",
"Támogatott QR-kódok",
"A jelenleg támogatott QR-kódok listája. Több féle típusból is importálhatsz egyszerre.",
"Példák",
Expand Down Expand Up @@ -254,7 +252,6 @@ module.exports = {

"export": [
"Itt exportálhatod az elmentett 2FA kódjaidat.",
"Ablak bezárása",
"Kódok exportálása",
"Az elmentett kódjaidat itt tudod exportálni. Ideális ha máshol is akarod használni a kódjaidat vagy egy biztonsági mentéshez.",
"Megerősítés",
Expand All @@ -275,7 +272,6 @@ module.exports = {
"edit": [
"Kódok szerkesztése",
"Itt tudod szerkeszteni vagy törölni a mentett kódjaidat vagy új kódokat hozzáadni.",
"Ablak bezárása",
"Visszaállítás",
"Vissza tudod állítani az előző mentést. Ha lentebb betöltöd a kódjaidat az felül fogja írni a jelenlegi mentést.",
"Visszaállítás",
Expand Down
33 changes: 12 additions & 21 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ const createWindows = () => {
window_security.on("close", () => {
app.exit()

logger.log("Application exited from landing window")
logger.log("Application exited from security window")
})

window_codes.on("close", (event) => {
Expand All @@ -655,7 +655,6 @@ const createWindows = () => {
logger.log("Application exited from application window")
} else {
event.preventDefault()

window_codes.hide()

codes_shown = false
Expand All @@ -665,35 +664,27 @@ const createWindows = () => {
}
}

logger.log("Application closed")
logger.log("Application window closed")
})

window_settings.on("close", (event) => {
if (dev === true) {
app.quit()
} else {
event.preventDefault()

window_settings.hide()
event.preventDefault()
window_settings.hide()
window_codes.focus()

settings_shown = false
}
settings_shown = false

logger.log("Settings closed")
logger.log("Settings window closed")
})

window_tools.on("close", (event) => {
if (dev === true) {
app.quit()
} else {
event.preventDefault()

window_tools.hide()
event.preventDefault()
window_tools.hide()
window_codes.focus()

tools_shown = false
}
tools_shown = false

logger.log("Edit closed")
logger.log("Tools window closed")
})

/**
Expand Down
2 changes: 1 addition & 1 deletion styles/tailwind.css

Large diffs are not rendered by default.

0 comments on commit 6277135

Please sign in to comment.