-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
733120e
commit 5e70d82
Showing
9 changed files
with
186 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<script lang="ts"> | ||
import { ipcRenderer } from "electron" | ||
import { computed, defineComponent, ref } from '@vue/composition-api' | ||
import { compileFunction } from "vm"; | ||
export default defineComponent({ | ||
props: { | ||
// show: { | ||
// type: Boolean, | ||
// default: false | ||
// } | ||
}, | ||
setup(props, context) { | ||
let show = ref(false) | ||
let downloading = ref(false); | ||
let message = computed(() => { | ||
return downloading.value ? | ||
"Frissítés érhető el. Letöltés folyamatban..." : | ||
"Frissítés kész. A változások újraindítás után lépnek érvénybe." | ||
}) | ||
ipcRenderer.on("update-available", () => { | ||
show.value = true | ||
downloading.value = true | ||
}) | ||
ipcRenderer.on("update-downloaded", () => { | ||
downloading.value = false | ||
}) | ||
let close = () => { | ||
show.value = false | ||
} | ||
let restart = () => { | ||
show.value = false | ||
ipcRenderer.send("update-install") | ||
} | ||
return { | ||
show, | ||
downloading, | ||
message, | ||
close, | ||
restart | ||
} | ||
}, | ||
}) | ||
</script> | ||
|
||
<template> | ||
<v-snackbar right bottom v-model="show" color="white text-center" :timeout="-1"> | ||
<div class="wrapper"> | ||
<v-progress-circular v-if="downloading" indeterminate color="primary"></v-progress-circular> | ||
{{ message }} | ||
<v-btn text v-if="!downloading" color="success" small @click="restart"> | ||
<v-icon left>mdi-restart</v-icon> | ||
Újraindítás | ||
</v-btn> | ||
</div> | ||
|
||
<template v-slot:action="{attrs}"> | ||
<v-btn plain fab x-small @click="close" v-bind="attrs"> | ||
<v-icon color="secondary">mdi-close</v-icon> | ||
</v-btn> | ||
</template> | ||
</v-snackbar> | ||
</template> | ||
|
||
<style scoped> | ||
.wrapper { | ||
display: flex; | ||
width: 100%; | ||
align-items: center; | ||
justify-content: space-between; | ||
gap: 10px; | ||
background-color: white; | ||
color: var(--v-secondary-base); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.