Added update notification on sidebar
This commit is contained in:
parent
20faf36a4d
commit
be5eb52446
File diff suppressed because one or more lines are too long
@ -64,6 +64,8 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { socket } from '@/utils/socket'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -153,6 +155,16 @@ export default {
|
|||||||
|
|
||||||
this.activeTablink = linkInSidebar.name
|
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: {
|
methods: {
|
||||||
changeTheme(newTheme) {
|
changeTheme(newTheme) {
|
||||||
|
@ -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 */
|
||||||
#theme_selector {
|
#theme_selector {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
Loading…
Reference in New Issue
Block a user