Compare commits

...

2 commits

Author SHA1 Message Date
alexweininger
9904dd9fcb edit changelog and bump version 2021-04-30 01:52:28 -07:00
alexweininger
c8ec8b6a63 Prevent errors when user has no projects 2021-04-30 01:50:46 -07:00
4 changed files with 16 additions and 2 deletions

View file

@ -4,6 +4,11 @@ All notable changes to the "vscode-appwrite" extension will be documented in thi
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
## [0.0.3] - 2021-4-30
### Fixed
- Errors when user has no projects
## [0.0.2] - 2021-4-30
### Added

View file

@ -2,7 +2,7 @@
"name": "vscode-appwrite",
"displayName": "Appwrite",
"description": "Manage your Appwrite resources right from VS Code!",
"version": "0.0.2",
"version": "0.0.3",
"engines": {
"vscode": "^1.55.0"
},

View file

@ -32,6 +32,11 @@ export class HealthTreeItemProvider implements vscode.TreeDataProvider<vscode.Tr
}
async getChildren(element?: HealthTreeItem): Promise<vscode.TreeItem[]> {
if (healthClient === undefined) {
return [];
}
// get children for root
if (element === undefined) {
const health = await healthClient.checkup();

View file

@ -20,9 +20,13 @@ export class StorageTreeItemProvider implements vscode.TreeDataProvider<vscode.T
}
async getChildren(element?: vscode.TreeItem): Promise<vscode.TreeItem[]> {
if (storageClient === undefined) {
return [];
}
const files = await storageClient.listFiles();
if (files === undefined || files?.files.length === 0) {
const noStorage = new vscode.TreeItem('No files found');
const noStorage = new vscode.TreeItem("No files found");
return [noStorage];
}
return files.files.map((file) => new FileTreeItem(file));