fix: 💄 properly slide in

This commit is contained in:
ThatOneCalculator 2023-07-12 00:56:40 -07:00
parent 6b5d9f7454
commit 8d88ac30e1
No known key found for this signature in database
GPG key ID: 8703CACD01000000

View file

@ -54,14 +54,14 @@
</template>
<script lang="ts" setup>
import { ref } from "vue";
import { ref, nextTick } from "vue";
import MkButton from "@/components/MkButton.vue";
import { host } from "@/config";
import { i18n } from "@/i18n";
import * as os from "@/os";
import { instance } from "@/instance";
let show = ref(true);
let show = ref(false);
const emit = defineEmits<{
(ev: "closed"): void;
@ -71,6 +71,15 @@ const hostname = instance.name?.length <= 20 ? instance.name : host;
const zIndex = os.claimZIndex("low");
function slideIn() {
show.value = false;
nextTick(() => {
show.value = true;
});
}
slideIn();
function close() {
localStorage.setItem("latestDonationInfoShownAt", Date.now().toString());
emit("closed");