Added update notification on sidebar

This commit is contained in:
RemixDev
2020-10-13 19:31:51 +02:00
parent 20faf36a4d
commit be5eb52446
3 changed files with 29 additions and 5 deletions

View File

@@ -64,6 +64,8 @@
</style>
<script>
import { socket } from '@/utils/socket'
export default {
data() {
return {
@@ -153,6 +155,16 @@ export default {
this.activeTablink = linkInSidebar.name
})
/* === Add update notification near info === */
updateNotification = document.createElement('span')
updateNotification.id = "update-notification"
updateNotification.className = "hide"
document.getElementById("main_about_tablink").append(updateNotification)
socket.on('updateAvailable', function() {
document.getElementById("update-notification").classList.remove("hide")
})
},
methods: {
changeTheme(newTheme) {