Skip to content

Commit

Permalink
chore: change version
Browse files Browse the repository at this point in the history
  • Loading branch information
1943time committed Nov 4, 2023
1 parent b1e671f commit a1d8174
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bluestone",
"version": "0.11.0",
"version": "0.11.1",
"description": "",
"main": "./out/main/index.js",
"license": "AGPL-3.0",
Expand Down
1 change: 0 additions & 1 deletion src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ app.whenReady().then(() => {
if (data.openFolder) windows.get(window.id)!.openFolder = data.openFolder
if (data.openTabs) windows.get(window.id)!.openTabs = data.openTabs
if (typeof data.index !== 'undefined') windows.get(window.id)!.index = data.index
console.log('set', data)
})
ipcMain.on('add-recent-path', (e, path) => {
store.set('recent-open-paths', Array.from(new Set([...(store.get('recent-open-paths') as any[] || []), path])))
Expand Down
13 changes: 11 additions & 2 deletions src/renderer/src/components/Empty.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,17 @@ export const Empty = observer(() => {
<span
className={'cursor-default text-sky-600 duration-200 hover:text-sky-400'}
onClick={() => {
treeStore.openFolder(r.filePath)
treeStore.openFirst()
try {
treeStore.openFolder(r.filePath)
treeStore.openFirst()
} catch (e) {
MainApi.open(r.filePath).then(res => {
if (res.filePaths.length) {
treeStore.openFolder(res.filePaths[0])
treeStore.openFirst()
}
})
}
}}
>
<FolderOutlined />
Expand Down

0 comments on commit a1d8174

Please sign in to comment.