Add: resizable menu
This commit is contained in:
parent
5d6e8cf9b3
commit
0dead93606
|
@ -332,13 +332,15 @@ blockquote:before,
|
|||
padding: 5px;
|
||||
border: thin solid gray;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
}
|
||||
#menu-wrapper {
|
||||
margin-left: -5px;
|
||||
display: flex;
|
||||
height: calc(100% - 3.5rem);
|
||||
}
|
||||
#left-menu {
|
||||
width: 170px;
|
||||
width: 230px;
|
||||
}
|
||||
#left-menu div {
|
||||
padding-left: 5px;
|
||||
|
@ -358,8 +360,7 @@ blockquote:before,
|
|||
background-color: var(--emphasized);
|
||||
}
|
||||
#right-menu {
|
||||
width: 380px;
|
||||
max-height: 375px;
|
||||
width: 100%;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
padding: 5px;
|
||||
|
|
|
@ -17,6 +17,16 @@ function menu() {
|
|||
}
|
||||
$('#menu').css("left", left + "px")
|
||||
$('#menu').css("top", top + "px")
|
||||
var height = localStorage.getItem("menu-height");
|
||||
var width = localStorage.getItem("menu-width");
|
||||
if(height){
|
||||
$('#menu').css("height", height + "px")
|
||||
}else{
|
||||
$('#menu').css("height", "460px")
|
||||
}
|
||||
if(width){
|
||||
$('#menu').css("width", width + "px")
|
||||
}
|
||||
$('#menu').fadeIn();
|
||||
$("#menu-bar").html("TheDesk " + localStorage.getItem("ver"));
|
||||
$(".menu-content").addClass("hide");
|
||||
|
@ -49,6 +59,14 @@ $(function () {
|
|||
localStorage.setItem("menu-top", top);
|
||||
}
|
||||
});
|
||||
$("#menu").resizable({
|
||||
minHeight: 150,
|
||||
minWidth: 200,
|
||||
stop: function (event, ui) {
|
||||
localStorage.setItem("menu-height", ui.size.height);
|
||||
localStorage.setItem("menu-width", ui.size.width);
|
||||
}
|
||||
});
|
||||
});
|
||||
function help() {
|
||||
postMessage(["openUrl", "https://docs.thedesk.top"], "*")
|
||||
|
|
Loading…
Reference in New Issue
Block a user