Skip to content

Commit

Permalink
Remove application page animations
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Nov 15, 2021
1 parent 134b7ea commit 33f14ff
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 87 deletions.
2 changes: 0 additions & 2 deletions app/application/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
<title>Authme</title>
<!-- css -->
<link rel="stylesheet" href="../.././src/dragonfly.css" />
<link rel="stylesheet" href="../.././src/animate.css" />
<link rel="stylesheet" href="../../src/tailwind.css" />
<link rel="stylesheet" href="./src/css/index.css" />
<!-- js -->
<script defer src="../.././src/scrollout.js"></script>
<script defer src="./src/js/index.js"></script>
<script defer src="./src/js/save.js"></script>
<!-- favicon -->
Expand Down
57 changes: 0 additions & 57 deletions app/application/src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,63 +594,6 @@ const search = () => {
}
}

// ? block animations
try {
setTimeout(() => {
ScrollOut({
onShown(el) {
el.classList.add("animate__animated", "animate__zoomIn", "animate__faster")
},
})
}, 500)
} catch (error) {
logger.error("Block animations failed")
}

// ? animations
let focus = true

let diva0
let diva1

const animations = () => {
if (focus === true) {
setTimeout(() => {
const center = document.querySelector(".content")
center.classList.add("animate__animated", "animate__fadeIn")

const h1 = document.querySelector(".h1")
h1.classList.add("animate__animated", "animate__slideInDown")

const choose = document.querySelector("#choose")
choose.classList.add("animate__animated", "animate__slideInDown")

const starting = document.querySelector("#starting")
starting.classList.add("animate__animated", "animate__slideInDown")

const search = document.querySelector("#search")
search.classList.add("animate__animated", "animate__slideInDown")

if (clear == true) {
diva0 = document.querySelector(".diva0")
diva0.classList.add("animate__animated", "animate__zoomIn")

diva1 = document.querySelector(".diva1")
diva1.classList.add("animate__animated", "animate__zoomIn")
}

setTimeout(() => {
if (clear == true) {
diva0.classList.remove("animate__animated", "animate__zoomIn")
diva1.classList.remove("animate__animated", "animate__zoomIn")
}
}, 1500)

focus = false
}, 150)
}
}

// ? focus search bar
const focusSearch = () => {
setTimeout(() => {
Expand Down
8 changes: 1 addition & 7 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ let shortcuts = false
let reload = false
let tray_minimized = false
let update_seen = false
let animations_showed = false

// ? development
let dev = false
Expand Down Expand Up @@ -685,12 +684,6 @@ const createWindow = () => {
})

window_application.on("focus", () => {
if (animations_showed === false) {
window_application.webContents.executeJavaScript("animations()")

animations_showed = true
}

window_application.webContents.executeJavaScript("focusSearch()")
})

Expand Down Expand Up @@ -923,6 +916,7 @@ ipc.on("disable_capture", () => {
window_application.setContentProtection(true)
window_import.setContentProtection(true)
window_export.setContentProtection(true)
window_application.setContentProtection(false)

logger.log("Screen capture disabled")
})
Expand Down
7 changes: 0 additions & 7 deletions src/animate.css

This file was deleted.

14 changes: 0 additions & 14 deletions src/scrollout.js

This file was deleted.

0 comments on commit 33f14ff

Please sign in to comment.