mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-10-06 01:06:17 +00:00
Make the dashboard more mobile friendly
This commit is contained in:
@@ -8,6 +8,7 @@ let peers = [];
|
||||
/**
|
||||
* Definitions
|
||||
*/
|
||||
$(".bottomNavConfigs").addClass("active")
|
||||
let configuration_name;
|
||||
let configuration_interval;
|
||||
let configuration_timeout = window.localStorage.getItem("configurationTimeout");
|
||||
|
@@ -4,6 +4,8 @@ $('[data-toggle="tooltip"]').tooltip()
|
||||
let $add_configuration = $("#add_configuration");
|
||||
|
||||
let addConfigurationModal = $("#addConfigurationModal");
|
||||
$(".bottomNavHome").addClass("active");
|
||||
|
||||
|
||||
addConfigurationModal.modal({
|
||||
keyboard: false,
|
||||
|
38
src/static/js/pwa.js
Normal file
38
src/static/js/pwa.js
Normal file
@@ -0,0 +1,38 @@
|
||||
let wrapper = $(".bottomNavWrapper");
|
||||
$(".bottomNavConfigs").on("click", function(){
|
||||
let subNav = $(this).children(".subNav");
|
||||
subNav.removeClass("animate__fadeOutDown").addClass("active animate__fadeInUp");
|
||||
wrapper.fadeIn();
|
||||
});
|
||||
|
||||
$(".bottomNavHome").on("click", function(){
|
||||
window.location.replace('/')
|
||||
});
|
||||
|
||||
$(".bottomNavSettings").on("click", function(){
|
||||
window.location.replace('/settings')
|
||||
})
|
||||
|
||||
|
||||
function hideBottomSubNav(){
|
||||
$(".bottomNavButton .subNav").removeClass("animate__fadeInUp").addClass("animate__fadeOutDown");
|
||||
wrapper.fadeOut();
|
||||
setTimeout(function(){
|
||||
$(".bottomNavButton .subNav").removeClass("active");
|
||||
},350)
|
||||
}
|
||||
|
||||
wrapper.on("click", function(){
|
||||
hideBottomSubNav();
|
||||
});
|
||||
|
||||
|
||||
$(".bottomNavMore").on("click", function(){
|
||||
let subNav = $(this).children(".subNav");
|
||||
subNav.removeClass("animate__fadeOutDown").addClass("active animate__fadeInUp");
|
||||
wrapper.fadeIn();
|
||||
});
|
||||
|
||||
// $(".bottomNavButton .nav-conf-link").on("click", function(){
|
||||
// hideBottomSubNav();
|
||||
// })
|
Reference in New Issue
Block a user