11import { BlockEntity , SettingSchemaDesc } from '@logseq/libs/dist/LSPlugin.user'
22
3- import { reverseBlocksCommand , shuffleBlocksCommand , sortBlocksCommand , splitByParagraphsCommand , toggleAutoHeadingCommand } from './commands'
3+ import { ICON , reverseBlocksCommand , shuffleBlocksCommand , sortBlocksCommand , splitByParagraphsCommand , toggleAutoHeadingCommand } from './commands'
44import { getChosenBlocks , p , scrollToBlock } from './utils'
55
66
@@ -35,22 +35,22 @@ async function main() {
3535
3636 // Decoration
3737 logseq . App . registerCommandPalette ( {
38- label : '🪚 Toggle auto heading', key : 'auto-heading' ,
38+ label : ICON + ' Toggle auto heading', key : 'auto-heading' ,
3939 keybinding : { mac : 'mod+1' , binding : 'ctrl+1' , mode : 'global' } ,
4040 } , ( e ) => toggleAutoHeadingCommand ( { togglingBasedOnFirstBlock : true } ) )
4141
4242
4343 // Splitting
4444 logseq . App . registerCommandPalette ( {
45- label : '🪚 Split by paragraphs', key : 'split-by-paragraphs' ,
45+ label : ICON + ' Split by paragraphs', key : 'split-by-paragraphs' ,
4646 // @ts -expect-error
4747 keybinding : { } ,
4848 } , ( e ) => splitByParagraphsCommand ( ) )
4949
5050
5151 // Navigation
5252 logseq . App . registerCommandPalette ( {
53- label : '🪚 Go to (↖︎) parent block', key : 'edit-block-1-deep-dive-out' ,
53+ label : ICON + ' Go to (↖︎) parent block', key : 'edit-block-1-deep-dive-out' ,
5454 keybinding : { mac : 'mod+alt+left' , binding : 'ctrl+alt+left' , mode : 'global' } ,
5555 } , async ( e ) => {
5656 const [ blocks ] = await getChosenBlocks ( )
@@ -66,7 +66,7 @@ async function main() {
6666 } )
6767
6868 logseq . App . registerCommandPalette ( {
69- label : '🪚 Go to (↘︎) last child block', key : 'edit-block-2-deep-dive-in' ,
69+ label : ICON + ' Go to (↘︎) last child block', key : 'edit-block-2-deep-dive-in' ,
7070 keybinding : { mac : 'mod+alt+right' , binding : 'ctrl+alt+right' , mode : 'global' } ,
7171 } , async ( e ) => {
7272 const [ blocks ] = await getChosenBlocks ( )
@@ -83,8 +83,8 @@ async function main() {
8383 } )
8484
8585 logseq . App . registerCommandPalette ( {
86- label : '🪚 Go to |↑| previous sibling block' , key : 'edit-block-5-prev-sibling' ,
8786 keybinding : { mac : 'ctrl+shift+up' , binding : 'ctrl+shift+up' , mode : 'global' } ,
87+ label : ICON + ' Go to |↑| previous sibling block' , key : 'edit-block-5-prev-sibling' ,
8888 } , async ( e ) => {
8989 const [ blocks ] = await getChosenBlocks ( )
9090 const [ first ] = blocks
@@ -103,8 +103,8 @@ async function main() {
103103 } )
104104
105105 logseq . App . registerCommandPalette ( {
106- label : '🪚 Go to |↓| next sibling block' , key : 'edit-block-6-next-sibling' ,
107106 keybinding : { mac : 'ctrl+shift+down' , binding : 'ctrl+shift+down' , mode : 'global' } ,
107+ label : ICON + ' Go to |↓| next sibling block' , key : 'edit-block-6-next-sibling' ,
108108 } , async ( e ) => {
109109 const [ blocks ] = await getChosenBlocks ( )
110110 const [ first ] = blocks
@@ -123,7 +123,7 @@ async function main() {
123123 } )
124124
125125 logseq . App . registerCommandPalette ( {
126- label : '🪚 Go to (↑) previous block', key : 'edit-block-3-step-up' ,
126+ label : ICON + ' Go to (↑) previous block', key : 'edit-block-3-step-up' ,
127127 keybinding : { mac : 'mod+alt+up' , binding : 'ctrl+alt+up' , mode : 'global' } ,
128128 } , async ( e ) => {
129129 const [ blocks ] = await getChosenBlocks ( )
@@ -163,7 +163,7 @@ async function main() {
163163 } )
164164
165165 logseq . App . registerCommandPalette ( {
166- label : '🪚 Go to (↓) next block', key : 'edit-block-4-step-down' ,
166+ label : ICON + ' Go to (↓) next block', key : 'edit-block-4-step-down' ,
167167 keybinding : { mac : 'mod+alt+down' , binding : 'ctrl+alt+down' , mode : 'global' } ,
168168 } , async ( e ) => {
169169 const [ blocks ] = await getChosenBlocks ( )
@@ -211,7 +211,7 @@ async function main() {
211211
212212 // Movements
213213 logseq . App . registerCommandPalette ( {
214- label : '🪚 Move block (⤒) on top of siblings', key : 'move-block-1-on-top' ,
214+ label : ICON + ' Move block (⤒) on top of siblings', key : 'move-block-1-on-top' ,
215215 keybinding : { mac : 'mod+alt+shift+up' , binding : 'ctrl+alt+shift+up' , mode : 'global' } ,
216216 } , async ( e ) => {
217217 const [ blocks ] = await getChosenBlocks ( )
@@ -236,7 +236,7 @@ async function main() {
236236 } )
237237
238238 logseq . App . registerCommandPalette ( {
239- label : '🪚 Move block (⤓) on bottom of siblings', key : 'move-block-2-on-bottom' ,
239+ label : ICON + ' Move block (⤓) on bottom of siblings', key : 'move-block-2-on-bottom' ,
240240 keybinding : { mac : 'mod+alt+shift+down' , binding : 'ctrl+alt+shift+down' , mode : 'global' } ,
241241 } , async ( e ) => {
242242 const [ blocks ] = await getChosenBlocks ( )
@@ -261,8 +261,8 @@ async function main() {
261261 } )
262262
263263 logseq . App . registerCommandPalette ( {
264- label : '🪚 Outdent (⇤) children of the block' , key : 'move-block-0-outdent-children' ,
265264 keybinding : { mac : 'mod+alt+tab' , binding : 'ctrl+alt+tab' , mode : 'global' } ,
265+ label : ICON + ' Outdent (⇤) children of the block' , key : 'move-block-0-outdent-children' ,
266266 } , async ( e ) => {
267267 const [ blocks ] = await getChosenBlocks ( )
268268 for ( const block of blocks ) {
@@ -283,23 +283,23 @@ async function main() {
283283
284284 // Transformations
285285 logseq . App . registerCommandPalette ( {
286- label : '🪚 Sort blocks', key : 'transform-1-sort-blocks' ,
286+ label : ICON + ' Sort blocks', key : 'transform-1-sort-blocks' ,
287287 // @ts -expect-error
288288 keybinding : { } ,
289289 } , ( e ) => sortBlocksCommand ( ) )
290290 logseq . Editor . registerBlockContextMenuItem (
291- '🪚 Sort blocks', async ( e ) => sortBlocksCommand ( e . uuid ) )
291+ ICON + ' Sort blocks', async ( e ) => sortBlocksCommand ( e . uuid ) )
292292
293293 logseq . App . registerCommandPalette ( {
294- label : '🪚 Reverse blocks', key : 'transform-2-reverse-blocks' ,
294+ label : ICON + ' Reverse blocks', key : 'transform-2-reverse-blocks' ,
295295 // @ts -expect-error
296296 keybinding : { } ,
297297 } , ( e ) => reverseBlocksCommand ( ) )
298298 logseq . Editor . registerBlockContextMenuItem (
299- '🪚 Reverse blocks', async ( e ) => reverseBlocksCommand ( e . uuid ) )
299+ ICON + ' Reverse blocks', async ( e ) => reverseBlocksCommand ( e . uuid ) )
300300
301301 logseq . App . registerCommandPalette ( {
302- label : '🪚 Shuffle blocks', key : 'transform-3-shuffle-blocks' ,
302+ label : ICON + ' Shuffle blocks', key : 'transform-3-shuffle-blocks' ,
303303 // @ts -expect-error
304304 keybinding : { } ,
305305 } , ( e ) => shuffleBlocksCommand ( ) )
0 commit comments