Skip to content

Commit 4f3073a

Browse files
committed
feat: different icon for team/personal note
1 parent 29a4279 commit 4f3073a

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

images/icon/dark/gist-secret.svg

+1
Loading

images/icon/light/gist-secret.svg

+1
Loading

src/mdFsProvider.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export class HackMDFsProvider implements vscode.FileSystemProvider {
104104
}
105105
} catch (e) {
106106
console.error(e);
107-
throw vscode.FileSystemError.NoPermissions();
107+
throw vscode.FileSystemError.Unavailable();
108108
}
109109
}
110110

src/treeReactApp/components/NoteTreeItem.tsx

+12-5
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,21 @@ export const NoteTreeItem = ({ note }: { note: Note }) => {
1818
const { extensionPath } = useAppContext();
1919
const iconPath = useMemo(() => {
2020
if (extensionPath) {
21-
return {
22-
light: path.join(extensionPath, 'images/icon/light/file-text.svg'),
23-
dark: path.join(extensionPath, 'images/icon/dark/file-text.svg'),
24-
};
21+
if (note.teamPath) {
22+
return {
23+
light: path.join(extensionPath, 'images/icon/light/gist-secret.svg'),
24+
dark: path.join(extensionPath, 'images/icon/dark/gist-secret.svg'),
25+
};
26+
} else {
27+
return {
28+
light: path.join(extensionPath, 'images/icon/light/file-text.svg'),
29+
dark: path.join(extensionPath, 'images/icon/dark/file-text.svg'),
30+
};
31+
}
2532
} else {
2633
return undefined;
2734
}
28-
}, [extensionPath]);
35+
}, [extensionPath, note.teamPath]);
2936

3037
return (
3138
<TreeItem

0 commit comments

Comments
 (0)