Skip to content

Commit d890083

Browse files
committed
refactor(types): more convenient name of types
1 parent 654767b commit d890083

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/renderer/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ ipc.on('main-menu:copy-snippet', () => {
118118
})
119119
120120
ipc.on('main-menu:format-snippet', () => {
121-
emitter.emit('format-snippet', true)
121+
emitter.emit('snippet:format', true)
122122
})
123123
</script>
124124

src/renderer/components/editor/TheEditor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ watch(
271271
}
272272
)
273273
274-
emitter.on('format-snippet', () => format())
274+
emitter.on('snippet:format', () => format())
275275
276276
window.addEventListener('resize', () => {
277277
forceRefresh.value = Math.random()

src/renderer/components/snippets/SnippetHeader.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const onClickMarkdownPreview = () => {
5959
snippetStore.isMarkdownPreview = !snippetStore.isMarkdownPreview
6060
}
6161
62-
emitter.on('focus:snippet-name', () => {
62+
emitter.on('snippet:focus-name', () => {
6363
inputRef.value?.select()
6464
})
6565
</script>

src/renderer/composable/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const onAddNewSnippet = async () => {
2424
await snippetStore.getSnippetsByFolderIds(folderStore.selectedIds!)
2525
await snippetStore.getSnippets()
2626

27-
emitter.emit('focus:snippet-name', true)
27+
emitter.emit('snippet:focus-name', true)
2828
track('snippets/add-new')
2929
}
3030

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export type EmitterEvents = {
2-
'focus:snippet-name': boolean
2+
'snippet:focus-name': boolean
3+
'snippet:format': boolean
34
'folder:click': any
45
'folder:rename': string
56
'scroll-to:folder': string
6-
'format-snippet': boolean
77
}

0 commit comments

Comments
 (0)