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

File diff suppressed because one or more lines are too long

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) {

View File

@ -98,6 +98,18 @@ $sidebar-delay: 75ms;
}
}
/* Update Notification */
#main_about_tablink { position:relative; }
#update-notification {
background-color: red;
width: 12px;
height: 12px;
border-radius: 6px;
position: absolute;
left: 30px;
top: 12px;
}
/* Theme selector */
#theme_selector {
margin-top: 20px;