add connectionStatus state and component
This commit is contained in:
parent
81b4d018fb
commit
e13f90a6cc
6 changed files with 39 additions and 4 deletions
26
src/render/components/connectionStatus.vue
Normal file
26
src/render/components/connectionStatus.vue
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<template>
|
||||
<div>
|
||||
<div v-if="isAlive">Nominal</div>
|
||||
<div v-else>Connecting</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script lang="ts">
|
||||
|
||||
import { defineComponent } from 'vue'
|
||||
import { isAlive } from "@/render/shared/connectionStatus";
|
||||
|
||||
export default defineComponent({
|
||||
name: "ConnectionStatus",
|
||||
|
||||
setup() {
|
||||
return {
|
||||
isAlive
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
class="menuButton minimizeButton"
|
||||
@click.prevent="postNavBarMin"
|
||||
/>
|
||||
<connection-status />
|
||||
</span>
|
||||
</template>
|
||||
|
||||
|
|
@ -18,8 +19,11 @@
|
|||
import { defineComponent } from "vue";
|
||||
import { postNavBar } from "@/render/ipc";
|
||||
|
||||
import ConnectionStatus from "./connectionStatus.vue";
|
||||
|
||||
export default defineComponent({
|
||||
name: "Header",
|
||||
components: { ConnectionStatus },
|
||||
setup() {
|
||||
const postNavBarExit = () => postNavBar('close');
|
||||
const postNavBarMin = () => postNavBar('min');
|
||||
|
|
|
|||
Loading…
Reference in a new issue