-
-
Save qeweyou/53a2caef3f91cfab54dbd82f94dd2a11 to your computer and use it in GitHub Desktop.
Tweaks to Turbo Admin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div#ta-command-palette { | |
background: #000a; | |
backdrop-filter: blur(15px); | |
box-shadow: 0px 0px 28px 0px rgba(0,0,0,0.79); | |
-webkit-box-shadow: 0px 0px 28px 0px rgba(0,0,0,0.79); | |
-moz-box-shadow: 0px 0px 28px 0px rgba(0,0,0,0.79); | |
border-radius: 10px; | |
} | |
ul#ta-command-palette-items li { | |
border-radius: 10px; | |
margin-bottom: 5px !important; | |
background: #fff1; | |
} | |
ul#ta-command-palette-items { | |
background: 0; | |
} | |
input#ta-command-palette-input { | |
background: #fff1; | |
color: #fff; | |
border-radius: 10px; | |
border: 3px #fff5 solid; | |
} | |
.ta-submenu-title { | |
border-radius: 10px; | |
color: #fff !important; | |
margin-bottom: 1px; | |
} | |
ul#ta-command-palette-items { | |
min-height: 200px !important; | |
} | |
.ta-submenu.active { | |
border-radius: 10px; | |
padding: 10px; | |
} | |
div#ta-command-palette:before { | |
content: "Go to..."; | |
margin-bottom: 15px; | |
margin-top: 2px; | |
color: #fff; | |
font-size: 140%; | |
font-weight: 600; | |
margin-left: 4px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// double click "/" for command palette, [qeweyou] 2022 | |
var delta = 500; | |
var lastKeypressTime = 0; | |
window.addEventListener("keydown", (commandSummoner) => { | |
if (commandSummoner.code === "Slash") { | |
var thisKeypressTime = new Date(); | |
if (thisKeypressTime - lastKeypressTime <= delta) { | |
if(turboAdmin.turboAdminPalette.paletteShown()) { | |
turboAdmin.turboAdminPalette.hidePalette(); | |
} else { | |
setTimeout(function(){turboAdmin.turboAdminPalette.showPalette()},10); | |
} | |
thisKeypressTime = 0; | |
} | |
lastKeypressTime = thisKeypressTime; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment