fix: 💄 properly slide in

This commit is contained in:
ThatOneCalculator 2023-07-12 00:56:40 -07:00
parent 733d7d438a
commit 762f499ef2

View file

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