From 53d4c40abacab03d8cb0a6cbd7247a44897571b9 Mon Sep 17 00:00:00 2001
From: thepaperpilot <thepaperpilot@gmail.com>
Date: Sun, 27 Feb 2022 16:55:43 -0600
Subject: [PATCH] Fixed game over screen graphical issues

---
 src/components/GameOverScreen.vue | 12 +++++++++---
 src/data/mod.tsx                  |  2 +-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/components/GameOverScreen.vue b/src/components/GameOverScreen.vue
index cb274d7..e30e3d7 100644
--- a/src/components/GameOverScreen.vue
+++ b/src/components/GameOverScreen.vue
@@ -19,11 +19,12 @@
                 </div>
                 <br />
                 <div>
-                    <a :href="discordLink">
+                    <a :href="discordLink" class="game-over-modal-discord-link">
                         <span class="material-icons game-over-modal-discord">discord</span>
                         {{ discordName }}
                     </a>
                 </div>
+                <Toggle title="Autosave" v-model="autosave" />
             </div>
         </template>
         <template v-slot:footer>
@@ -42,12 +43,14 @@ import modInfo from "@/data/modInfo.json";
 import player from "@/game/player";
 import { formatTime } from "@/util/bignum";
 import { loadSave, newSave } from "@/util/save";
-import { computed } from "vue";
+import { computed, toRef } from "vue";
+import Toggle from "./fields/Toggle.vue";
 
 const { title, logo, discordName, discordLink, versionNumber, versionTitle } = modInfo;
 
 const timePlayed = computed(() => formatTime(player.timePlayed));
 const isOpen = computed(() => hasWon.value && !player.keepGoing);
+const autosave = toRef(player, "autosave");
 
 function keepGoing() {
     player.keepGoing = true;
@@ -60,9 +63,11 @@ function playAgain() {
 
 <style scoped>
 .game-over-modal-header {
+    display: flex;
     margin: -20px;
     margin-bottom: 0;
     background: var(--raised-background);
+    align-items: center;
 }
 
 .game-over-modal-header * {
@@ -75,6 +80,8 @@ function playAgain() {
 }
 
 .game-over-modal-title {
+    display: flex;
+    flex-direction: column;
     padding: 10px 0;
     margin-left: 10px;
 }
@@ -94,7 +101,6 @@ function playAgain() {
 }
 
 .game-over-modal-discord {
-    height: 2em;
     margin: 0;
     margin-right: 4px;
 }
diff --git a/src/data/mod.tsx b/src/data/mod.tsx
index 02f98ac..d0e50fa 100644
--- a/src/data/mod.tsx
+++ b/src/data/mod.tsx
@@ -108,7 +108,7 @@ export const getInitialLayers = (
 ): Array<GenericLayer> => [main, f, c, a];
 
 export const hasWon = computed(() => {
-    return false;
+    return Decimal.gt(main.points.value, 25);
 });
 
 /* eslint-disable @typescript-eslint/no-unused-vars */