()
align-items: center;
gap: var(--spacing-sm);
}
+ .actions {
+ margin-top: var(--spacing-sm);
+ display: flex;
+ gap: var(--spacing-sm);
+ }
}
diff --git a/src/renderer/store/folders.ts b/src/renderer/store/folders.ts
index 8f23314b..0605dbee 100644
--- a/src/renderer/store/folders.ts
+++ b/src/renderer/store/folders.ts
@@ -149,6 +149,21 @@ export const useFolderStore = defineStore('folders', {
await this.getFolders()
await snippetStore.getSnippets()
snippetStore.setSnippetsByAlias('trash')
+ },
+ openFolders (action: 'open' | 'close') {
+ if (action === 'open') {
+ this.folders.forEach(async i => {
+ this.patchFoldersById(i.id, {
+ isOpen: true
+ })
+ })
+ } else {
+ this.folders.forEach(i => {
+ this.patchFoldersById(i.id, {
+ isOpen: false
+ })
+ })
+ }
}
}
})
diff --git a/src/shared/types/main/analytics.d.ts b/src/shared/types/main/analytics.d.ts
index 7aa198f5..12e1d855 100644
--- a/src/shared/types/main/analytics.d.ts
+++ b/src/shared/types/main/analytics.d.ts
@@ -17,11 +17,14 @@ type SnippetEvents =
| 'set-language'
| 'create-screenshot'
| 'code-preview'
+
type FolderEvents = 'add-new' | 'delete' | 'set-language'
type TagEvents = 'add-new' | 'delete'
+
type AppEvents =
| 'move-storage'
| 'open-storage'
+ | 'new-storage'
| 'open-url'
| 'migrate'
| 'update'
@@ -30,6 +33,7 @@ type AppEvents =
| 'set-theme'
| 'notify'
| 'set-language'
+
type ApiEvents = 'snippet-create'
type TrackSnippetEvents = CombineWith
diff --git a/src/shared/types/main/index.d.ts b/src/shared/types/main/index.d.ts
index e3e0d3fb..c1edcec3 100644
--- a/src/shared/types/main/index.d.ts
+++ b/src/shared/types/main/index.d.ts
@@ -19,6 +19,8 @@ type ContextMenuAction =
| 'favorites'
| 'new'
| 'update:language'
+ | 'collapse-all'
+ | 'expand-all'
| 'none'
export type ContextMenuType =
@@ -52,7 +54,7 @@ type MainAction =
| 'open-url'
| 'prettier'
| 'focus'
- | 'fs-read'
+ | 'copy-to-assets'
type ApiAction = 'snippet-create'
@@ -129,6 +131,7 @@ export interface ElectronBridge {
preferences: StoreProperties
}
db: {
+ create: () => void
migrate: (path: string) => Promise
migrateFromSnippetsLab: (path: string) => void
move: (from: string, to: string) => Promise
diff --git a/src/shared/types/renderer/store/app.d.ts b/src/shared/types/renderer/store/app.d.ts
index c680d273..e88b126b 100644
--- a/src/shared/types/renderer/store/app.d.ts
+++ b/src/shared/types/renderer/store/app.d.ts
@@ -1,9 +1,11 @@
export type Theme =
| 'dark:dracula'
+ | 'dark:material-palenight'
| 'dark:material'
| 'dark:merbivore'
| 'dark:monokai'
| 'dark:one'
+ | 'dark:tokyo-night'
| 'light:github'
| 'light:material'
| 'light:solarized'