Deploy deepseek 2
This commit is contained in:
@@ -1,23 +1,28 @@
|
||||
<script setup>
|
||||
import { ref,onMounted } from 'vue';
|
||||
import { ref,onMounted,onUnmounted } from 'vue';
|
||||
import { emitter } from '~/services/Emitter';
|
||||
|
||||
|
||||
const statusIcon = ref(null);
|
||||
const statusMessage = ref(null);
|
||||
|
||||
emitter.on("status-bar-update", (state) => {
|
||||
const handleStatusUpdate = (state) => {
|
||||
var preloadImage = new Image();
|
||||
preloadImage.src = '/icons/Pixelarticons/black/' + state.icon + ".svg";
|
||||
preloadImage.onload = function() {
|
||||
statusIcon.value.src = this.src;
|
||||
// The update can arrive (or finish loading) while the bar is not mounted.
|
||||
if (statusIcon.value) statusIcon.value.src = this.src;
|
||||
};
|
||||
statusMessage.value.innerText = state.text;
|
||||
})
|
||||
if (statusMessage.value) statusMessage.value.innerText = state.text;
|
||||
};
|
||||
|
||||
emitter.on("status-bar-update", handleStatusUpdate);
|
||||
|
||||
onMounted(() => {
|
||||
emitter.emit("status-bar-update", {text: "Hola", icon: "check"})
|
||||
});
|
||||
|
||||
onUnmounted(() => emitter.off("status-bar-update", handleStatusUpdate));
|
||||
</script>
|
||||
<template>
|
||||
<span class="status-text">
|
||||
|
||||
Reference in New Issue
Block a user