Enhance/shortcuts (#9803)

* refactor(shortcuts): simplify to build handler category map

* fix(shortcuts): redundant re-mount for the pdf shortcuts

* refactor(shortcuts): simplify names

* refactor(shortcuts): simplify user keynames

* fix(shortcuts): persist inited state for dev mode

* refactor(shortcuts): simplify handlers installation

* refactor(shortcuts): optimize shortcuts mixin

* fix: incorrect function ref

* refactor(shortcuts): shortcuts mixin

* fix(shortcuts): incorrect initialization for the pdf shortcut handler

* refactor(shortcuts): optimize binding keys map

* refactor(shortcuts): optimize shortcuts conflicts detection

* refactor(shortcuts): optimize binding ids map

* refactor(shortcuts): WIP the new keymap page

* refactor(shortcuts): WIP the new keymap related components

* feat(shortcuts): WIP fuzzy search for the shortcuts

* refactor(shortcuts): WIP the new keymap related components

* feat(shortcuts): WIP the new shorcuts record component

* feat(shortcuts): WIP the new shorcuts record component

* feat(shortcuts): WIP check shortcut conflicts component

* feat(shortcuts): WIP the new shorcuts record component

* refactor(shortcuts): WIP persist user shortcuts

* fix(shortcuts): detection for the conflicts

* feat(shortcuts): WIP detection for the conflicts

* feat(shortcuts): WIP persist user shortcuts

* refactor(shortcuts): add unit tests

* enhance(ux): search pane for the shortcuts

* feat(shortcuts): remove the existent shortcut item

* feat(shortcuts): fold/unfold categories

* feat(shortcuts): add shortcuts filters

* enhance(shortcuts): resove binding map description

* enhance(shortcuts): reactive category shortcuts

* enhance(shortcuts): register api for plugins

* feat(shortcuts): add keyboard shortcuts filters

* feat(shortcuts): impl keyboard shortcuts filters

* enhance(shortcuts): leader keys for the shortcut conflicts detection

* enhance(tests): leader keys conflicts for the shortucts

* enhance(shortcuts): parse conflicts from current binding list

* enhance(ui): polish the component of the restore shortcut action

* enhance(shortcuts): get conflicts with specific handler id

* enhance(shortcuts): polish the confilts component

* enhance(shortcuts): polish keymap conflicts component

* enhance(shortcuts): ux for handling shorcuts conflicts

* enhance(ui): polish notifications cp

* fix(shortcuts): remove reduplicate shortcuts for category

* enhance(shortcuts): polish ux for handling shorcuts conflicts

* chore(plugin): build libs core

* enhance(plugin): support shortcut command lifecycle hooks

* enhance(plugin): support shortcut command lifecycle hooks

* chore(plugin): build libs core

* enhance(shortcuts): support shortcuts saved to global config

* enhance(shortcuts): support shortcuts be saved to global config

* feat(shortcuts): support keymap manager to global settings

* enhance(shortcuts): shortcut to open keymap settings

* fix(units): tests

* fix: lints

* enhance(shortcuts): unlisten all shortcuts

* fix: lints

* fix: lints

* fix(units): tests

* fix(units): tests

* fix(units): tests

* enhance(shortcuts): unlisten/listen all shortcuts

* enhance(shortcuts): polish conflicts component

* fix(ui): modal size

* fix(ui): modal panel container

* enhance(shortcuts): i18n

* enhance(ui): layout of the shortcuts recorder component

* fix(lint): i18n

* enhance(ui): keyboard icon for the keymap settings tab

* fix(shortcuts): incorrect filters for the collaspsed shortcuts

* enhance(ui): polish details for the keymap settings

* enhance(ui): polish details for the keymap settings

* fix(shortcuts): get shortcut description error when the associated handler-id not exist

* fix(ui): the shortcut disabled label overlaps with section headers.

* refactor(shortcuts): names

* enhance(ui): filter icons
This commit is contained in:
Charlie
2023-08-29 19:33:48 +08:00
committed by GitHub
parent 99865a5eef
commit 6d6da2046c
44 changed files with 2374 additions and 1336 deletions

View File

@@ -1,23 +1,35 @@
.cp__settings {
&-main {
aside {
&-inner {
@apply flex flex-col md:flex-row;
> aside {
@apply bg-gray-400/5 p-4;
}
article {
@apply p-4 flex-1 min-h-[12rem] w-auto overflow-y-auto;
@apply md:max-h-[70vh] md:w-[40rem];
/* margin-right: -17px; */
/* margin-bottom: -17px; */
> ul > li {
> a {
@apply mb-2;
@screen md {
/* max-height: 70vh; */
/* width: 680px; */
> strong {
font-size: 14px;
font-weight: normal;
padding-left: 5px;
opacity: .9;
}
}
&.active {
background-color: var(--ls-quaternary-background-color);
}
}
}
aside > .cp__settings-header,
article > .cp__settings-header {
> article {
@apply p-4 flex-1 min-h-[12rem] w-auto overflow-y-auto;
@apply md:max-h-[70vh] md:w-[40rem];
}
> aside > .cp__settings-header,
> article > .cp__settings-header {
@apply h-10 py-2 flex flex-row items-center justify-start gap-2;
}
@@ -41,13 +53,13 @@
@apply text-xl lowercase;
}
h1.cp__settings-modal-title:first-letter,
h1.cp__settings-modal-title:first-letter,
h1.cp__settings-category-title:first-letter {
@apply uppercase;
}
.settings-menu {
@apply p-0 m-0 mt-4 pr-3;
@apply p-0 m-0 mt-4;
}
.settings-menu-item {
@@ -56,46 +68,10 @@
}
.settings-menu-link {
@apply px-2 py-1.5 select-none;
@apply px-2 py-1.5 select-none;
color: var(--ls-primary-text-color);
}
}
&-inner {
@apply flex flex-col md:flex-row;
> aside {
ul {
> li {
> a {
> i {
overflow: hidden;
opacity: .9;
}
> strong {
font-size: 14px;
font-weight: normal;
padding-left: 5px;
margin-top: 2px;
opacity: .9;
}
}
&.active {
background-color: var(--ls-quaternary-background-color);
i {
opacity: 1;
}
}
}
}
}
&.no-aside {
> article {
@@ -392,7 +368,7 @@
z-index: 1;
width: 100px;
max-height: 180px;
border:1px solid var(--ls-border-color);
border: 1px solid var(--ls-border-color);
border-radius: 4px;
overflow: auto;
overflow: overlay;
@@ -465,3 +441,15 @@ svg.git {
svg.cmd {
margin-left: -1px;
}
body[data-settings-tab=keymap] {
.cp__settings-inner {
> article {
@apply md:w-[70vw] xl:max-w-[850px] p-0;
> header {
@apply p-4 pb-2 h-auto;
}
}
}
}