@ -2,99 +2,79 @@ import BasicWidget from "../basic_widget.js";
import utils from "../../services/utils.js" ;
const TPL = `
< div class = " global-menu-wrapper ">
< div class = " dropdown global-menu dropright ">
< style >
. global - menu - wrapper {
box - sizing : border - box ;
}
. global - menu {
box - sizing : border - box ;
}
. global - menu button {
padding : 15 px 15 px ;
font - size : 150 % ;
border : none ;
border - radius : 0 ! important ;
}
. global - menu button : hover {
background - color : var ( -- hover - item - background - color ) ;
}
. global - menu . dropdown - menu {
width : 20 em ;
}
< / s t y l e >
< div class = "dropdown global-menu dropright" >
< button type = "button" data - toggle = "dropdown" aria - haspopup = "true" aria - expanded = "false" class = "btn btn-sm bx bx-menu" title = "Menu" > < / b u t t o n >
< div class = "dropdown-menu dropdown-menu-right" >
< a class = "dropdown-item options-button" data - trigger - command = "showOptions" >
< span class = "bx bx-slider" > < / s p a n >
Options
< / a >
< a class = "dropdown-item" data - trigger - command = "openNewWindow" >
< span class = "bx bx-window-open" > < / s p a n >
Open new window
< kbd data - command = "openNewWindow" > < / k b d >
< / a >
< a class = "dropdown-item open-dev-tools-button" data - trigger - command = "openDevTools" >
< span class = "bx bx-terminal" > < / s p a n >
Open Dev Tools
< kbd data - command = "openDevTools" > < / k b d >
< / a >
< a class = "dropdown-item" data - trigger - command = "showSQLConsole" >
< span class = "bx bx-data" > < / s p a n >
Open SQL Console
< kbd data - command = "showSQLConsole" > < / k b d >
< / a >
< a class = "dropdown-item" data - trigger - command = "showBackendLog" >
< span class = "bx bx-empty" > < / s p a n >
Show backend log
< kbd data - command = "showBackendLog" > < / k b d >
< / a >
< a class = "dropdown-item" data - trigger - command = "reloadFrontendApp"
title = "Reload can help with some visual glitches without restarting the whole app." >
< span class = "bx bx-empty" > < / s p a n >
Reload frontend
< kbd data - command = "reloadFrontendApp" > < / k b d >
< / a >
< a class = "dropdown-item" data - trigger - command = "toggleZenMode" >
< span class = "bx bx-empty" > < / s p a n >
Toggle Zen mode
< kbd data - command = "toggleZenMode" > < / k b d >
< / a >
< a class = "dropdown-item" data - trigger - command = "toggleFullscreen" >
< span class = "bx bx-empty" > < / s p a n >
Toggle fullscreen
< kbd data - command = "toggleFullscreen" > < / k b d >
< / a >
< a class = "dropdown-item" data - trigger - command = "showHelp" >
< span class = "bx bx-info-circle" > < / s p a n >
Show Help
< kbd data - command = "showHelp" > < / k b d >
< / a >
< a class = "dropdown-item show-about-dialog-button" >
< span class = "bx bx-empty" > < / s p a n >
About Trilium Notes
< / a >
< a class = "dropdown-item logout-button" data - trigger - command = "logout" >
< span class = "bx bx-log-out" > < / s p a n >
Logout
< / a >
< / d i v >
< button type = "button" data - toggle = "dropdown" aria - haspopup = "true" aria - expanded = "false" class = "icon-action bx bx-menu" title = "Menu" > < / b u t t o n >
< div class = "dropdown-menu dropdown-menu-right" >
< a class = "dropdown-item options-button" data - trigger - command = "showOptions" >
< span class = "bx bx-slider" > < / s p a n >
Options
< / a >
< a class = "dropdown-item" data - trigger - command = "openNewWindow" >
< span class = "bx bx-window-open" > < / s p a n >
Open new window
< kbd data - command = "openNewWindow" > < / k b d >
< / a >
< a class = "dropdown-item open-dev-tools-button" data - trigger - command = "openDevTools" >
< span class = "bx bx-terminal" > < / s p a n >
Open Dev Tools
< kbd data - command = "openDevTools" > < / k b d >
< / a >
< a class = "dropdown-item" data - trigger - command = "showSQLConsole" >
< span class = "bx bx-data" > < / s p a n >
Open SQL Console
< kbd data - command = "showSQLConsole" > < / k b d >
< / a >
< a class = "dropdown-item" data - trigger - command = "showBackendLog" >
< span class = "bx bx-empty" > < / s p a n >
Show backend log
< kbd data - command = "showBackendLog" > < / k b d >
< / a >
< a class = "dropdown-item" data - trigger - command = "reloadFrontendApp"
title = "Reload can help with some visual glitches without restarting the whole app." >
< span class = "bx bx-empty" > < / s p a n >
Reload frontend
< kbd data - command = "reloadFrontendApp" > < / k b d >
< / a >
< a class = "dropdown-item" data - trigger - command = "toggleZenMode" >
< span class = "bx bx-empty" > < / s p a n >
Toggle Zen mode
< kbd data - command = "toggleZenMode" > < / k b d >
< / a >
< a class = "dropdown-item" data - trigger - command = "toggleFullscreen" >
< span class = "bx bx-empty" > < / s p a n >
Toggle fullscreen
< kbd data - command = "toggleFullscreen" > < / k b d >
< / a >
< a class = "dropdown-item" data - trigger - command = "showHelp" >
< span class = "bx bx-info-circle" > < / s p a n >
Show Help
< kbd data - command = "showHelp" > < / k b d >
< / a >
< a class = "dropdown-item show-about-dialog-button" >
< span class = "bx bx-empty" > < / s p a n >
About Trilium Notes
< / a >
< a class = "dropdown-item logout-button" data - trigger - command = "logout" >
< span class = "bx bx-log-out" > < / s p a n >
Logout
< / a >
< / d i v >
< / d i v >
` ;