Skip to content

Commit

Permalink
positive
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoTheThird committed Mar 21, 2022
1 parent e5e8bb4 commit 88710ec
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//Store imports
import {
animationType,
animationHidden,
animationVisible,
footerData,
osSelectOptions,
installConfigData,
Expand Down Expand Up @@ -40,9 +40,9 @@
//Settings messages
ipcRenderer
.invoke("getSettingsValue", "never.udev")
.then(show => animationHidden.set(!show));
.then(show => animationVisible.set(show));
ipcRenderer.on("settings:animations", (e, show) =>
animationHidden.set(!show)
animationVisible.set(show)
);
//Routing messages
Expand Down
2 changes: 1 addition & 1 deletion src/stores.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { writable } from "svelte/store";

//working view
export const animationType = writable("");
export const animationHidden = writable(false);
export const animationVisible = writable(true);

//wait for device view
export const deviceSelectOptions = writable([]);
Expand Down
14 changes: 7 additions & 7 deletions src/ui/partials/Animation.svelte
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<script>
import { onMount } from "svelte";
import { animationType, animationHidden } from "../../stores.mjs";
import { animationType, animationVisible } from "../../stores.mjs";
import { tsParticles } from "tsparticles";
import CircuitBoard from "./CircuitBoard.svelte";
import Squares from "./Squares.svelte";
onMount(updateAnimations);
animationType.subscribe(updateAnimations);
animationHidden.subscribe(updateAnimations);
animationVisible.subscribe(updateAnimations);
function updateAnimations() {
if (
$animationType === "particles" &&
!$animationHidden &&
$animationVisible &&
document.getElementById("tsparticles")
) {
document.getElementById("tsparticles").style = "display: inherit";
Expand Down Expand Up @@ -61,20 +61,20 @@
-->
<div id="tsparticles" class="animation" />

{#if !$animationHidden && $animationType === "circuit"}
{#if $animationVisible && $animationType === "circuit"}
<div class="animation">
<CircuitBoard />
</div>
{/if}
{#if !$animationHidden && $animationType === "squares"}
{#if $animationVisible && $animationType === "squares"}
<div class="animation">
<Squares />
</div>
{/if}
{#if !$animationHidden && $animationType === "download"}
{#if $animationVisible && $animationType === "download"}
<div class="download-animation animation" />
{/if}
{#if !$animationHidden && $animationType === "push"}
{#if $animationVisible && $animationType === "push"}
<div class="push-animation animation" />
{/if}

Expand Down

0 comments on commit 88710ec

Please sign in to comment.