mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-25 18:55:44 +03:00
Experiment quick open Shortcuts Settings
This commit is contained in:
parent
1f039a4d73
commit
dc1452ab30
2 changed files with 29 additions and 2 deletions
|
@ -49,7 +49,24 @@ function Columns() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return <div id="columns">{components}</div>;
|
return (
|
||||||
|
<div
|
||||||
|
id="columns"
|
||||||
|
onContextMenu={(e) => {
|
||||||
|
// If right-click on header, but not links or buttons
|
||||||
|
if (
|
||||||
|
e.target.closest('.deck > header') &&
|
||||||
|
!e.target.closest('a') &&
|
||||||
|
!e.target.closest('button')
|
||||||
|
) {
|
||||||
|
e.preventDefault();
|
||||||
|
states.showShortcutsSettings = true;
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{components}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Columns;
|
export default Columns;
|
||||||
|
|
|
@ -90,7 +90,13 @@ function Shortcuts() {
|
||||||
return (
|
return (
|
||||||
<div id="shortcuts">
|
<div id="shortcuts">
|
||||||
{snapStates.settings.shortcutsViewMode === 'tab-menu-bar' ? (
|
{snapStates.settings.shortcutsViewMode === 'tab-menu-bar' ? (
|
||||||
<nav class="tab-bar">
|
<nav
|
||||||
|
class="tab-bar"
|
||||||
|
onContextMenu={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
states.showShortcutsSettings = true;
|
||||||
|
}}
|
||||||
|
>
|
||||||
<ul>
|
<ul>
|
||||||
{formattedShortcuts.map(
|
{formattedShortcuts.map(
|
||||||
({ id, path, title, subtitle, icon }, i) => {
|
({ id, path, title, subtitle, icon }, i) => {
|
||||||
|
@ -146,6 +152,10 @@ function Shortcuts() {
|
||||||
type="button"
|
type="button"
|
||||||
id="shortcuts-button"
|
id="shortcuts-button"
|
||||||
class="plain"
|
class="plain"
|
||||||
|
onContextMenu={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
states.showShortcutsSettings = true;
|
||||||
|
}}
|
||||||
onTransitionStart={(e) => {
|
onTransitionStart={(e) => {
|
||||||
// Close menu if the button disappears
|
// Close menu if the button disappears
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue