fix: update icon for save and state loading messages to reflect download action

This commit is contained in:
zurdi
2025-05-16 13:25:21 +00:00
parent e9bb1351ba
commit 19f8371a93
2 changed files with 3 additions and 11 deletions

View File

@@ -11,13 +11,11 @@ import { formatBytes, formatTimestamp, getSupportedEJSCores } from "@/utils";
import { ROUTES } from "@/plugins/router";
import Player from "@/views/Player/EmulatorJS/Player.vue";
import { isNull } from "lodash";
import { inject, onBeforeUnmount, onMounted, ref } from "vue";
import { onBeforeUnmount, onMounted, ref } from "vue";
import { useRoute } from "vue-router";
import { useI18n } from "vue-i18n";
import { saveSave, saveState } from "./utils";
import CacheDialog from "@/views/Player/EmulatorJS/CacheDialog.vue";
import type { Emitter } from "mitt";
import type { Events } from "@/types/emitter";
import { getEmptyCoverImage } from "@/utils/covers";
import { useDisplay } from "vuetify";
@@ -42,7 +40,6 @@ const supportedCores = ref<string[]>([]);
const gameRunning = ref(false);
const storedFSOP = localStorage.getItem("fullScreenOnPlay");
const fullScreenOnPlay = ref(isNull(storedFSOP) ? true : storedFSOP === "true");
const emitter = inject<Emitter<Events>>("emitter");
// Functions
function onPlay() {
@@ -197,14 +194,9 @@ onMounted(async () => {
if (storedDisc) {
selectedDisc.value = parseInt(storedDisc);
}
// emitter?.on("saveSelected", selectSave);
// emitter?.on("stateSelected", selectState);
});
onBeforeUnmount(async () => {
// emitter?.off("saveSelected", selectSave);
// emitter?.off("stateSelected", selectState);
window.EJS_emulator?.callEvent("exit");
});
</script>

View File

@@ -180,7 +180,7 @@ async function loadSave(save: SaveSchema) {
loadEmulatorJSSave(new Uint8Array(data));
displayMessage("Save loaded from server", {
duration: 3000,
icon: "mdi-cloud-upload-outline",
icon: "mdi-cloud-download-outline",
});
return;
}
@@ -231,7 +231,7 @@ async function loadState(state: StateSchema) {
loadEmulatorJSState(new Uint8Array(data));
displayMessage("State loaded from server", {
duration: 3000,
icon: "mdi-cloud-upload-outline",
icon: "mdi-cloud-download-outline",
});
return;
}